Migrate MCP server from fastapi_mcp to MCP Python SDK
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 1.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 15
Description
## Problem
`fastapi_mcp` crashes with `RecursionError` on any self-referencing Pydantic model in the OpenAPI schema (no cycle detection in `resolve_schema_references()`). This is app-wide — one recursive route kills the entire MCP server. It also generates LLM-unfriendly schemas (`$ref`/`$defs`) and HTTP-derived tool names (`post_get_online_features`).
## Solution
Replace `fastapi_mcp` with the [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) (`FastMCP`). Define tools explicitly via `@mcp.tool()`, calling `FeatureStore` methods directly (no internal HTTP round-trip).
## Benefits
- Unblocks recursive Pydantic models (compound filters, nested types) on HTTP routes without breaking MCP
- Flat, LLM-friendly tool schemas (no `$ref`/`$defs`)
- Semantic tool names (`get_online_features`, not `post_get_online_features`)
- New registry discovery tools (`list_feature_views`, `list_entities`, `list_feature_services`, `list_data_sources`)
- No HTTP noise (health checks, static files, WebSocket routes not exposed)
- Direct `FeatureStore` calls instead of internal HTTP round-trip
Contributor guide
Assessment
This issue has not been assessed yet.