spring-projects / spring-projects/spring-ai

McpServer.sync(...).immediateExecution(true) property does not exist in new version of spring-ai-starter-mcp-server-webmvc

Open
#4,944 0 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 7h
Merged PRs (30d)
6

Description

Bug description
As mentioned in the official docs, SyncMcpServer internally delegates tasks to an async server, but sync operations can be forced by manually configuring the syncServer with the property immediateExecution(true). However, this property is probably removed in the latest version of spring-ai-starter-mcp-server-webmvc, which leads to the loss of security context and other thread-local objects.

Environment
version: 1.0.0-M8

Steps to reproduce
Try adding the property .immediateExecution()->Not recognised. Even the class McpServer does not have that property.

Expected behavior
There should be a mechanism to prevent the requests from being delegated to async handlers as the security context information is lost.

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 with the official SyncMcpServer documentation and the McpServer and SyncMcpServer classes in spring-ai-starter-mcp-server-webmvc. Check how sync operations are delegated to async handlers in version 1.0.0-M8 and where immediateExecution was removed or replaced. Done means a supported mechanism preserves the security context and other thread-local objects during synchronous operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
api, backend, security
Issue type
Bug
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.