spring-ai-mcp-demo
Verified Safeby sandipanchakraborty2016
Overview
Demonstrates the Model Context Protocol (MCP) with Spring AI, showcasing a model-agnostic tool server and AI hosts for OpenAI and Anthropic Claude.
Installation
docker-compose up --buildEnvironment Variables
- SPRING_AI_OPENAI_API_KEY
- ANTHROPIC_API_KEY
- SPRING_AI_MCP_SERVER_TRANSPORT
- SPRING_AI_MCP_SERVER_SSE_MESSAGE_ENDPOINT
- SPRING_AI_MCP_CLIENT_TRANSPORT
- SPRING_AI_MCP_CLIENT_SSE_BASE_URL
- SPRING_AI_MCP_CLIENT_SSE_MESSAGE_ENDPOINT
Security Notes
The MCP Server's FileService operates within a sandboxed `~/.mcp-demo-workspace` directory, mitigating arbitrary file access. API keys for AI models are correctly handled as environment variables. The direct exposure of tool calls via REST endpoints in `mcp-client` and `mcp-host` (for demonstration) could pose a risk if not properly secured in a production environment, as it bypasses LLM safety layers. However, for a demo, this exposure is intentional for illustrative purposes. No 'eval' or obfuscation found.
Similar Servers
zenfeed
An AI-powered information hub that acts as an intelligent RSS reader, real-time news knowledge base, and personal assistant for monitoring events and delivering analysis reports.
cupertino
Cupertino is an Apple Documentation Crawler & MCP Server that provides accurate, up-to-date Apple API documentation and sample code to AI agents and developers for offline and AI-assisted development.
mcp-server-computer
This server acts as a Spring AI MCP Server component to provide cross-platform computer configuration information (OS, user, Java, and platform-specific details) to an AI agent.
meds-mcp
A Medical Context Protocol (MCP) server for retrieving and analyzing de-identified patient EHR data, facilitating LLM-powered chat interaction and evidence review with medical ontologies and faceted search.