drio
Open app

NOTE: This project has been graduated and moved to the

Source

Java SDK for the Model Context Protocol (MCP), providing seamless integration between Java and Spring applications and MCP-compliant AI models and tools.

Catalog onlyCatalog onlySTDIO

Overview

Spring AI MCP is a Java SDK designed for seamless integration between Java and Spring applications with AI models and tools compliant with the Model Context Protocol (MCP).

To use Spring AI MCP, add the necessary dependencies to your Maven project and follow the provided documentation for integration with your Java applications.

  • Provides synchronous and asynchronous communication patterns for AI model interaction. - Supports standard MCP operations such as tool discovery and resource management. - Includes various transport implementations for different communication needs.
  1. Integrating AI models into Java applications for enhanced functionality.
  2. Building chatbots that interact with databases using the MCP framework.
  3. Creating applications that require real-time data processing and AI model interaction.

Add to your AI client

Use these steps to connect NOTE: This project has been graduated and moved to the in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "spring-ai-mcp-spring-projects-experimental": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-mcp-spring-projects-experimental"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "spring-ai-mcp-spring-projects-experimental": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-mcp-spring-projects-experimental"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "spring-ai-mcp-spring-projects-experimental": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-mcp-spring-projects-experimental"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "spring-ai-mcp-spring-projects-experimental": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-mcp-spring-projects-experimental"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "spring-ai-mcp-spring-projects-experimental": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-mcp-spring-projects-experimental"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "spring-ai-mcp-spring-projects-experimental": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-mcp-spring-projects-experimental"
      ]
    }
  }
}

FAQ

Is Spring AI MCP suitable for all Java applications?

Yes! It is designed to integrate with any Java application that requires AI model interaction.

How can I contribute to the project?

Contributions are welcome! You can fork the repository, create a feature branch, and submit a pull request.

Where can I find the documentation?

Comprehensive documentation is available on the [Spring AI MCP Reference Documentation](https://docs.spring.io/spring-ai-mcp/reference/overview.html).