-
Notifications
You must be signed in to change notification settings - Fork 2.9k
feat: support setting title and description for server #1799
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
the-ayyi
wants to merge
5
commits into
modelcontextprotocol:main
Choose a base branch
from
the-ayyi:feat/server-client-title-description-1783
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: support setting title and description for server #1799
the-ayyi
wants to merge
5
commits into
modelcontextprotocol:main
from
the-ayyi:feat/server-client-title-description-1783
+106
−0
Conversation
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
b832792 to
c6247a6
Compare
c6247a6 to
39145f3
Compare
maxisbey
reviewed
Dec 18, 2025
maxisbey
reviewed
Dec 18, 2025
maxisbey
reviewed
Dec 18, 2025
39145f3 to
777141e
Compare
555e72e to
ee18a6f
Compare
ee18a6f to
e05c684
Compare
maxisbey
requested changes
Dec 19, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
improves spec compliance
When a change improves ability of SDK users to comply with spec definition
P3
Nice to haves, rare edge cases
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.
This PR is based on another draft PR.
Core Type Changes
src/mcp/types.py: Addeddescription: str | Nonefield toImplementationclassServer Model Changes
src/mcp/server/models.py: Addedtitleanddescriptionfields toInitializationOptionsLow-Level Server Changes
src/mcp/server/lowlevel/server.py:Server.__init__()to accepttitleanddescriptionparameterscreate_initialization_options()to include these fieldsSession Changes
src/mcp/server/session.py: Updated to passtitleanddescriptiontoserverInfoinInitializeResultFastMCP Changes
src/mcp/server/fastmcp/server.py:titleanddescriptionparameters to__init__()@propertymethods for read accessMCPServerGithub-Issue:#1783
Motivation and Context
The MCP specification defines an
Implementationschema (used for bothclientInfoandserverInfoin initialization) that includes bothtitleanddescriptionfields for providing human-readable metadata to MCP hosts. However, the Python SDK had several gaps:Missing
descriptionfield: WhileImplementationinheritedtitlefromBaseMetadata, it was missing thedescriptionfield entirely, even though the MCP spec supports it.Server initialization limitations: The server only accepted
InitializationOptionswhich didn't support settingtitleordescription, making it impossible for servers to provide this metadata to clients.Inconsistent support: Clients could at least set
titleviaclientInfo(anImplementationobject), but servers had no way to set either field.This PR addresses the server-side implementation, allowing MCP servers to provide human-readable titles and descriptions that can be displayed by MCP hosts in their user interfaces, improving the user experience when working with multiple MCP servers.
How Has This Been Tested?
Tests
tests/server/test_session.py: Added test for low-level server title/descriptiontests/server/fastmcp/test_server.py: Added tests for FastMCP with and without title/descriptionBreaking Changes
Types of changes
Checklist
Additional context