{"id":26570996,"url":"https://github.com/spring-projects-experimental/spring-ai-mcp","last_synced_at":"2025-03-22T22:20:08.425Z","repository":{"id":267769807,"uuid":"899725411","full_name":"spring-projects-experimental/spring-ai-mcp","owner":"spring-projects-experimental","description":"Java SDK for the Model Context Protocol (MCP), providing seamless integration between Java and Spring applications and MCP-compliant AI models and tools.","archived":false,"fork":false,"pushed_at":"2025-01-24T12:10:52.000Z","size":3274,"stargazers_count":67,"open_issues_count":7,"forks_count":11,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-01-24T13:22:46.247Z","etag":null,"topics":["ai","java","mcp","spring"],"latest_commit_sha":null,"homepage":"https://docs.spring.io/spring-ai-mcp/reference/overview.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spring-projects-experimental.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-06T21:56:08.000Z","updated_at":"2025-01-24T12:10:56.000Z","dependencies_parsed_at":"2024-12-26T17:30:35.053Z","dependency_job_id":"c87fd0b9-87ae-4f7d-bec5-0353b3e22e19","html_url":"https://github.com/spring-projects-experimental/spring-ai-mcp","commit_stats":null,"previous_names":["spring-projects-experimental/spring-ai-mcp"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects-experimental%2Fspring-ai-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects-experimental%2Fspring-ai-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects-experimental%2Fspring-ai-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-projects-experimental%2Fspring-ai-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spring-projects-experimental","download_url":"https://codeload.github.com/spring-projects-experimental/spring-ai-mcp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245026840,"owners_count":20549204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","java","mcp","spring"],"created_at":"2025-03-22T22:19:27.916Z","updated_at":"2025-03-22T22:20:08.393Z","avatar_url":"https://github.com/spring-projects-experimental.png","language":"Java","funding_links":[],"categories":["Frameworks","AI/ML","Table of Contents","Language-Specific SDKs","Frameworks \u0026 Libraries","SDKs","框架"],"sub_categories":["🛠️ \u003ca name=\"other-tools-and-integrations\"\u003e\u003c/a\u003eOther Tools and Integrations","AI Services","Frameworks","Knowledge Management","Java"],"readme":"# NOTE: This project has been graduated and moved to the [MCP Java SDK](https://github.com/modelcontextprotocol/java-sdk/tree/main/mcp) and [Spring AI MCP](https://docs.spring.io/spring-ai/reference/api/mcp/mcp-overview.html). See you there! This repository is now archived. \n\n# Java \u0026 Spring MCP\n[![Build Status](https://github.com/spring-projects-experimental/spring-ai-mcp/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/spring-projects-experimental/spring-ai-mcp/actions/workflows/continuous-integration.yml)\n\nSet of projects that provide Java SDK and Spring Framework integration for the [Model Context Protocol](https://modelcontextprotocol.org/docs/concepts/architecture). \nIt enables Java applications to interact with AI models and tools through a standardized interface, supporting both synchronous and asynchronous communication patterns.\n\n## 📚 Reference Documentation\nFor comprehensive guides and API documentation, visit the [Spring AI MCP Reference Documentation](https://docs.spring.io/spring-ai-mcp/reference/overview.html).\n\n\u003cimg src=\"mcp-docs/src/main/antora/modules/ROOT/images/spring-ai-mcp-clinet-architecture.jpg\" width=\"600\"\u003e\n\n\u003cimg src=\"mcp-docs/src/main/antora/modules/ROOT/images/spring-ai-mcp-server-architecture.jpg\" width=\"600\"\u003e\n\n## Projects\n\n### [MCP Java SDK](https://docs.spring.io/spring-ai-mcp/reference/mcp.html)\n\nJava implementation of the Model Context Protocol specification. It includes:\n- Synchronous and asynchronous [MCP Client](https://docs.spring.io/spring-ai-mcp/reference/mcp.html#_mcp_client) and [MCP Server](https://docs.spring.io/spring-ai-mcp/reference/mcp.html#_mcp_server) implementations\n- Standard MCP operations support (tool discovery, resource management, prompt handling, structured logging). Support for request and notification handling.\n- [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. \n\n### MCP Transports\n\n#### Core Transports\n- Stdio-based (`StdioClientTransport`, `StdioServerTransport`) for process-based communication\n- Java HttpClient-based SSE client (`HttpClientSseClientTransport`) for HTTP streaming\n- Servlet-based SSE server (`HttpServletSseServerTransport`) for HTTP SSE Server streaming using traditional Servlet API\n\n#### Optional SSE Transports\n- [WebFlux SSE Transport](https://github.com/spring-projects-experimental/spring-ai-mcp/tree/main/mcp-transport/mcp-webflux-sse-transport) - Reactive HTTP streaming with Spring WebFlux (Client \u0026 Server)\n- [WebMvc SSE Transport](https://github.com/spring-projects-experimental/spring-ai-mcp/tree/main/mcp-transport/mcp-webmvc-sse-transport) - Spring MVC based HTTP SSE transport (Server only). \nYou can use the core `HttpClientSseClientTransport` transport as a SSE client.\n\n### [Spring AI MCP](https://docs.spring.io/spring-ai-mcp/reference/spring-mcp.html)\n\nThe Spring integration module provides Spring-specific functionality:\n- Integration with Spring AI's function calling system\n- Spring-friendly abstractions for MCP clients\n- Auto-configurations (WIP)\n\n\n## Installation\n\nAdd the following dependencies to your Maven project:\n\n```xml\n\u003c!-- Core MCP --\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.experimental\u003c/groupId\u003e\n    \u003cartifactId\u003emcp\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\n\u003c!-- Optional: WebFlux SSE transport --\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.experimental\u003c/groupId\u003e\n    \u003cartifactId\u003emcp-webflux-sse-transport\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\n\u003c!-- Optional: WebMVC SSE transport --\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.experimental\u003c/groupId\u003e\n    \u003cartifactId\u003emcp-webmvc-sse-transport\u003c/artifactId\u003e\n\u003c/dependency\u003e\n\n\u003c!-- Optional: Spring AI integration --\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.experimental\u003c/groupId\u003e\n    \u003cartifactId\u003espring-ai-mcp\u003c/artifactId\u003e\n\u003c/dependency\u003e\n```\n\nThis is a milestone release, not available on Maven Central. \nAdd this repository to your POM:\n\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003espring-milestones\u003c/id\u003e\n        \u003cname\u003eSpring Milestones\u003c/name\u003e\n        \u003curl\u003ehttps://repo.spring.io/milestone\u003c/url\u003e\n        \u003csnapshots\u003e\n            \u003cenabled\u003efalse\u003c/enabled\u003e\n        \u003c/snapshots\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n```\n\nReffer to the [Dependency Management](https://docs.spring.io/spring-ai-mcp/reference/dependency-management.html) page for more information.\n\n## Example Demos\n\nExplore 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:\n\n- [SQLite Simple](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/sqlite/simple) - Demonstrates LLM integration with a database\n- [SQLite Chatbot](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/sqlite/chatbot) - Interactive chatbot with SQLite database interaction\n- [Filesystem](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/filesystem) - Enables LLM interaction with local filesystem folders and files\n- [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.\n- [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\n- [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.\n- [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\n- [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\n\n## Documentation\n\n- [Java MCP SDK documentation](mcp/README.md)\n  - [Reference documentation](docs/ref-index.md)\n- [Spring Integration documentation](spring-ai-mcp/README.md)\n\n\n## Development\n\n- Building from Source\n\n```bash\nmvn clean install\n```\n\n- Running Tests\n\n```bash\nmvn test\n```\n\n\n## Contributing\n\nThis is an experimental Spring project. Contributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch\n3. Submit a Pull Request\n\n## Team\n\n- Christian Tzolov\n- Dariusz Jędrzejczyk\n\n## Links\n\n- [GitHub Repository](https://github.com/spring-projects-experimental/spring-ai-mcp)\n- [Issue Tracker](https://github.com/spring-projects-experimental/spring-ai-mcp/issues)\n- [CI/CD](https://github.com/spring-projects-experimental/spring-ai-mcp/actions)\n\n## License\n\nThis project is licensed under the [Apache License 2.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-projects-experimental%2Fspring-ai-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspring-projects-experimental%2Fspring-ai-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-projects-experimental%2Fspring-ai-mcp/lists"}