freshcrate
Home > MCP Servers > mcp-mesh

mcp-mesh

Enterprise-grade distributed AI agent framework | Develop โ†’ Deploy โ†’ Observe | K8s-native | Dynamic DI | Auto-failover | Multi-LLM | Python + Java + TypeScript

Description

Enterprise-grade distributed AI agent framework | Develop โ†’ Deploy โ†’ Observe | K8s-native | Dynamic DI | Auto-failover | Multi-LLM | Python + Java + TypeScript

README

MCP Mesh

Release Python Version Java Version TypeScript Go Version Rust PyPI npm Maven Central Docker Helm Discord YouTube License

The future of AI is not one large model, but many specialized agents working together.

๐Ÿ“š Documentation ยท ๐Ÿš€ Quick Start ยท ๐ŸŽฌ YouTube ยท ๐Ÿ’ฌ Discord


โšก Getting Started

# Install the CLI
npm install -g @mcpmesh/cli

# Explore commands
meshctl --help

# Built-in documentation
meshctl man

Python Quick Start โ†’ | Java Quick Start โ†’ | TypeScript Quick Start โ†’


๐ŸŽฏ Why MCP Mesh?

You write the agent logic. The mesh discovers, connects, heals, and traces โ€” across languages, machines, and clouds.


For Developers ๐Ÿ‘ฉโ€๐Ÿ’ป

Stop fighting infrastructure. Start building intelligence.

  • Zero Boilerplate: Simple decorators/functions replace hundreds of lines of networking code
  • Python, Java & TypeScript: Write MCP servers as simple functions in your preferred language - no manual client/server setup
  • Web Framework Integration: Inject MCP agents directly into FastAPI (Python), Spring Boot (Java), or Express (TypeScript) APIs seamlessly
  • LLM as Dependencies: Inject LLMs just like MCP agents - dynamic prompts with Jinja2 (Python), FreeMarker (Java), or Handlebars (TypeScript)
  • Seamless Development Flow: Code locally, test with Docker Compose, deploy to Kubernetes - same code, zero changes
  • kubectl-like Management: meshctl - a familiar command-line tool to run, monitor, and manage your entire agent network
# MCP Agent
@app.tool()
@mesh.tool(capability="plan_trip", dependencies=["weather_service"])
def plan_trip(weather_service: mesh.McpMeshTool = None):
    # Just write business logic - mesh handles the rest

# FastAPI Route with MCP DI
@api.post("/trip-planning")
@mesh.route(dependencies=["plan_trip"])
async def create_trip(trip_data: dict, plan_trip: mesh.McpMeshTool = None):
    # Use MCP agents directly in your web API
    return plan_trip(trip_data)

For Solution Architects ๐Ÿ—๏ธ

Design intelligent systems, not complex integrations.

  • Agent-Centric Architecture: Design specialized agents with clear capabilities and dependencies, not monolithic systems
  • Dynamic Intelligence: Agents get smarter automatically when new capabilities come online - no reconfiguration needed
  • Domain-Driven Design: Solve business problems with ecosystems of focused agents that can be designed and developed independently
  • Composable Solutions: Mix and match agents to create new business capabilities without custom integration code

Example: Deploy a financial analysis agent that automatically discovers and uses risk assessment, market data, and compliance agents as they become available.


For DevOps & Platform Teams โš™๏ธ

AI infrastructure out of the box.

  • Kubernetes-Native: Deploy with Helm charts - horizontal scaling, health checks, and service discovery included
  • Enterprise Observability: Built-in Grafana dashboards, distributed tracing, and centralized logging for complete system visibility
  • Zero-Touch Operations: Agents self-register, auto-discover dependencies, and gracefully handle failures without network restarts
  • Standards-Based: Leverage existing Kubernetes patterns - RBAC, network policies, service mesh integration, and security policies

Scale from 2 agents to 200+ with the same operational complexity.


For Support & Operations ๐Ÿ› ๏ธ

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 status provides instant network health assessment with actionable insights

