Distributed Service Mesh for AI Agents¶
You write the logic. The mesh discovers, connects, heals, and traces — across languages, machines, and clouds.
Complete Platform for AI Agents
MCP Mesh is a complete platform for building and deploying AI agents to production scale. See how MCP Mesh compares →
Quick Start¶
from fastmcp import FastMCP
import mesh
app = FastMCP("My Service")
@app.tool()
@mesh.tool(capability="greeting", dependencies=["date_service"])
async def greet(date_service: mesh.McpMeshTool = None):
return f"Hello! {await date_service()}"
@mesh.agent(name="my-service", auto_run=True)
class MyAgent:
pass
<dependency>
<groupId>io.mcp-mesh</groupId>
<artifactId>mcp-mesh-spring-boot-starter</artifactId>
<version>0.9.0</version>
</dependency>
import io.mcpmesh.MeshAgent;
import io.mcpmesh.MeshTool;
import io.mcpmesh.Param;
import io.mcpmesh.Selector;
import io.mcpmesh.types.McpMeshTool;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@MeshAgent(name = "my-service", version = "1.0.0", port = 8080)
@SpringBootApplication
public class MyServiceApplication {
public static void main(String[] args) {
SpringApplication.run(MyServiceApplication.class, args);
}
@MeshTool(
capability = "greeting",
dependencies = @Selector(capability = "date_service")
)
public String greet(
@Param("name") String name,
McpMeshTool<String> dateService
) {
if (dateService != null && dateService.isAvailable()) {
return "Hello, " + name + "! " + dateService.call();
}
return "Hello, " + name + "!";
}
}
import { FastMCP, mesh } from "@mcpmesh/sdk";
import { z } from "zod";
const server = new FastMCP({ name: "my-service", version: "1.0.0" });
const agent = mesh(server, { name: "my-service", port: 8080 });
agent.addTool({
name: "greet",
capability: "greeting",
description: "Greet the user with current date",
dependencies: ["date_service"],
parameters: z.object({ name: z.string() }),
execute: async ({ name }, { date_service }) => {
const date = await date_service();
return `Hello, ${name}! Today is ${date}`;
},
});
That's it! No manual server setup, no connection management, no networking code.
Key Features¶
Zero Boilerplate¶
Two decorators replace hundreds of lines of networking code. Just write business logic.
Smart Discovery¶
Tag-based service resolution with version constraints. Agents automatically find dependencies.
Kubernetes Native¶
Helm charts with horizontal scaling, health checks, and observability.
Dynamic Updates¶
Hot dependency injection without restarts. Add, remove, or upgrade services seamlessly.
Built-in Observability¶
Grafana dashboards, distributed tracing with Tempo, and Redis-backed session management.
Enterprise Ready¶
Graceful failure handling, auto-reconnection, RBAC support, and real-time monitoring.
Why MCP Mesh?¶
Stop fighting infrastructure. Start building intelligence.
- Zero boilerplate networking code
- Pure Python simplicity with FastMCP integration
- End-to-end FastAPI integration with
@mesh.route() - Same code runs locally, in Docker, and Kubernetes
Design intelligent systems, not complex integrations.
- Agent-centric architecture with clear capabilities
- Dynamic intelligence - agents get smarter automatically
- Domain-driven design with focused, composable agents
- Mix and match agents to create new capabilities
AI infrastructure out of the box.
- Kubernetes-native with Helm charts
- Enterprise observability with Grafana, Tempo, and Redis
- Zero-touch operations with auto-discovery
- Scale from 2 agents to 200+ with same complexity
Complete visibility and zero-downtime operations.
- Real-Time Network Monitoring: See every agent, dependency, and health status in live dashboards
- Intelligent Scaling: Agents scale independently based on demand - no cascading performance issues
- Graceful Failure Handling: Agents degrade gracefully when dependencies are unavailable, automatically reconnect when services return
- One-Click Diagnostics:
meshctl statusprovides instant network health assessment with actionable insights
Transform AI experiments into production revenue.
- Accelerated Time-to-Market: Move from PoC to production deployment in weeks, not months
- Cross-Team Collaboration: Enable different departments to build agents that automatically enhance each other's capabilities
- Risk Mitigation: Proven patterns help ensure reliable AI deployments that scale with your business
- Future-Proof Architecture: Add new AI capabilities without disrupting existing systems
Turn your AI strategy from "promising experiments" to "competitive advantage in production."
MCP vs MCP Mesh¶
| Challenge | Traditional MCP | MCP Mesh |
|---|---|---|
| Connect 5 servers | 200+ lines of networking code | 2 decorators |
| Handle failures | Manual error handling everywhere | Automatic graceful degradation |
| Scale to production | Custom Kubernetes setup | helm install mcp-mesh |
| Monitor system | Build custom dashboards | Built-in observability stack |
| Add new capabilities | Restart and reconfigure clients | Auto-discovery, zero downtime |
MCP Mesh vs Other Frameworks¶
| Framework | K8s Native | Independent Scaling | Service Discovery | Best For |
|---|---|---|---|---|
| MCP Mesh | Production deployment | |||
| LangGraph | Complex workflows | |||
| CrewAI | Rapid prototyping | |||
| AutoGen | Enterprise/Azure | |||
| OpenAI Agents | OpenAI-centric |
Full comparison with code examples
Installation¶
Service discovery and coordination server. Included with the npm package above.
Runtime for building agents with @mesh.agent, @mesh.tool, @mesh.llm, and @mesh.llm_provider decorators. Includes @mesh.route() for FastAPI integration.
<dependency>
<groupId>io.mcp-mesh</groupId>
<artifactId>mcp-mesh-spring-boot-starter</artifactId>
<version>0.9.0</version>
</dependency>
Spring Boot starter for building agents with @MeshAgent, @MeshTool, @MeshLlm, and @MeshLlmProvider annotations. Includes @MeshRoute for Spring Boot REST integration.
Runtime for building agents with mesh(), addTool(), addLlm(), and addLlmProvider() functions. Includes addRoute() for Express integration.
Community & Support¶
- Discord - Real-time help and discussions
- GitHub Discussions - Share ideas and ask questions
- Issues - Report bugs or request features
- Examples - Working code examples
Project Status¶
- Latest Release: v0.9.0 (February 2026)
- License: MIT
- Languages: Python 3.11+, TypeScript/Node.js 18+, and Java 17+ (runtime), Go 1.23+ (registry)
- Status: Production-ready, actively developed
Acknowledgments¶
- Anthropic for creating the MCP protocol
- FastMCP for excellent MCP server foundations
- Kubernetes community for the infrastructure platform
- All contributors who help make MCP Mesh better
Ready to get started?
Python SDK Java SDK TypeScript SDK View on GitHub
Star the repo if MCP Mesh helps you build better AI systems!