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.2.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.2.0
File Size Uploaded Provenance Actions
mesh_mcp-0.2.0.tar.gz 59.1 kB Without provenance Details for mesh_mcp-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 100.2 kB

Release files / mesh_mcp-0.2.0.tar.gz

Download URL mesh_mcp-0.2.0.tar.gz
Size 59.1 kB
Tags Source
SHA-256 checksum
How to use checksums
07a0a8db94922fc1d2a92fe3c3beea7b368af2250c8b334a87174c0e7cfc81de
BLAKE2b-256 checksum
How to use checksums
7c73385cb6152001ffa1b356ec3d9adc2f003eddd96ce52da5fdc6d40ed54623
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.2.0-py3-none-any.whl

Download URL mesh_mcp-0.2.0-py3-none-any.whl
Size 41.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
495bb5c5563018bfac8d39ee70d161d571901493fd8d454293e8d9c5f5cb844e
BLAKE2b-256 checksum
How to use checksums
4179b4676506a8a7f2880a50c3add8a7099a3ac9fb093e9758db0abfa39862bd
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.2.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