spring-projects / spring-projects/spring-ai

MCP to support stateless_http=True

Open
#4,226 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
1d 10h
Merged PRs (30d)
5

Description

There is no option to expose MCP tools/resources/prompt with webmvc without sse sessions.
That is something supported in other languages, like fastmcp with python new FastMCP( ... stateless_http=True)

Expected Behavior

Client should be able to send POST like below to get list of tools or execute a tool without sessionId.

curl -X POST http://<MCP_SERVER_HOST>:<PORT>/mcp \
-H "Content-Type: application/json" \
-d '{
    "jsonrpc": "2.0",
    "method": "tools/list",
    "params": {},
    "id": 1
}'

Current Behavior

Client has to establish session with /sse endpoint first or use STDIO.

Context

Not able to expose MCP server easily with Spring AI.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the Spring AI webmvc MCP transport around the /sse and /mcp entry points, comparing them with the STDIO path. Done means a client can POST JSON-RPC requests such as tools/list to /mcp without first establishing a session, while existing session-based behavior remains available.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.