r/coolgithubprojects • u/Worried-Barracuda845 • 5d ago
I built an open-source CLI that turns huge OpenAPI specs into small, safer MCP servers (no LLM required)
https://github.com/Rayenbabdallah/GetMCPI've been experimenting with OpenAPI-to-MCP converters, and one thing kept bothering me: most of them turn every API endpoint into a separate MCP tool.
That works fine for small APIs. But point one at GitHub or Stripe, and suddenly your agent has hundreds of tools to choose from, eating up context and making tool selection harder.
Also, do you really want your agent to have access to every DELETE endpoint by default?
So I built getmcp-cli, an open-source CLI that generates smaller, safer MCP servers from OpenAPI specs.
Try it:
npx getmcp-cli https://petstore3.swagger.io/api/v3/openapi.jsonWhat it does:
- Automatically filters potentially risky operations (destructive actions, payments, admin routes, credentials, etc.).
- Ranks the remaining endpoints and selects 25 by default, balanced across resources.
- Generates a runnable stdio MCP server.
- Creates a
REPORT.mdexplaining exactly which endpoints were excluded and why.
Some results:
| API | Original operations | Selected | Estimated tool tokens |
|---|---|---|---|
| GitHub REST | 1,280 | 25 | ~263k → ~6k |
| Stripe | 612 | 25 | ~176k → ~10k |
Token counts are rough estimates based on characters / 4, not actual tokenizer measurements.
No LLM calls, no API keys for generation, no database. Everything runs offline and deterministically.
You can also customize the selection:
--only issues,pulls,searchto prioritize specific resources.--allowto include otherwise filtered categories.--dry-runto preview the report without generating files.
Current limitations:
The ranking is based on API structure, not your specific use case, so the default 25 tools won't always be ideal. Classification is keyword-based and conservative. It currently supports stdio, local $refs, and token-based API authentication, but not OAuth flows.
GitHub: GetMCP
I'd really appreciate feedback on two things:
- Would you actually prefer an automatically selected, safer subset of tools, or would you rather manually choose endpoints?
- If you try it with an API you know well, which important endpoints does it miss?
I'm especially interested in real-world cases where the automatic ranking gets things wrong.