drio
Open app

Spring AI Example

Source

spring ai example. mcp server, agentic ai.

Catalog onlyCatalog onlySTDIO

Overview

Spring AI Example is a project that demonstrates the integration of AI tools within the Spring framework, showcasing how to utilize various AI functionalities in Java applications.

To use Spring AI Example, clone the repository from GitHub, set up your Java environment, and explore the provided methods and functions as tools to implement AI features in your Spring applications.

  • Integration of AI tools within the Spring framework - Demonstration of methods and functions as tools - Tool Result Converter for handling AI outputs
  1. Building AI-driven applications using Spring.
  2. Implementing AI functionalities in existing Java applications.
  3. Learning how to manage AI tools within a Spring context.

Add to your AI client

Use these steps to connect Spring AI Example 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-example-lucasdengcn": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-example-lucasdengcn"
      ]
    }
  }
}

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-example-lucasdengcn": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-example-lucasdengcn"
      ]
    }
  }
}

Claude Code

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

.mcp.json (project root)

{
  "mcpServers": {
    "spring-ai-example-lucasdengcn": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-example-lucasdengcn"
      ]
    }
  }
}

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-example-lucasdengcn": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-example-lucasdengcn"
      ]
    }
  }
}

Windsurf

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

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "spring-ai-example-lucasdengcn": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-example-lucasdengcn"
      ]
    }
  }
}

Cline

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

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "spring-ai-example-lucasdengcn": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-spring-ai-example-lucasdengcn"
      ]
    }
  }
}

FAQ

What programming language is used in Spring AI Example?

The project is developed in Java.

Is there any documentation available?

Yes, the project includes a README file with instructions and examples.

Can I contribute to the project?

Yes, contributions are welcome! Please check the contribution guidelines in the repository.