Skip to content

fix(server): pass MCP description via instructions, not version - #317

Open
syf2211 wants to merge 1 commit into
tadata-org:mainfrom
syf2211:fix/description-not-version
Open

fix(server): pass MCP description via instructions, not version#317
syf2211 wants to merge 1 commit into
tadata-org:mainfrom
syf2211:fix/description-not-version

Conversation

@syf2211

@syf2211 syf2211 commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Fix MCP server initialization so the FastApiMCP description is no longer passed as the MCP server version.

Motivation

Server(self.name, self.description) passed the description as the second positional argument, which maps to version in the MCP Python SDK. In MCP Inspector this showed up as the server "Version" field instead of server guidance text.

Fixes #272
Fixes #293

Changes

  • Initialize Server with version=self.fastapi.version and instructions=self.description
  • Add regression assertions in test_create_mcp_server

Tests

python3 -m pytest tests/test_basic_functionality.py -q --no-cov

All 3 tests passed.

Notes

The current MCP Python SDK exposes server guidance via instructions in InitializeResult, not a separate description field on Server.


View with Codesmith Autofix with Codesmith
Need help on this PR? Tag /codesmith with what you need. Autofix is disabled.

Server(self.name, self.description) mapped the description onto the
version parameter in the MCP Python SDK. Use fastapi.version for
serverInfo.version and self.description for instructions instead.

Fixes tadata-org#272
Fixes tadata-org#293
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant