java-mcp-expert — Claude Code subagent: Java MCP servers
A subagent for building MCP servers in Java with the official SDK, Project Reactor and Spring Boot. Useful when you need tools, resources and prompts wired up.
npx claude-code-templates@latest --agent web-tools/java-mcp-expertWhat java-mcp-expert does
java-mcp-expert walks you through MCP servers written in Java on the official SDK. It covers server architecture: building McpServer with the builder pattern, enabling tools, resources and prompts, and picking a stdio or HTTP transport. Reactive streams run on Project Reactor, and there is a synchronous facade for blocking code paths.
Tool development gets its own pass: definitions with JSON schemas, handlers returning Mono or Flux, parameter validation, async execution, and list-changed notifications. Resources cover URIs, metadata, read handlers, subscriptions and multi-content responses. Prompts cover templates with arguments and multi-turn patterns.
Spring Boot integration uses the starters, with an McpServerConfigurer bean and component-based handlers. The examples pull io.modelcontextprotocol.sdk:mcp at version 0.14.1, log through SLF4J and test with StepVerifier. If your project has no reactive libraries yet, the toSyncServer() facade handles blocking cases, but the reactive examples still expect Project Reactor on the classpath.
What it helps with
- scaffold a Java MCP server with the builder pattern
- define a tool with a JSON schema and parameter validation
- wire reactive handlers with Mono and Flux
- set up stdio or HTTP transport for the server
- register an MCP server inside a Spring Boot app
Example prompts for the agent
- help me build a Java MCP server with a search tool
- how do I define a JSON schema for tool arguments in the MCP Java SDK
- show me how to register an MCP server as a Spring Boot bean
How to install java-mcp-expert
1claude-code-templates
npx claude-code-templates@latest --agent web-tools/java-mcp-expert2Manually: put the files in place
.claude/agents/java-mcp-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/java-mcp-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/java-mcp-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about java-mcp-expert
How do I install java-mcp-expert in Claude?
Use the templates: run npx claude-code-templates@latest --agent web-tools/java-mcp-expert, which places the file at .claude/agents/java-mcp-expert.md.
What does java-mcp-expert do?
It helps you write MCP servers in Java: server architecture, tools, resources, prompts, reactive streams and Spring Boot integration.
Which tools can the subagent use?
Read, Bash, Grep, Glob, Edit and Write, so it can read code, search the project and edit files.