mcp-mesh


Namemcp-mesh JSON
Version 0.1.8 PyPI version JSON
download
home_pageNone
SummaryKubernetes-native platform for distributed MCP applications
upload_time2025-06-22 21:29:46
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT
keywords agents ai distributed kubernetes mcp microservices orchestration
VCS
bugtrack_url
requirements aiohttp aiosqlite annotated-types anyio black certifi cfgv click coverage distlib fastapi fastmcp filelock h11 httpcore httpx httpx-sse identify idna iniconfig isort mcp mypy mypy_extensions nodeenv packaging pathspec platformdirs pluggy pre_commit pydantic pydantic-settings pydantic_core Pygments pytest pytest-asyncio pytest-cov python-dotenv python-multipart PyYAML requests ruff sniffio sse-starlette starlette typing-inspection typing_extensions uvicorn virtualenv
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MCP Mesh Python Runtime

Python runtime for the MCP Mesh service mesh framework.

## Installation

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

## Quick Start

```python
import mesh
from mcp_mesh 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)

## Documentation

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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mcp-mesh",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "agents, ai, distributed, kubernetes, mcp, microservices, orchestration",
    "author": null,
    "author_email": "MCP Mesh Contributors <noreply@mcp-mesh.dev>",
    "download_url": "https://files.pythonhosted.org/packages/54/1a/0241d2e7e77602fb9f68471ba0184a388983cceb4e5756f553b0fd2072ee/mcp_mesh-0.1.8.tar.gz",
    "platform": null,
    "description": "# MCP Mesh Python Runtime\n\nPython runtime for the MCP Mesh service mesh framework.\n\n## Installation\n\n```bash\npip install mcp-mesh\n```\n\n## Quick Start\n\n```python\nimport mesh\nfrom mcp_mesh import McpMeshAgent\n\n# Define your agent\n@mesh.agent(name=\"hello-world\", http_port=9090)\nclass HelloWorldAgent:\n    \"\"\"Hello World agent demonstrating MCP Mesh features.\"\"\"\n    pass\n\n# Create a greeting function with dependency injection\n@mesh.tool(\n    capability=\"greeting\",\n    dependencies=[\"date_service\"],\n    description=\"Greeting function with date dependency injection\"\n)\ndef greet(name: str = \"World\", systemDate: McpMeshAgent = None) -> str:\n    \"\"\"Greeting function with automatic dependency injection.\"\"\"\n    if systemDate is not None:\n        try:\n            current_date = systemDate()\n            return f\"Hello, {name}! Today is {current_date}\"\n        except Exception:\n            pass\n\n    return f\"Hello, {name}!\"\n\n# The runtime auto-initializes when you import mcp_mesh\n# Your functions are automatically registered with the mesh registry\n```\n\n## Features\n\n- **Automatic Registration**: Functions are automatically registered with the Go registry\n- **Health Monitoring**: Built-in health checks and heartbeats\n- **Dependency Injection**: Inject dependencies into your functions\n- **Service Discovery**: Find and use other services in the mesh\n- **Graceful Degradation**: Works even if registry is unavailable\n\n## Configuration\n\nThe runtime can be configured via environment variables:\n\n- `MCP_MESH_ENABLED`: Enable/disable runtime (default: \"true\")\n- `MCP_MESH_REGISTRY_URL`: Registry URL (default: \"http://localhost:8080\")\n- `MCP_MESH_AGENT_NAME`: Custom agent name (auto-generated if not set)\n\n## Documentation\n\nSee the [main repository](https://github.com/dhyansraj/mcp-mesh) for complete documentation.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Kubernetes-native platform for distributed MCP applications",
    "version": "0.1.8",
    "project_urls": {
        "Discussions": "https://github.com/dhyansraj/mcp-mesh/discussions",
        "Documentation": "https://github.com/dhyansraj/mcp-mesh/tree/main/docs",
        "Homepage": "https://github.com/dhyansraj/mcp-mesh",
        "Issues": "https://github.com/dhyansraj/mcp-mesh/issues",
        "Repository": "https://github.com/dhyansraj/mcp-mesh"
    },
    "split_keywords": [
        "agents",
        " ai",
        " distributed",
        " kubernetes",
        " mcp",
        " microservices",
        " orchestration"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "84fa53a827331c76e1acd7fd32767e80cb97aba1b316228c201945fbb118ee3d",
                "md5": "da801632ca271865fcb11392d803f785",
                "sha256": "8cdc0283cf9b31eaa7cf71ce66fdbc56dfd91ede328e4e0deebca1f8b33466ca"
            },
            "downloads": -1,
            "filename": "mcp_mesh-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "da801632ca271865fcb11392d803f785",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 374690,
            "upload_time": "2025-06-22T21:29:45",
            "upload_time_iso_8601": "2025-06-22T21:29:45.418749Z",
            "url": "https://files.pythonhosted.org/packages/84/fa/53a827331c76e1acd7fd32767e80cb97aba1b316228c201945fbb118ee3d/mcp_mesh-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "541a0241d2e7e77602fb9f68471ba0184a388983cceb4e5756f553b0fd2072ee",
                "md5": "a6aac716bf1fae5e19a9fd01673d1ad2",
                "sha256": "4318ba43688497beadb578868583f732be2e1c0968ac74de91bdd2f6c1e0e08f"
            },
            "downloads": -1,
            "filename": "mcp_mesh-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "a6aac716bf1fae5e19a9fd01673d1ad2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 210132,
            "upload_time": "2025-06-22T21:29:46",
            "upload_time_iso_8601": "2025-06-22T21:29:46.828114Z",
            "url": "https://files.pythonhosted.org/packages/54/1a/0241d2e7e77602fb9f68471ba0184a388983cceb4e5756f553b0fd2072ee/mcp_mesh-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-06-22 21:29:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dhyansraj",
    "github_project": "mcp-mesh",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.9.5"
                ]
            ]
        },
        {
            "name": "aiosqlite",
            "specs": [
                [
                    "==",
                    "0.20.0"
                ]
            ]
        },
        {
            "name": "annotated-types",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "anyio",
            "specs": [
                [
                    "==",
                    "4.9.0"
                ]
            ]
        },
        {
            "name": "black",
            "specs": [
                [
                    "==",
                    "25.1.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2025.4.26"
                ]
            ]
        },
        {
            "name": "cfgv",
            "specs": [
                [
                    "==",
                    "3.4.0"
                ]
            ]
        },
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.2.1"
                ]
            ]
        },
        {
            "name": "coverage",
            "specs": [
                [
                    "==",
                    "7.8.2"
                ]
            ]
        },
        {
            "name": "distlib",
            "specs": [
                [
                    "==",
                    "0.3.9"
                ]
            ]
        },
        {
            "name": "fastapi",
            "specs": [
                [
                    "==",
                    "0.115.6"
                ]
            ]
        },
        {
            "name": "fastmcp",
            "specs": [
                [
                    "==",
                    "2.8.0"
                ]
            ]
        },
        {
            "name": "filelock",
            "specs": [
                [
                    "==",
                    "3.18.0"
                ]
            ]
        },
        {
            "name": "h11",
            "specs": [
                [
                    "==",
                    "0.16.0"
                ]
            ]
        },
        {
            "name": "httpcore",
            "specs": [
                [
                    "==",
                    "1.0.9"
                ]
            ]
        },
        {
            "name": "httpx",
            "specs": [
                [
                    "==",
                    "0.28.1"
                ]
            ]
        },
        {
            "name": "httpx-sse",
            "specs": [
                [
                    "==",
                    "0.4.0"
                ]
            ]
        },
        {
            "name": "identify",
            "specs": [
                [
                    "==",
                    "2.6.12"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.10"
                ]
            ]
        },
        {
            "name": "iniconfig",
            "specs": [
                [
                    "==",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "isort",
            "specs": [
                [
                    "==",
                    "6.0.1"
                ]
            ]
        },
        {
            "name": "mcp",
            "specs": [
                [
                    "==",
                    "1.9.3"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        },
        {
            "name": "mypy_extensions",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "nodeenv",
            "specs": [
                [
                    "==",
                    "1.9.1"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "25.0"
                ]
            ]
        },
        {
            "name": "pathspec",
            "specs": [
                [
                    "==",
                    "0.12.1"
                ]
            ]
        },
        {
            "name": "platformdirs",
            "specs": [
                [
                    "==",
                    "4.3.8"
                ]
            ]
        },
        {
            "name": "pluggy",
            "specs": [
                [
                    "==",
                    "1.6.0"
                ]
            ]
        },
        {
            "name": "pre_commit",
            "specs": [
                [
                    "==",
                    "4.2.0"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.11.5"
                ]
            ]
        },
        {
            "name": "pydantic-settings",
            "specs": [
                [
                    "==",
                    "2.9.1"
                ]
            ]
        },
        {
            "name": "pydantic_core",
            "specs": [
                [
                    "==",
                    "2.33.2"
                ]
            ]
        },
        {
            "name": "Pygments",
            "specs": [
                [
                    "==",
                    "2.19.1"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    "==",
                    "8.4.0"
                ]
            ]
        },
        {
            "name": "pytest-asyncio",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "pytest-cov",
            "specs": [
                [
                    "==",
                    "6.1.1"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    "==",
                    "1.1.0"
                ]
            ]
        },
        {
            "name": "python-multipart",
            "specs": [
                [
                    "==",
                    "0.0.20"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    "==",
                    "0.11.13"
                ]
            ]
        },
        {
            "name": "sniffio",
            "specs": [
                [
                    "==",
                    "1.3.1"
                ]
            ]
        },
        {
            "name": "sse-starlette",
            "specs": [
                [
                    "==",
                    "2.3.6"
                ]
            ]
        },
        {
            "name": "starlette",
            "specs": [
                [
                    "==",
                    "0.41.3"
                ]
            ]
        },
        {
            "name": "typing-inspection",
            "specs": [
                [
                    "==",
                    "0.4.1"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    "==",
                    "4.14.0"
                ]
            ]
        },
        {
            "name": "uvicorn",
            "specs": [
                [
                    "==",
                    "0.34.3"
                ]
            ]
        },
        {
            "name": "virtualenv",
            "specs": [
                [
                    "==",
                    "20.31.2"
                ]
            ]
        }
    ],
    "lcname": "mcp-mesh"
}
        
Elapsed time: 0.68068s