Add a GitHub-only MCP server and a generated OpenAPI spec - #68
Merged
Merged
Conversation
mcp/ is a FastMCP server wrapping the fmpsdk library, distributed via `uvx --from git+...#subdirectory=mcp` rather than PyPI so the SDK's install footprint is unchanged. It exposes 10 curated tools for the common asks plus 3 discovery tools (list/describe/call_fmp_endpoint) that reach the full 238-method surface at runtime, and llms.txt as a resource. catalog.py is the shared introspection: it flattens every fmpsdk method into name/group/wire-path/summary/params/return/tier. tools/gen_openapi.py walks that catalog into ./openapi.json (OpenAPI 3.1, 238 operations, 181 schemas). FMP publishes no OpenAPI/Swagger document; the disclaimer to that effect is baked into info.description and x-not-official so it travels with the file. tools/gen_tiers.py derives each endpoint's live-verified FMP plan tier from REWRITE_PROGRESS.md into mcp/fmpsdk_mcp/resources/tiers.json, so the server and the spec both report Free/Starter/Premium/Ultimate/ Add-on accurately instead of guessing. call_fmp_endpoint has a small policy layer (policy.py): the bulk group and whole-asset-class batch quotes are refused as dataset-sized, and large list results are paginated with page/total/more and a steering note, backed by a short-TTL result cache so paging doesn't re-hit FMP. CI gains an `mcp` job: black on mcp/ + tools/, a --check that the generated artifacts are in sync with the source, and the 29-test mcp suite. The SDK package and its 268 unit tests are untouched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019VtCSxrHuWMA2gX6zUdCdN
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.
What
mcp/— a FastMCP server wrapping thefmpsdklibrary, distributed viauvx --from git+…#subdirectory=mcp(not PyPI, so the SDK's install footprint is unchanged). 10 curated tools + 3 discovery tools (list/describe/call_fmp_endpoint) reaching the full 238-method surface at runtime, plusllms.txtas a resource.tools/gen_openapi.py→./openapi.json(OpenAPI 3.1, 238 operations, 181 schemas). FMP publishes no OpenAPI/Swagger doc; disclaimer baked intoinfo.description+x-not-official.tools/gen_tiers.py→mcp/fmpsdk_mcp/resources/tiers.json, each endpoint's live-verified plan tier parsed fromREWRITE_PROGRESS.md.call_fmp_endpointpolicy —bulkgroup and whole-asset-class batch quotes refused; large lists paginated with a steering note + short-TTL cache.mcpjob: black onmcp/+tools/,--checkthat generated artifacts are in sync, 29-test mcp suite.Verification
black --check mcp/ tools/: cleanopenapi.json/tiers.json: in sync with source🤖 Generated with Claude Code
https://claude.ai/code/session_019VtCSxrHuWMA2gX6zUdCdN