spring-projects / spring-projects/spring-ai
Support Versioning for MCP Servers
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
Expected Behavior
It would be nice if the mcp server could be versioned in the sense that a client can make a request and specify the required version, and then the appropriate tools for that version are returned.
This would be very useful for production mcp servers where the newest version must be tested before switching the version.
Possible example:
- /mcp?version=1.0.0 -> returns only tools that are annotated with this version tag (@McpToolVersion="<2.0.0)
- /mcp?version=2.0.0 -> returns updated tools and some more new tools (@McpToolVersion=">=2.0.0)
- If no version is given the latest version should be returned
Current Behavior
It's not possible to serve different/updated tools in parallel to test the newest version first before switching on client-side. It should be possible to have tools with the same name if they exists in different versions.
Context
For us it would be perfect to have this feature because we then could test the newest version of the mcp server first on dev environment E2E with the agent and if the agent performs as expected we can switch the to the newest mcp server version on production.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the MCP server request handling and tool discovery paths in the Spring AI codebase; the issue does not name specific files or tests. Review how tool names and the latest tool set are currently returned, then determine how requested versions, version annotations, parallel tool versions, and the no-version default should be represented. Done means clients can request a version and receive the appropriate tools while existing behavior remains defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100