MCP server for offline Flutter/Dart API docs

I posted flutterdocs_mcp to pub.dev. It is a development tool that wraps the offline Flutter/Dart API documentation in an MCP server that agents can search and navigate. There is also a complementary agent skill (see Best Practices in the pub.dev Example tab).

The offline documentation itself is preprocessed and stored in a sqlite3 database file, as detailed in the README. This makes it easy and fast for agents to perform a full-text search across all libraries and eliminates fetch and conversion delays. The preprocessing also makes the documentation easier for agents to navigate and consume.

The only agent host I have used it with is GitHub Copilot in VS Code, albeit with a variety of models. But MCP is a standard and I would expect similar results with other agent hosts (Claude, Codex, etc.). I have also used it with MCP Inspector, but that’s purely an MCP server testing tool.

With LLMs being released and updated at a rapid rate, it’s an open question as to how much having the most up-to-date documentation improves the performance of AI assistants. I am interested in doing some quantifiable A/B testing, versus the ad hoc testing I’ve done to date, and would be interested in ideas (or first-hand experiences) on how best accomplish this.

Cheers, Steve

2 Likes

Fantastic idea to download the docs as a SQLite database and have full text work instantly.

How much do you have to coax the LLM to actually use the MCP server? My (maybe outdated) experience is that the LLMs avoid calling MCP servers if they think they know, and they often think they know.

That’s a great question, and there’s some information on how and when to coax LLMs to use the docs in the Example tab on pub.dev.

flutterdocs_mcp implements the relatively new “instructions” portion of the MCP initialize request (see blog post and spec) that goes a long way in getting LLMs to use the MCP server effectively. Deploying the Agent Skill that’s included with flutterdocs_mcp also makes a big difference.

With both of these mechanisms in place, the LLMs I’ve tested will usually check the docs when needed. I suspect this can be further improved through refinements to the instructions and skill, though I’d really like to have some quantifiable A/B testing to validate any such refinements.

And in the end, you can always mention using the docs in a prompt.

1 Like