Add opt-in documentation discovery (llms.txt) to the MCP server - #217
Open
rohitkumarbhagat wants to merge 3 commits into
Open
Add opt-in documentation discovery (llms.txt) to the MCP server#217rohitkumarbhagat wants to merge 3 commits into
rohitkumarbhagat wants to merge 3 commits into
Conversation
…for Data Commons API queries
… using MCP tools for statistical research
rohitkumarbhagat
had a problem deploying
to
evals-and-secrets
September 1, 2026 12:08 — with
GitHub Actions
Failure
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces the option to expose the official Data Commons documentation resource, controlled by the new DC_ENABLE_DOCUMENTATION_RESOURCE setting. When enabled, the server registers a documentation index resource and appends a routing hint to the server instructions. The feedback recommends moving the requests import from the module level to inside the registration function to defer loading and keep server startup fast when the feature is disabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an optional Data Commons documentation resource backed by
https://docs.datacommons.org/llms.txt.When enabled, the MCP server:
dataset coverage, concept, and integration questions.
research skills.
The existing
server.mdremains unchanged from upstream.Why
The MCP tools work well for statistical research, but agents also receive
questions about Data Commons APIs, client libraries, schema, datasets, and
integrations. Without a documentation discovery path, clients may answer from
memory or perform broad web searches.
Using a resource keeps the documentation out of the always-loaded server
instructions. The complete index is fetched only when a client reads the
resource, and the index can then direct the client to the relevant official
documentation pages.
The resource is disabled by default so Custom Data Commons deployments do not
automatically receive base Data Commons documentation guidance.
Rollout
DC_ENABLE_DOCUMENTATION_RESOURCEcontrols both resource registration and therouting hint.
It defaults to
falseand is initially enabled only in the autopushenvironment. Staging and production remain disabled while the behavior is
evaluated.
Validation
without reading the documentation resource.
a second time, and generated correct Python V2 client code from official
documentation.
server.mdis byte-identical to the current upstream version.