Reworked technical/tool.md adding MCP support - #57
Merged
Conversation
cableman
force-pushed
the
feature/updated-agentic
branch
from
July 16, 2026 09:17
cf61b13 to
24b3ad1
Compare
- Auth on /mcp has to be a pure-ASGI middleware. BaseHTTPMiddleware breaks the streamable transport (double http.response.start / AssertionError), so the old "wrap it in a FastAPI middleware" advice was actively harmful. - Endpoint is served at POST /mcp (FastMCP default), mounted last so the REST routes still win. Fixed the curl and Open WebUI URL accordingly. - Host validation: it's the enable_dns_rebinding_protection flag (default on), a bad Host is a 421, and :* is the wildcard-port form. - Test client fixture must be session-scoped when the test runs the lifespan — session_manager.run() only starts once. - Bumped mcp[cli] to >=1.20 and called out the mcp.server.fastmcp vs the standalone fastmcp package mixup. Also added notes on reusing one service function across the REST route and the MCP tool, and compacting tool output so chat clients don't blow the context window replaying it every turn. Fixed all the broken ./new-agent.md links (that file is agentic_tool.md) and added an §8.7 pointer from the agent guide over to the MCP guide.
cableman
force-pushed
the
feature/updated-agentic
branch
from
July 16, 2026 09:22
24b3ad1 to
0f8aa9a
Compare
jekuaitk
self-requested a review
July 16, 2026 09:29
jekuaitk
approved these changes
Jul 16, 2026
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.
Also added notes on reusing one service function across the REST route and the MCP tool, and compacting tool output so chat clients don't blow the context window replaying it every turn.
Fixed all the broken ./new-agent.md links (that file is agentic_tool.md) and added an §8.7 pointer from the agent guide over to the MCP guide.