You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Java implementation of the Model Context Protocol specification. It includes:
20
-
- Synchronous and asynchronous [MCP Client](docs/docs/mcp-client.mdx) and [MCP Server](docs/docs/mcp-server.mdx) implementations
21
-
- Standard MCP operations support (tool discovery, resource management, prompt handling, structured logging). Support for request and notification handling.
22
-
-[Stdio](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#stdio) and [SSE](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#http-with-sse) transport implementations:
23
-
- Stdio-based (`StdioClientTransport`, `StdioServerTransport`) for process-based communication
24
-
- Java HttpClient-based SSE client (`HttpClientSseClientTransport`) for HTTP streaming
25
-
- Servlet-based SSE server (`HttpServletSseServerTransport`) for HTTP SSE Server streaming using traditional Servlet API
26
-
27
-
28
-
### MCP Spring
29
-
30
-
Optional SSE Transports implementations usin gthe Spring Webflux or WebMvc libraries.
31
-
32
-
-[WebFlux SSE Transport](https://github.com/modelcontextprotocol/java-sdk/tree/main/mcp-spring/mcp-spring-webflux) - Reactive HTTP streaming with Spring WebFlux (Client & Server)
33
-
-[WebMvc SSE Transport](https://github.com/modelcontextprotocol/java-sdk/tree/main/mcp-spring/mcp-spring-webmvc) - Spring MVC based HTTP SSE transport (Server only).
34
-
You can use the core `HttpClientSseClientTransport` transport as a SSE client.
35
-
36
-
37
-
## Installation
38
-
39
-
Add the following dependencies to your Maven project:
40
-
41
-
```xml
42
-
<!-- Core MCP -->
43
-
<dependency>
44
-
<groupId>io.modelcontextprotocol.sdk</groupId>
45
-
<artifactId>mcp</artifactId>
46
-
</dependency>
47
-
48
-
<!-- Optional: WebFlux SSE transport -->
49
-
<dependency>
50
-
<groupId>io.modelcontextprotocol.sdk</groupId>
51
-
<artifactId>mcp-spring-webflux</artifactId>
52
-
</dependency>
53
-
54
-
<!-- Optional: WebMVC SSE transport -->
55
-
<dependency>
56
-
<groupId>io.modelcontextprotocol.sdk</groupId>
57
-
<artifactId>mcp-spring-webmvc</artifactId>
58
-
</dependency>
59
-
```
60
-
61
-
## Examples
62
-
63
-
Explore these MCP examples in the [spring-ai-examples/model-context-protocol](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol) repository:
64
-
65
-
-[SQLite Simple](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/sqlite/simple) - Demonstrates LLM integration with a database
66
-
-[SQLite Chatbot](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/sqlite/chatbot) - Interactive chatbot with SQLite database interaction
67
-
-[Filesystem](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/filesystem) - Enables LLM interaction with local filesystem folders and files
68
-
-[Brave](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/brave) - Enables natural language interactions with Brave Search, allowing you to perform internet searches.
69
-
-[Theme Park API Example](https://github.com/habuma/spring-ai-examples/tree/main/spring-ai-mcp) - Shows how to create an MCP server and client with Spring AI, exposing Theme Park API tools
70
-
-[Http SSE Client + WebMvc SSE Server](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/mcp-webmvc-server) - Showcases how to create and use MCP WebMvc servers and HttpClient clients with different capabilities.
71
-
-[WebFlux SSE Client + WebFlux SSE Server](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/mcp-webflux-server) - Showcases how to create and use MCP WebFlux servers and clients with different capabilities
72
-
-[HttpClient SSE Client + Servlet SSE Server](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/mcp-servlet-server) - Showcases how to create and use MCP Servlet SSE Server and HttpClient SSE Client with different capabilities
9
+
For comprehensive guides and API documentation, visit the [MCP Java SDK Reference Documentation](https://modelcontextprotocol.io/sdk/java/mcp-overview).
Java SDK implementation of the Model Context Protocol, enabling seamless integration with language models and AI tools.
4
+
For comprehensive guides and API documentation, visit the [MCP Java SDK Reference Documentation](https://modelcontextprotocol.io/sdk/java/mcp-overview).
0 commit comments