fact
Uses GitHub repository search to resolve bare library names, ranking candidates by star count and verifying the top project is a Go module before reading its documentation; an optional GITHUB_TOKEN raises the search rate limit from 10 to 30 requests per minute.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
fact
Fact, not memory. Up-to-date library documentation for AI agents, over MCP.
Your AI guesses. fact makes it check.
How do I create a native window in mygo? use factfact fetches the current official documentation for the library you ask
about, at the version that exists right now, and returns the passages that
answer the question.
Why
An assistant answers library questions from what it read during training. That is months old, and it shows:
APIs that were renamed or removed
Examples written for a version you are not using
Methods that never existed
A central documentation index fixes some of this, but it lags too: it has to
crawl, and it is always behind the release. fact has no index. It reads the
library's own documentation API at the moment you ask.
Related MCP server: RTFD (Read The F*****g Docs)
Install
npm install -g @sankpia/fact-mcpRequires Node.js 20 or newer. Nothing else — the server is a single file with no runtime dependencies.
Connect
Add to your MCP client's configuration:
{
"mcpServers": {
"fact": {
"type": "stdio",
"command": "fact-mcp",
"args": []
}
}
}That is the whole setup. It works with Factory, Claude Code, Cursor, VS Code and any other MCP host.
Claude Code
claude mcp add fact fact-mcpCursor / VS Code
Use the JSON above in the client's MCP settings file.
Tools
search
Ask a question about a library. Returns the passages that answer it.
Argument | Purpose |
| What you need, in words or API names. |
| Library name, module path, or |
| Pin a version. Default: latest. |
| Rank the sections that mention it first. |
| Response budget. Default 1500. |
Leave query out and pass only library to get a version list and package
overview instead of documentation.
topic is a hint, not a filter: the sections that mention it are ranked first,
and everything the query matched is still returned. That matters because a
topic is usually a phrase the prose does not use verbatim — authentication,
window sizing — and filtering on those dropped the answer along with the
noise. Pass topic without a query and it becomes the query, which needs a
library to look the documentation up in.
A query with no library is treated as the name to resolve, and that
library's documentation is then searched with the same query, exactly as if you
had named it. If the name matches several modules you get the candidates
instead, because resolution always happens before any documentation is read.
get
Fetch one page or one declaration at full fidelity. Use it once search has
told you what to look at.
Argument | Purpose |
| Library name or module path. |
|
|
| Package path, e.g. |
| Pin a version. |
| Response budget. Default 8000. |
A qualified symbol selects by receiver and name together, so Page.Window is
the Window method of Page and nothing else. Type parameters may be left in
(Document[T].Window) or out (Document.Window). A bare name that matches
several declarations, or a receiver that has no such method, comes back as the
candidates to choose from rather than as one arbitrary declaration.
How names resolve
You can name a library the way you would say it:
You write | Resolved as |
| searched by GitHub stars, then verified as a module |
| used directly, no search |
| tried as |
| the standard library |
| refused: it is a JavaScript library |
When a bare name's leading project on GitHub is not Go, the answer says which ecosystem it belongs to instead of returning a weak same-named Go package. Pass a full module path to read a Go package whose name happens to collide with a library from another language.
When two libraries share a name and neither clearly wins, fact returns the
candidates with star counts instead of picking one. Ask again with the module
path to disambiguate.
Optional: run a proxy
Direct mode is fine when your network reaches pkg.go.dev quickly. On a slow or
lossy route, one query means several round trips and the delay adds up.
A fact-proxy sits next to pkg.go.dev, performs every upstream fetch itself,
and returns the material in one response. Set two variables and the client uses
it:
export FACT_PROXY_URL=https://your-proxy.example.com
export FACT_PROXY_TOKEN=your-tokenTo run one, see server/ and scripts/setup-server.sh. The proxy is
stateless: no cache, no database, no files.
Configuration
Variable | Default | Meaning |
| unset | Proxy endpoint. Unset means direct mode. |
| unset | Bearer token for the proxy. |
| unset | Raises GitHub search from 10 to 30 per minute. |
|
| In-process cache TTL. |
|
| Max cached entries. |
|
| Per-attempt timeout in proxy mode. |
|
| Retries for a flaky route. |
A GITHUB_TOKEN is optional and only affects bare-name lookups. A fine-grained
token with no permissions at all is enough, because repository search on public
repositories requires none.
Design notes
No index, nothing on disk. Answers come from the source at request time. The only cache is in process memory, expires after five minutes, and dies with the process.
One tool call, not three. Resolving a library is part of search, not a
separate step you have to chain.
Markdown, not HTML. pkg.go.dev returns Markdown directly, so the response is what an agent reads best.
Snippets, not pages. A search result is the declaration line, the lines
around the match and the paragraph that mentions it. A struct can be eight
kilobytes while the answer is one field; get returns the whole declaration
when you need it, and get(Type.Field) returns just the field.
Failures are explicit. A miss, an ambiguous name and a rate limit each produce a different message with a next step. None of them is silently answered from stale data.
Development
bun install
bun run typecheck
bun run test-matrix # 44 cases, every tool argument
bun run bench # the 12-question product benchmark
bun run inspect # MCP InspectorSee CONTRIBUTING.md for the full workflow.
Roadmap
fact is in maintenance mode: 0.1.3 is the last feature release, and only
bug fixes and dependency updates follow. It is Go-only by decision — a second
ecosystem needs an official, structured documentation API that answers in
seconds, and the candidates measured so far do not have one.
The measurements, the honest case against continuing, and the two-week test that would change the decision are in docs/research/was-it-worth-building.md. The plan itself is docs/ROADMAP.md.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Docsy gives AI assistants current, version-specific documentation for libraries, frameworks and SDKs. Resolve library IDs and versions, then search and fetch focused official documentation with original source links using five read-only MCP tools. Hosted Streamable HTTP with OAuth 2.1 sign-in.
@latest documentation and code examples to 9000+ libraries for LLMs and AI code editors in a singl…
One place for every AI agent's pages and docs: versioned links to share, search and update.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides up-to-date, version-specific documentation and code examples for software libraries directly to LLMs, enabling resolution of library identifiers and retrieval of relevant documentation with code snippets.MIT
- AlicenseAqualityDmaintenanceProvides LLMs with real-time access to up-to-date documentation from PyPI, npm, crates.io, GoDocs, DockerHub, GitHub, and GCP, preventing outdated code generation and API hallucinations.2737 PyPI14MIT
- FlicenseAqualityDmaintenanceProvides Large Language Models with real-time access to the latest documentation for Python libraries like Langchain, LlamaIndex, and OpenAI, enabling accurate and up-to-date code suggestions.1-
- AlicenseNot gradedqualityCmaintenanceProvides up-to-date documentation for AI agents by locally querying a community-driven registry of pre-built docs packages.Apache 2.0