Skip to content

Preliminary support for MCP - #145

Draft
djperrefort wants to merge 10 commits into
mainfrom
review
Draft

Preliminary support for MCP#145
djperrefort wants to merge 10 commits into
mainfrom
review

Conversation

@djperrefort

@djperrefort djperrefort commented Apr 11, 2026

Copy link
Copy Markdown
Owner

Adds preliminary support for the Model Context Protocol (MCP). Uses FastMCP and its from_fastapi functionality to optionally generate an MCP app from the dynamically built FastAPI application.

Future work:

from_fastapi() generates tool names from operation_ids, which FastAPI
auto-generates as things like fetch_multiple_records_from_the_table__db__users__get. Those
are functional but not great for LLM reasoning. Adding explicit operation_id values to each
route in create_table_router would directly improve how well an LLM understands what each
tool does.

FastAPI uses the handler's docstring as the tool description.
The current handlers have docstrings but they're generic: "Fetch a list of records from the
database". This doesn't tell the LLM anything about which table or what the data represents. Passing
table-aware descriptions into the handlers would help significantly.

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@djperrefort djperrefort closed this Jun 5, 2026
@djperrefort djperrefort reopened this Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant