Metadata-Version: 2.4
Name: mcp-mesh
Version: 0.5.6
Summary: Kubernetes-native platform for distributed MCP applications
Project-URL: Homepage, https://github.com/dhyansraj/mcp-mesh
Project-URL: Documentation, https://github.com/dhyansraj/mcp-mesh/tree/main/docs
Project-URL: Repository, https://github.com/dhyansraj/mcp-mesh
Project-URL: Issues, https://github.com/dhyansraj/mcp-mesh/issues
Project-URL: Discussions, https://github.com/dhyansraj/mcp-mesh/discussions
Author-email: MCP Mesh Contributors <noreply@mcp-mesh.dev>
License: MIT
License-File: LICENSE
Keywords: agents,ai,distributed,kubernetes,mcp,microservices,orchestration
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Distributed Computing
Requires-Python: >=3.11
Requires-Dist: aiohttp<4.0.0,>=3.8.0
Requires-Dist: click<9.0.0,>=8.1.0
Requires-Dist: fastapi<1.0.0,>=0.104.0
Requires-Dist: fastmcp<3.0.0,>=2.8.0
Requires-Dist: httpx<1.0.0,>=0.25.0
Requires-Dist: mcp<2.0.0,>=1.9.0
Requires-Dist: prometheus-client<1.0.0,>=0.19.0
Requires-Dist: pydantic<3.0.0,>=2.4.0
Requires-Dist: python-dateutil<3.0.0,>=2.8.0
Requires-Dist: pyyaml<7.0,>=6.0
Requires-Dist: redis<7.0.0,>=4.0.0
Requires-Dist: rich<14.0.0,>=13.0.0
Requires-Dist: typer<1.0.0,>=0.9.0
Requires-Dist: urllib3<3.0.0,>=2.1.0
Requires-Dist: uvicorn<1.0.0,>=0.24.0
Provides-Extra: dev
Requires-Dist: bandit[toml]>=1.7.0; extra == 'dev'
Requires-Dist: black>=25.0.0; extra == 'dev'
Requires-Dist: isort>=6.0.0; extra == 'dev'
Requires-Dist: jsonschema>=4.0.0; extra == 'dev'
Requires-Dist: mypy>=1.16.0; extra == 'dev'
Requires-Dist: pre-commit>=4.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=6.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.11.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mkdocs-material>=9.4.0; extra == 'docs'
Requires-Dist: mkdocs-mermaid2-plugin>=1.1.0; extra == 'docs'
Requires-Dist: mkdocs>=1.5.0; extra == 'docs'
Provides-Extra: kubernetes
Requires-Dist: kubernetes>=28.1.0; extra == 'kubernetes'
Requires-Dist: pykube-ng>=22.9.0; extra == 'kubernetes'
Description-Content-Type: text/markdown

# MCP Mesh Python Runtime

Python runtime for the MCP Mesh service mesh framework.

## Installation

```bash
pip install mcp-mesh
```

## Quick Start

```python
import mesh

# Import types from public API
from mesh.types import McpMeshAgent

# Define your agent
@mesh.agent(name="hello-world", http_port=9090)
class HelloWorldAgent:
    """Hello World agent demonstrating MCP Mesh features."""
    pass

# Create a greeting function with dependency injection
@mesh.tool(
    capability="greeting",
    dependencies=["date_service"],
    description="Greeting function with date dependency injection"
)
def greet(name: str = "World", systemDate: McpMeshAgent = None) -> str:
    """Greeting function with automatic dependency injection."""
    if systemDate is not None:
        try:
            current_date = systemDate()
            return f"Hello, {name}! Today is {current_date}"
        except Exception:
            pass

    return f"Hello, {name}!"

# The runtime auto-initializes when you import mcp_mesh
# Your functions are automatically registered with the mesh registry
```

## Features

- **Automatic Registration**: Functions are automatically registered with the Go registry
- **Health Monitoring**: Built-in health checks and heartbeats
- **Dependency Injection**: Inject dependencies into your functions
- **Service Discovery**: Find and use other services in the mesh
- **Graceful Degradation**: Works even if registry is unavailable

## Configuration

The runtime can be configured via environment variables:

- `MCP_MESH_ENABLED`: Enable/disable runtime (default: "true")
- `MCP_MESH_REGISTRY_URL`: Registry URL (default: "http://localhost:8080")
- `MCP_MESH_AGENT_NAME`: Custom agent name (auto-generated if not set)

## API Architecture

MCP Mesh uses a clear separation between public and private APIs:

- **`mesh`** - Public user API for decorators and types
- **`_mcp_mesh`** - Private internal implementation (do not import directly)

The underscore prefix on `_mcp_mesh` follows Python conventions to indicate internal/private packages. Users should only import from the `mesh` package to ensure compatibility across versions.

## Documentation

See the [main repository](https://github.com/dhyansraj/mcp-mesh) for complete documentation.
