Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

MCP endpoints in controllers (SSE transport, Server side) #2630

handicraftsman started this conversation in Ideas
Discussion options

Drafting it real quick, but what if, instead of having a single MCP endpoint, it was possible to define a controller similar to this one?

@MCPController
@RequestMapping("/mcp/controller/")
public class HelloMCPController {
 @MCPMapping("/{endpointId}")
 MCPEndpointConfig endpoint(@PathVariable String endpointId) {
 return MCPEndpointConfig.builder()
 .withTools(...)
 .build();
 }
}

Reasoning for this is ability to define what tools will be available on this endpoint based on a dynamic user-provided configuration. Additionally, with Multi-agent MCP clients, this would allow providing an endpoint that is fine-tuned for the given agent specifically, with tools that are only needed for that agent.
That is especially reasonable for large products.

As a note - I haven't checked exact API implementation just yet, so class names are taken out of the blue, but I have already noticed there's no support for the main idea of this code snippet.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /