Skip to content

[BUG] self.description is passed to version parameter instead of description in Server initialization #272

@claudiourbina

Description

@claudiourbina

Current Behavior

In line 144 of server.py, the Server object is instantiated incorrectly:

mcp_server: Server = Server(self.name, self.description)

This passes self.description as the second positional argument, which maps to the version parameter in the Server constructor.

Expected Behavior

According to the MCP Python SDK Server constructor signature, the parameter order is:

def __init__(
    self,
    name: str,
    version: str | None = None,
    title: str | None = None,
    description: str | None = None,
    instructions: str | None = None,
    ...
)

The description should be passed as a named argument or in the fourth position (after version and title).

Proposed Fix

Change line 144 to use a named argument:

mcp_server: Server = Server(self.name, description=self.description)

Or alternatively, if you want to pass version as well:

mcp_server: Server = Server(
    name=self.name,
    version=self.version,  # if available
    description=self.description
)

Impact

This bug causes the FastAPI application description to be incorrectly registered as the MCP server version, and the actual description field remains empty.

Location

mcp_server: Server = Server(self.name, self.description)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions