MCP Server API 1.0.0 API
Framework-agnostic server APIs for building MCP servers.
This package provides runtime interfaces and utilities that can be used by MCP server implementations. These APIs are designed to be framework-independent and can be implemented by any Java-based MCP server framework.
Defining server features
Prompt- Define MCP promptsResource- Define MCP resourcesResourceTemplate- Define MCP resource templatesTool- Define MCP toolsCompletePrompt- Provide completion for MCP prompt argumentsCompleteResourceTemplate- Provide completion for MCP resource template arguments
Common APIs
Cancellation- Request cancellation handlingContentEncoder- Custom content encodingMcpException- Base MCP exceptionMcpRequest- Request metadataProgress- Progress reporting for long-running operations
Framework-Agnostic Design
These interfaces use generic types for reactive returns (e.g., <T> T send()).
Framework implementations should return their native reactive types:
- Quarkus:
Uni<T>from SmallRye Mutiny - Spring:
Mono<T>from Project Reactor - Standard Java:
CompletableFuture<T>
- See Also:
Packages
Package
Description
Core annotations and APIs for building Model Context Protocol (MCP) servers.
Provide auto-completion functionality to the client.
Content blocks, for inclusion in resources and tool call responses.
Report progress for long-running operations.
Define MCP prompts.
Define MCP resources and resource templates.
Mechanism for providing the implementation of the API.
Define MCP tools.