Skip to main content

mesh-mcp

PyPI version Python 3.10+ License: MIT AWS Serverless

Cross-boundary API contract blast-radius engine for AI coding assistants (GitHub Copilot, Cursor, Claude Desktop, Antigravity).

When an engineer refactors or deletes an API schema property in order-service, AI assistants are typically blind to the other 20+ microservices in the company. mesh-mcp eliminates polyrepo blindness by building a unified Common Dependency Graph across local directories and remote GitHub repositories, reporting exact and multi-hop breaking changes before code reaches production.


⚡ Key Capabilities

  • Multi-Microservice AST Reachability: Uses Python AST parsing and OpenAPI 3.0/3.1 contract extraction to correlate endpoint call-sites, Pydantic model instantiations, and attribute accesses (order.tax_amount).
  • Multi-Hop Transitive Impact Analysis: Traces downstream breakages across hops (e.g. Order.tax_amount → billing-service/client.py → Invoice → notification-service/consumer.py).
  • Dual-Mode Repository Scanning: Index both local workspace directories and remote GitHub repositories in the same mesh.
  • OAuth 2.0 Device Flow: Zero-manual-PAT setup. Authenticate against private GitHub organizations with a one-time browser verification code.
  • AWS Serverless Cloud Ready: Deploy as a remote HTTP/JSON-RPC MCP server on AWS Lambda Function URLs with 100% scale-to-zero and zero idle cost.

📦 Installation

pip install mesh-mcp

For AWS deployment capabilities:

pip install "mesh-mcp[aws]"

⚙️ Configuration: mesh.yaml

Create a mesh.yaml in your workspace root specifying your microservices:

version: "1"
workspace:
  name: "ecommerce-microservices"
  description: "Cross-repo dependency network"

settings:
  cache_dir: "E:/mesh-mcp/.cache/repos"
  github:
    auth_type: "oauth"         # "oauth" | "token" | "none"

repositories:
  # Local microservice being actively developed
  - name: "order-service"
    type: "local"
    path: "./services/order_service"
    role: "producer"

  # Composite service consuming order-service
  - name: "billing-service"
    type: "local"
    path: "./services/billing_service"
    role: "composite"

  # Remote GitHub microservice
  - name: "notification-service"
    type: "github"
    owner: "MyOrg"
    repo: "notification-service"
    branch: "main"
    role: "consumer"

🔌 Connecting to AI Coding Assistants

1. VS Code / GitHub Copilot

Add to .vscode/mcp.json in your workspace:

{
  "mcpServers": {
    "mesh-mcp": {
      "command": "python",
      "args": ["-m", "mesh_mcp.server", "."]
    }
  }
}

2. Cursor IDE

Add to .cursor/mcp.json (or under Cursor Settings → Features → MCP):

{
  "mcpServers": {
    "mesh-mcp": {
      "command": "python",
      "args": ["-m", "mesh_mcp.server", "."]
    }
  }
}

3. Remote Cloud MCP Server (Zero Local Clones)

If your team deploys mesh-mcp to AWS Lambda Function URLs, you can connect Copilot or Cursor directly over HTTP without cloning other microservices:

{
  "mcpServers": {
    "mesh-mcp-cloud": {
      "url": "https://<your-lambda-url>.lambda-url.us-east-1.on.aws/",
      "type": "http"
    }
  }
}

🛠️ Available MCP Tools

AI assistants equipped with mesh-mcp automatically call these tools during refactoring:

Tool Parameters Description
list_contracts none Lists all detected OpenAPI contracts, schemas, and endpoints across all repositories.
trace_contract contract_name Traces a specific contract or schema definition location and known consumer call-sites.
find_consumers schema_name Finds all source files referencing a schema (e.g. 'Order') or field (e.g. 'Order.tax_amount').
check_blast_radius schema_name, change_description Core Tool: Performs field-level direct and transitive blast-radius analysis across all repositories.
refresh_mesh none Force-refreshes remote GitHub clones and re-indexes the graph in memory.
check_auth_status none Checks GitHub authentication status.
auth_github none Initiates OAuth 2.0 Device Flow, providing a verification code and link.

🚀 Deploying to AWS Lambda (Serverless Cloud)

Deploy mesh-mcp as a hosted, scale-to-zero remote MCP endpoint:

  1. Ensure AWS CLI is authenticated (aws configure).
  2. Run the deployment script:
    python deploy_aws.py
    
  3. The script packages the Linux binary wheels, creates the IAM execution role, deploys the Lambda function, and outputs your live HTTPS Function URL.

🧪 Running Tests

pytest tests/unit

📄 License

MIT © Nagachaitanya

Metadata

Release files for mesh-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mesh-mcp 0.3.0
File Size Uploaded Provenance Actions
mesh_mcp-0.3.0.tar.gz 71.5 kB Without provenance Details for mesh_mcp-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mesh-mcp 0.3.0
File Interpreter ABI Platform Actions
mesh_mcp-0.3.0-py3-none-any.whl Python 3 none any Details for mesh_mcp-0.3.0-py3-none-any.whl

Total release size: 125.7 kB

Release files / mesh_mcp-0.3.0.tar.gz

Download URL mesh_mcp-0.3.0.tar.gz
Size 71.5 kB
Tags Source
SHA-256 checksum
How to use checksums
827415dbfbb4984d043433b6c65c49564ff9515344b2721d9192920b9263ad28
BLAKE2b-256 checksum
How to use checksums
c5544f41cf98df59307e3e7615e075fe7024bd2e52c552437f8be29bbe057725
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / mesh_mcp-0.3.0-py3-none-any.whl

Download URL mesh_mcp-0.3.0-py3-none-any.whl
Size 54.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f7e9b2795e1a1ef5c8a9e285d4a2c14787aa9f39a83f37805c0c4482ebbb5e5c
BLAKE2b-256 checksum
How to use checksums
9fd5cf3bf3e82ad164f7d46693156818cad7e72f87059150f0abc6cdf3acf6f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for mesh-mcp 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page