For Engineering Leadership ๐Ÿ“ˆ

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."


Architecture Overview

MCP Mesh Architecture

MCP Mesh handles the complexity so you don't have to:

  • Zero Boilerplate: Just add @mesh.tool() - networking handled automatically
  • Dynamic Everything: Add/remove/upgrade services without touching other code
  • Complex Apps Made Simple: Financial services example shows 6+ interconnected agents
  • Production Ready: Built-in resilience, distributed observability, and scaling

The Magic: Write simple functions in Python, Java, or TypeScript, get distributed systems.


Key Features

Distributed Dynamic Dependency Injection (DDDI)

  • Distributed โ€” dependencies span machines, clouds, and runtimes (Python/TypeScript/Java)
  • Dynamic โ€” services discovered and injected at runtime, not compile time
  • Hot-swappable โ€” dependencies update without restarts via heartbeat-driven re-resolution
  • Pull-based discovery with runtime function injection โ€” no networking code required
  • Smart resolution with version constraints, capability matching, and tag scoring
  • LLM as a dependency โ€” treat LLMs as first-class injectable services with automatic tool discovery

Resilience

  • Registry as facilitator - agents communicate directly with fault tolerance
  • Self-healing architecture - automatic reconnection when services return
  • Graceful degradation - agents work standalone when dependencies unavailable
  • Background orchestration - mesh coordinates without blocking business logic

Observability

  • Complete observability stack - Grafana dashboards, Tempo tracing, Redis session management
  • Distributed tracing with OTLP export and cross-agent context propagation
  • Real-time trace streaming for multi-agent workflow monitoring
  • Advanced session management with Redis-backed stickiness across pod replicas

Developer Experience & Operations

  • Near-complete MCP protocol support for distributed networks
  • Enhanced proxy system with kwargs-driven auto-configuration for timeouts, retries, streaming
  • meshctl CLI for lifecycle management and network insights
  • Kubernetes native with scaling, health checks, and comprehensive observability

MCP Mesh vs Other AI Agent Frameworks

Feature Other Frameworks MCP Mesh
Zero-config Dependency Injection โŒ โœ…
Dynamic Agent Discovery & Hot Join/Leave โŒ โœ…
Cross-language Support โŒ โœ… Python + Java + TypeScript
Same Code: Local โ†’ Docker โ†’ K8s โŒ Rewrite needed โœ…
Developer CLI (scaffold, trace, status) โŒ โœ… meshctl
Kubernetes-native (Helm) โŒ DIY โœ…
Distributed Tracing (OpenTelemetry) โŒ DIY โœ… Grafana/Tempo
Auto-failover & Graceful Degradation โŒ โœ…
LLM as Dependency (Discovery + Failover) โŒ โœ…
Zero-config Testing (Topology Mocking) โŒ โœ…
Standard Protocol โŒ Custom โœ… MCP
Framework Lock-in High (classes) Low (decorators)
Lines of Code per Agent ~50+ ~10

See full comparison โ†’


Contributing

We welcome contributions from the community! MCP Mesh is designed to be a collaborative effort to advance the state of distributed MCP applications.

How to Contribute

  1. Check the Issues - Find good first issues or suggest new features
  2. Join Discussions - Share ideas and get help from the community
  3. Submit Pull Requests - Contribute code, documentation, or examples
  4. Follow our development guidelines - See project structure and coding standards below

Community & Support


License

This project is open source. License details will be provided in the LICENSE file.


Acknowledgments

  • Anthropic for creating the MCP protocol that inspired this project
  • FastMCP for providing excellent MCP server foundations
  • Kubernetes community for building the infrastructure platform that makes this possible
  • All the contributors who help make MCP Mesh better

๐Ÿ“š Learn More

  1. ๐Ÿ“š Full Documentation - Complete guides and reference
  2. โšก Quick Tutorial - Build your first distributed MCP agent
  3. ๐Ÿ’ฌ Join Discord - Connect with the community
  4. ๐Ÿ”ง Contribute - Help build the future of AI orchestration

