fix fastmcp-python template and rename tool name to avoid collision #492
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the FastMCP Python template to avoid common tool-name collisions in multi-server setups and to improve HTTP transport behavior around /mcp routing.
Changes:
- Renames example tools to
example_echo/example_sumto reduce collisions with common reference MCP servers. - Updates the echo tool’s config lookup key to match the new tool name.
- Changes HTTP startup to build an ASGI app and run Uvicorn directly, attempting to avoid Starlette’s trailing-slash redirect behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| internal/cli/frameworks/builtin/fastmcp-python/templates/src/tools/sum.py.tmpl | Renames the example sum tool to example_sum and updates docstring rationale. |
| internal/cli/frameworks/builtin/fastmcp-python/templates/src/tools/echo.py.tmpl | Renames the example echo tool to example_echo and updates tool-config lookup key. |
| internal/cli/frameworks/builtin/fastmcp-python/templates/src/core/server.py.tmpl | Switches HTTP mode to http_app() + uvicorn.run() and disables redirect slashes. |
josh-pritchard
approved these changes
May 18, 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.
Description
fix fastmcp-python template and rename tool name to avoid collision with remote mcp server.
Prefix example tools to avoid collisions. echo and sum collide with common reference MCP servers (@modelcontextprotocol/server-everything)
Change Type
/kind fix
Changelog
Additional Notes