{"id":29271794,"url":"https://github.com/dhyansraj/mcp-mesh","last_synced_at":"2026-05-21T03:05:25.242Z","repository":{"id":300146859,"uuid":"994771840","full_name":"dhyansraj/mcp-mesh","owner":"dhyansraj","description":"Enterprise-grade distributed AI agent framework | Develop → Deploy → Observe | K8s-native | Dynamic DI | Auto-failover | Multi-LLM | Python + Java + TypeScript","archived":false,"fork":false,"pushed_at":"2026-03-30T12:05:03.000Z","size":120344,"stargazers_count":31,"open_issues_count":7,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-03-30T14:11:27.486Z","etag":null,"topics":["agentic-ai","ai-agents","ai-agents-framework","distributed-ai","java","kubernetes","mcp","mcp-mesh","modelcontextprotocol","python","typescript"],"latest_commit_sha":null,"homepage":"https://mcp-mesh.ai","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhyansraj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security/agent-to-agent-mtls.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-02T13:06:49.000Z","updated_at":"2026-03-30T12:05:06.000Z","dependencies_parsed_at":"2026-02-03T04:05:29.360Z","dependency_job_id":null,"html_url":"https://github.com/dhyansraj/mcp-mesh","commit_stats":null,"previous_names":["dhyansraj/mcp-mesh"],"tags_count":98,"template":false,"template_full_name":null,"purl":"pkg:github/dhyansraj/mcp-mesh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyansraj%2Fmcp-mesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyansraj%2Fmcp-mesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyansraj%2Fmcp-mesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyansraj%2Fmcp-mesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhyansraj","download_url":"https://codeload.github.com/dhyansraj/mcp-mesh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhyansraj%2Fmcp-mesh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agentic-ai","ai-agents","ai-agents-framework","distributed-ai","java","kubernetes","mcp","mcp-mesh","modelcontextprotocol","python","typescript"],"created_at":"2025-07-05T00:01:40.883Z","updated_at":"2026-05-14T23:15:44.500Z","avatar_url":"https://github.com/dhyansraj.png","language":"Python","funding_links":[],"categories":["Frameworks"],"sub_categories":["Common Lisp"],"readme":"# \u003cimg src=\"docs/assets/images/logo-cyan.svg\" height=\"32\" alt=\"\"\u003e MCP Mesh\n\n[![Release](https://github.com/dhyansraj/mcp-mesh/actions/workflows/release.yml/badge.svg?event=release)](https://github.com/dhyansraj/mcp-mesh/actions/workflows/release.yml)\n[![Python Version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://python.org)\n[![Java Version](https://img.shields.io/badge/java-17+-orange.svg)](https://openjdk.org)\n[![TypeScript](https://img.shields.io/badge/typescript-5.0+-blue.svg)](https://www.typescriptlang.org)\n[![Go Version](https://img.shields.io/badge/go-1.23+-blue.svg)](https://golang.org)\n[![Rust](https://img.shields.io/badge/rust-stable-orange.svg)](https://www.rust-lang.org)\n[![PyPI](https://img.shields.io/pypi/v/mcp-mesh?color=blue\u0026logo=pypi\u0026logoColor=white)](https://pypi.org/project/mcp-mesh/)\n[![npm](https://img.shields.io/npm/v/@mcpmesh/cli?color=red\u0026logo=npm\u0026logoColor=white)](https://www.npmjs.com/package/@mcpmesh/cli)\n[![Maven Central](https://img.shields.io/maven-central/v/io.mcp-mesh/mcp-mesh-spring-boot-starter?color=orange\u0026logo=apachemaven\u0026logoColor=white)](https://central.sonatype.com/artifact/io.mcp-mesh/mcp-mesh-spring-boot-starter)\n[![Docker](https://img.shields.io/badge/docker-hub-blue.svg?logo=docker\u0026logoColor=white)](https://hub.docker.com/u/mcpmesh)\n[![Helm](https://img.shields.io/badge/helm-charts-blue.svg?logo=helm\u0026logoColor=white)](https://github.com/dhyansraj/mcp-mesh/pkgs/container/mcp-mesh%2Fmcp-mesh-core)\n[![Discord](https://img.shields.io/discord/1386739813083779112?color=7289DA\u0026label=Discord\u0026logo=discord\u0026logoColor=white)](https://discord.gg/KDFDREphWn)\n[![YouTube](https://img.shields.io/badge/YouTube-MCPMesh-red?logo=youtube\u0026logoColor=white)](https://www.youtube.com/@MCPMesh)\n[![License](https://img.shields.io/badge/license-Open%20Source-blue.svg)](#license)\n\n\u003e **The future of AI is not one large model, but many specialized agents working together.**\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://mcp-mesh.ai/\"\u003e\u003cstrong\u003e📚 Documentation\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"https://mcp-mesh.ai/python/getting-started/\"\u003e\u003cstrong\u003e🚀 Quick Start\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"https://www.youtube.com/@MCPMesh\"\u003e\u003cstrong\u003e🎬 YouTube\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"https://discord.gg/KDFDREphWn\"\u003e\u003cstrong\u003e💬 Discord\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## ⚡ Getting Started\n\n```bash\n# Install the CLI\nnpm install -g @mcpmesh/cli\n\n# Explore commands\nmeshctl --help\n\n# Built-in documentation\nmeshctl man\n```\n\n**[Python Quick Start →](https://mcp-mesh.ai/python/getting-started/)** | **[Java Quick Start →](https://mcp-mesh.ai/java/getting-started/)** | **[TypeScript Quick Start →](https://mcp-mesh.ai/typescript/getting-started/)**\n\n---\n\n## 🎯 Why MCP Mesh?\n\nYou write the agent logic. The mesh discovers, connects, heals, and traces — across languages, machines, and clouds.\n\n---\n\n### **For Developers 👩‍💻**\n\n**Stop fighting infrastructure. Start building intelligence.**\n\n- **Zero Boilerplate**: Simple decorators/functions replace hundreds of lines of networking code\n- **Python, Java \u0026 TypeScript**: Write MCP servers as simple functions in your preferred language - no manual client/server setup\n- **Web Framework Integration**: Inject MCP agents directly into FastAPI (Python), Spring Boot (Java), or Express (TypeScript) APIs seamlessly\n- **LLM as Dependencies**: Inject LLMs just like MCP agents - dynamic prompts with Jinja2 (Python), FreeMarker (Java), or Handlebars (TypeScript)\n- **Seamless Development Flow**: Code locally, test with Docker Compose, deploy to Kubernetes - same code, zero changes\n- **kubectl-like Management**: `meshctl` - a familiar command-line tool to run, monitor, and manage your entire agent network\n\n```python\nfrom fastmcp import FastMCP\nimport mesh\n\napp = FastMCP(\"TripPlanner\")\n\n@app.tool()\n@mesh.tool(\n    capability=\"plan_trip\",\n    dependencies=[\n        {\"capability\": \"weather\", \"tags\": [\"+claude\"]},\n        {\"capability\": \"hotels\",  \"tags\": [\"+gpt\"]},\n        {\"capability\": \"flights\"},\n        {\"capability\": \"budget\",  \"tags\": [\"+claude\"]},\n    ],\n)\nasync def plan_trip(\n    destination: str,\n    dates: str,\n    weather: mesh.McpMeshTool = None,\n    hotels:  mesh.McpMeshTool = None,\n    flights: mesh.McpMeshTool = None,\n    budget:  mesh.McpMeshTool = None,\n) -\u003e TripPlan:\n    forecast = await weather(destination=destination, dates=dates)\n    options  = await hotels(destination=destination, dates=dates)\n    routes   = await flights(destination=destination, dates=dates)\n    cost     = await budget(routes=routes, options=options)\n    return TripPlan(forecast, options, routes, cost)\n\n@mesh.agent(name=\"trip-planner\", auto_run=True)\nclass TripAgent: pass\n```\n\n\u003e **Four distributed calls, composed like a local function.** Each dependency could live in this process, another machine, another language. Mesh handles discovery, transport, retry, and failover — your function stays a function. Each dep is just another `@mesh.tool`, defined the same way — in this agent or another.\n\u003e\n\u003e **Any dependency can be a plain tool _or_ an LLM agent — your code can't tell the difference.** `weather` could be a REST API *or* a Claude-powered reasoning agent returning a typed pydantic forecast. `+claude` means prefer the reasoning agent; if it dies, mesh auto-rewires to the API. When Claude recovers, mesh rewires back. No deploy, no config, no code change.\n\u003e\n\u003e **Routing stays in Python, not YAML.** See how below.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eSee how the Claude-powered weather agent is built (10 lines)\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom fastmcp import FastMCP\nimport mesh\n\napp = FastMCP(\"ClaudeWeather\")\n\n@app.tool()\n@mesh.llm(\n    system_prompt=\"file://prompts/weather.j2\",\n    provider={\"capability\": \"llm\", \"tags\": [\"+claude\"]},\n)\n@mesh.tool(capability=\"weather\", tags=[\"+claude\"])\ndef weather(destination: str, dates: str,\n            llm: mesh.MeshLlmAgent = None) -\u003e Forecast:\n    return llm(f\"Forecast for {destination} on {dates}\")\n\n@mesh.agent(name=\"claude-weather\", auto_run=True)\nclass Agent: pass\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eRoute by Python if/else, not config\u003c/b\u003e\u003c/summary\u003e\n\n```python\n# Two providers of the same capability, wired at runtime\nweather = reasoning_weather if user.wants_explanation else api_weather\nforecast = await weather(destination, dates)\n```\n\n\u003c/details\u003e\n\n**[See the full TripPlanner tutorial →](https://mcp-mesh.ai/tutorial/)**\n\n---\n\n### **For Solution Architects 🏗️**\n\n**Design intelligent systems, not complex integrations.**\n\n- **Agent-Centric Architecture**: Design specialized agents with clear capabilities and dependencies, not monolithic systems\n- **Dynamic Intelligence**: Agents get smarter automatically when new capabilities come online - no reconfiguration needed\n- **Domain-Driven Design**: Solve business problems with ecosystems of focused agents that can be designed and developed independently\n- **Composable Solutions**: Mix and match agents to create new business capabilities without custom integration code\n\n**Example**: Deploy a financial analysis agent that automatically discovers and uses risk assessment, market data, and compliance agents as they become available.\n\n---\n\n### **For DevOps \u0026 Platform Teams ⚙️**\n\n**AI infrastructure out of the box.**\n\n- **Kubernetes-Native**: Deploy with Helm charts - horizontal scaling, health checks, and service discovery included\n- **Enterprise Observability**: Built-in Grafana dashboards, distributed tracing, and centralized logging for complete system visibility\n- **Zero-Touch Operations**: Agents self-register, auto-discover dependencies, and gracefully handle failures without network restarts\n- **Standards-Based**: Leverage existing Kubernetes patterns - RBAC, network policies, service mesh integration, and security policies\n\n**Scale from 2 agents to 200+ with the same operational complexity.**\n\n---\n\n### **For Support \u0026 Operations 🛠️**\n\n**Complete visibility and zero-downtime operations.**\n\n- **Real-Time Network Monitoring**: See every agent, dependency, and health status in live dashboards\n- **Intelligent Scaling**: Agents scale independently based on demand - no cascading performance issues\n- **Graceful Failure Handling**: Agents degrade gracefully when dependencies are unavailable, automatically reconnect when services return\n- **One-Click Diagnostics**: `meshctl status` provides instant network health assessment with actionable insights\n\n---\n\n### **For Engineering Leadership 📈**\n\n**Transform AI experiments into production revenue.**\n\n- **Accelerated Time-to-Market**: Move from PoC to production deployment in weeks, not months\n- **Cross-Team Collaboration**: Enable different departments to build agents that automatically enhance each other's capabilities\n- **Risk Mitigation**: Proven patterns help ensure reliable AI deployments that scale with your business\n- **Future-Proof Architecture**: Add new AI capabilities without disrupting existing systems\n\n**Turn your AI strategy from \"promising experiments\" to \"competitive advantage in production.\"**\n\n---\n\n## Architecture Overview\n\n![MCP Mesh Architecture](images/mcp-mesh_arch.png)\n\n**MCP Mesh handles the complexity so you don't have to:**\n\n- **Zero Boilerplate**: Just add `@mesh.tool()` - networking handled automatically\n- **Dynamic Everything**: Add/remove/upgrade services without touching other code\n- **Complex Apps Made Simple**: Financial services example shows 6+ interconnected agents\n- **Production Ready**: Built-in resilience, distributed observability, and scaling\n\n**The Magic**: Write simple functions in Python, Java, or TypeScript, get distributed systems.\n\n---\n\n## Key Features\n\n### **Distributed Dynamic Dependency Injection (DDDI)**\n\n- **Distributed** — dependencies span machines, clouds, and runtimes (Python/TypeScript/Java)\n- **Dynamic** — services discovered and injected at runtime, not compile time\n- **Hot-swappable** — dependencies update without restarts via heartbeat-driven re-resolution\n- **Pull-based discovery** with runtime function injection — no networking code required\n- **Smart resolution** with version constraints, capability matching, and tag scoring\n- **LLM as a dependency** — treat LLMs as first-class injectable services with automatic tool discovery\n\n### **Resilience**\n\n- **Registry as facilitator** - agents communicate directly with fault tolerance\n- **Self-healing architecture** - automatic reconnection when services return\n- **Graceful degradation** - agents work standalone when dependencies unavailable\n- **Background orchestration** - mesh coordinates without blocking business logic\n\n### **Observability**\n\n- **Complete observability stack** - Grafana dashboards, Tempo tracing, Redis session management\n- **Distributed tracing** with OTLP export and cross-agent context propagation\n- **Real-time trace streaming** for multi-agent workflow monitoring\n- **Advanced session management** with Redis-backed stickiness across pod replicas\n\n### **Developer Experience \u0026 Operations**\n\n- **Near-complete MCP protocol support** for distributed networks\n- **Enhanced proxy system** with kwargs-driven auto-configuration for timeouts, retries, streaming\n- **meshctl CLI** for lifecycle management and network insights\n- **Kubernetes native** with scaling, health checks, and comprehensive observability\n\n---\n\n## Contributing\n\nWe welcome contributions from the community! MCP Mesh is designed to be a collaborative effort to advance the state of distributed MCP applications.\n\n### How to Contribute\n\n1. **[Check the Issues](https://github.com/dhyansraj/mcp-mesh/issues)** - Find good first issues or suggest new features\n2. **[Join Discussions](https://github.com/dhyansraj/mcp-mesh/discussions)** - Share ideas and get help from the community\n3. **[Submit Pull Requests](https://github.com/dhyansraj/mcp-mesh/pulls)** - Contribute code, documentation, or examples\n4. **Follow our development guidelines** - See project structure and coding standards below\n\n---\n\n## Community \u0026 Support\n\n- **[Discord](https://discord.gg/KDFDREphWn)** - Real-time help and discussions\n- **[GitHub Discussions](https://github.com/dhyansraj/mcp-mesh/discussions)** - Share ideas and ask questions\n- **[Issues](https://github.com/dhyansraj/mcp-mesh/issues)** - Report bugs or request features\n- **[Examples](examples/)** - Working code examples and deployment patterns\n\n---\n\n## License\n\nThis project is open source. License details will be provided in the LICENSE file.\n\n---\n\n## Acknowledgments\n\n- **[Anthropic](https://anthropic.com)** for creating the MCP protocol that inspired this project\n- **[FastMCP](https://github.com/jlowin/fastmcp)** for providing excellent MCP server foundations\n- **[Kubernetes](https://kubernetes.io)** community for building the infrastructure platform that makes this possible\n- All the **contributors** who help make MCP Mesh better\n\n---\n\n## 📚 Learn More\n\n1. **[📚 Full Documentation](https://mcp-mesh.ai/)** - Complete guides and reference\n2. **[⚡ Quick Tutorial](https://mcp-mesh.ai/python/getting-started/)** - Build your first distributed MCP agent\n3. **[💬 Join Discord](https://discord.gg/KDFDREphWn)** - Connect with the community\n4. **[🔧 Contribute](https://mcp-mesh.ai/contributing/)** - Help build the future of AI orchestration\n\n**Star the repo** if MCP Mesh helps you build better AI systems! ⭐\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhyansraj%2Fmcp-mesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhyansraj%2Fmcp-mesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhyansraj%2Fmcp-mesh/lists"}