Star the repo if MCP Mesh helps you build better AI systems! โญ

Release History

VersionChangesUrgencyDate
v1.3.4### Hardening + Spring AI M4. - Closes an audit-derived security pass (registry agent_id validation, header-propagation allowlist tightened from prefix-by-default to exact match, TLS auto fail-fast, proxy error sanitization), error-visibility improvements across Python/Java SDKs, meshctl signal handler leak fix, and stale doc/version cleanups. Spring AI upgraded to 2.0.0-M4 โ€” brings the Java integration suite to parity, 5 previously-disabled Java tests re-enabled.High4/18/2026
v1.3.2### Patch release. - Agent `name` and `agent_id` are now distinct fields across Python, TypeScript, and Java SDKs โ€” previously all three collapsed `name == agent_id`, making replicas behind a K8s Service indistinguishable. The topology dashboard now groups replicas of the same base name into a single node with a ร—N badge and an accordion drawer for per-replica details. meshctl `list` / `call` / `status` display and filter by full agent ID so replicas are individually addressable; registry `/prHigh4/15/2026
v1.3.1### Patch release. - Tutorial download artifacts (zips, tutorial-complete.html/txt) now generate and deploy in CI (#775). - Version bump script refactored to a handler-based design โ€” catches 363 files per bump vs 184 previously, eliminating the manual cleanup toil from #753. High4/14/2026
v1.3.0### Reliability and production-readiness release. meshctl stop works reliably across all scenarios, timeouts propagate through multi-hop agent chains, and the TripPlanner tutorial ships end-to-end from first agent to production deployment. ### ๐Ÿ”— X-Mesh-Timeout Propagation - **Header propagation across all SDKs** (#769): Python/TypeScript/Java SDKs set and propagate `X-Mesh-Timeout` header on outgoing mesh calls. Multi-hop LLM chains (gateway โ†’ planner โ†’ specialist โ†’ provider) now respect High4/14/2026
v1.2.0Observability and dashboard reliability release. Distributed tracing now works end-to-end across all runtimes, the dashboard is faster and lighter, and SQLite stability is improved. ### Observability - **Fix parent_span linkage** (#745): Python `ExecutionTracer` was publishing all spans as root spans, breaking cross-agent edge detection. Per-Edge Traffic and Total Calls now work correctly on the dashboard - **Total Calls metric** (#745): Counts every finalized trace once (single-agent andHigh4/9/2026
v1.1.0The dashboard release. Real-time monitoring, parallel tool execution, per-service TLS, and production-grade Kubernetes deployment with Helm charts. ### ๐Ÿ–ฅ๏ธ Web Dashboard - **Dashboard UI** (#665, #668, #669, #673, #677, #695): Real-time agent monitoring with 5 pages โ€” Dashboard overview (stats, traffic, events), Agents (table with capabilities), Topology (dependency graph), Traffic (per-edge metrics, token usage, latency), and Live (trace streaming) - **Docker image** (`mcpmesh/ui`) (#722High4/5/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

agentic-ai๐Ÿค– Explore AI agent architectures with agentic-ai, featuring ReAct agents, reflection-based designs, and modular LLM integrations using LangChain and LangGraph.main@2026-04-21
Ollama-Terminal-AgentAutomate shell tasks using a local Ollama model that plans, executes, and fixes commands without cloud or API dependencies.main@2026-04-21
heurist-agent-frameworkA flexible multi-interface AI agent framework for building agents with reasoning, tool use, memory, deep research, blockchain interaction, MCP, and agents-as-a-service.0.0.0
hybrid-orchestrator๐Ÿค– Implement hybrid human-AI orchestration patterns in Python to coordinate agents, manage sessions, and enable smooth AI-human handoffs.master@2026-04-21
claude-api-cost-optimization๐Ÿ’ฐ Optimize your Claude API usage to save 50-90% on costs with batching techniques and efficient request management.main@2026-04-21