Skip to main content
Glama

MeshAI MCP Server

MeshAI MCP Server

A standalone Model Context Protocol (MCP) server that enables Claude Code and other MCP-compatible tools to leverage MeshAI's multi-agent orchestration capabilities.

🚀 Features

  • 🤖 Multi-Agent Workflows: 6 pre-configured workflows for code review, refactoring, debugging, documentation, and more
  • 🧠 Intelligent Agent Selection: Automatically selects appropriate AI agents based on task content
  • 🔧 Framework Agnostic: Works with agents built on LangChain, CrewAI, AutoGen, and other frameworks
  • 🐋 Docker Ready: Full Docker support with development and production configurations
  • 📦 Easy Installation: Available as PyPI package or Docker container
  • 🔄 Fallback Protocol: Works without official MCP package using built-in implementation

📋 Quick Start

Option 1: Docker with stdio (Claude Code)

# Run with Docker for Claude Code integration docker run -it \ -e MESHAI_API_URL=http://localhost:8080 \ -e MESHAI_API_KEY=your-api-key \ ghcr.io/meshailabs/meshai-mcp-server:latest # Or with docker-compose git clone https://github.com/meshailabs/meshai-mcp.git cd meshai-mcp cp .env.template .env # Edit with your settings docker-compose up

Option 2: HTTP Server Mode

# Run as HTTP API server docker run -p 8080:8080 \ -e MESHAI_API_URL=http://localhost:8080 \ ghcr.io/meshailabs/meshai-mcp-server:latest \ meshai-mcp-server serve --transport http # Test the HTTP API curl -H "Authorization: Bearer dev_your-api-key" \ http://localhost:8080/v1/tools

Option 3: PyPI Installation

# Install from PyPI pip install meshai-mcp-server # Run in stdio mode (for Claude Code) export MESHAI_API_URL=http://localhost:8080 export MESHAI_API_KEY=your-api-key meshai-mcp-server # Or run as HTTP server meshai-mcp-server serve --transport http --port 8080

Option 4: Development Setup

# Clone and install git clone https://github.com/meshailabs/meshai-mcp.git cd meshai-mcp pip install -e ".[dev]" # Run in development mode python -m meshai_mcp.cli serve --dev --transport http

🔧 Configuration

Environment Variables

VariableDescriptionDefaultRequired
MESHAI_API_URLMeshAI API endpointhttp://localhost:8080Yes
MESHAI_API_KEYAPI key for authenticationNoneFor stdio mode
MESHAI_LOG_LEVELLogging levelINFONo

🔐 Authentication

For HTTP Mode:
  • API Key Required: Pass via Authorization: Bearer YOUR_API_KEY header
  • Development Keys: Use dev_ prefix for testing (e.g., dev_test123)
  • Rate Limiting: 100 requests/hour for development, configurable for production
For stdio Mode:
  • Environment Variable: Set MESHAI_API_KEY for backend communication
  • No HTTP Auth: Authentication handled by Claude Code

Claude Code Integration

{ "servers": { "meshai": { "command": "docker", "args": [ "run", "--rm", "-i", "-e", "MESHAI_API_URL=${MESHAI_API_URL}", "-e", "MESHAI_API_KEY=${MESHAI_API_KEY}", "ghcr.io/meshailabs/meshai-mcp-server:latest" ], "transport": "stdio" } } }
HTTP Transport (For hosted deployments):
{ "servers": { "meshai": { "command": "curl", "args": [ "-X", "POST", "-H", "Authorization: Bearer ${MESHAI_MCP_API_KEY}", "-H", "Content-Type: application/json", "-d", "@-", "https://your-mcp-server.com/v1/mcp" ], "transport": "http" } } }
Local pip Installation:
{ "servers": { "meshai": { "command": "meshai-mcp-server", "transport": "stdio", "env": { "MESHAI_API_URL": "${MESHAI_API_URL}", "MESHAI_API_KEY": "${MESHAI_API_KEY}" } } } }

🛠️ Available Workflows

1. Code Review (mesh_code_review)

Comprehensive code review with security and best practices analysis.

  • Agents: code-reviewer, security-analyzer, best-practices-advisor

2. Refactor & Optimize (mesh_refactor_optimize)

Refactor code with performance optimization and test generation.

  • Agents: code-optimizer, performance-analyzer, test-generator

3. Debug & Fix (mesh_debug_fix)

Debug issues and generate tests for fixes.

  • Agents: debugger-expert, log-analyzer, test-generator

4. Document & Explain (mesh_document_explain)

Generate documentation and explanations with examples.

  • Agents: doc-writer, code-explainer, example-generator

5. Architecture Review (mesh_architecture_review)

Comprehensive architecture analysis and recommendations.

  • Agents: system-architect, performance-analyst, security-auditor

6. Feature Development (mesh_feature_development)

End-to-end feature development from design to testing.

  • Agents: product-designer, senior-developer, test-engineer, doc-writer

🌐 HTTP API Usage

Starting HTTP Server

# Using Docker docker run -p 8080:8080 \ -e MESHAI_API_URL=http://localhost:8080 \ ghcr.io/meshailabs/meshai-mcp-server:latest \ meshai-mcp-server serve --transport http # Using pip meshai-mcp-server serve --transport http --port 8080

API Endpoints

EndpointMethodDescriptionAuth Required
/healthGETHealth checkNo
/v1/toolsGETList available toolsYes
/v1/workflowsGETList workflowsYes
/v1/resourcesGETList resourcesYes
/v1/mcpPOSTExecute MCP requestYes
/v1/statsGETUsage statisticsYes
/docsGETAPI documentationNo

Usage Examples

# Health check (no auth required) curl http://localhost:8080/health # List available tools curl -H "Authorization: Bearer dev_test123" \ http://localhost:8080/v1/tools # Execute a workflow curl -X POST \ -H "Authorization: Bearer dev_test123" \ -H "Content-Type: application/json" \ -d '{"method":"mesh_code_review","id":"test","params":{"files":"app.py"}}' \ http://localhost:8080/v1/mcp # Get usage stats curl -H "Authorization: Bearer dev_test123" \ http://localhost:8080/v1/stats

🐋 Docker Deployment

Development Setup

# Development with hot reload docker-compose -f docker-compose.dev.yml up # Run tests docker-compose -f docker-compose.dev.yml run --rm mcp-tests # With mock API docker-compose -f docker-compose.dev.yml --profile mock up

Production Considerations

For production deployment:

  • Use proper API key management
  • Set up rate limiting and monitoring
  • Configure HTTPS/TLS termination
  • Implement proper logging and metrics
  • Consider using a reverse proxy (nginx, Traefik)
  • Set resource limits and scaling policies

🧪 Development

Setup Development Environment

# Clone repository git clone https://github.com/meshailabs/meshai-mcp.git cd meshai-mcp # Install in development mode pip install -e ".[dev]" # Install pre-commit hooks pre-commit install # Run tests pytest tests/ -v # Run with coverage pytest tests/ -v --cov=src/meshai_mcp --cov-report=html

Code Quality

# Format code black src tests isort src tests # Type checking mypy src/meshai_mcp # Linting flake8 src tests

Building Docker Images

# Build production image docker build -t meshai-mcp-server . # Build development image docker build -f Dockerfile.dev --target development -t meshai-mcp-server:dev . # Multi-architecture build docker buildx build --platform linux/amd64,linux/arm64 -t meshai-mcp-server:multi .

📚 Documentation

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Run the test suite
  6. Submit a pull request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🆘 Support

🗺️ Roadmap

  • HTTP transport support for MCP
  • WebSocket transport for real-time communication
  • Custom workflow configuration via YAML
  • Plugin system for custom agents
  • Prometheus metrics integration
  • Official MCP package integration when available

Built with ❤️ by the MeshAI Labs team.

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables Claude Code and other MCP-compatible tools to leverage MeshAI's multi-agent orchestration capabilities for code review, refactoring, debugging, documentation, architecture analysis, and feature development. Automatically selects appropriate AI agents based on task content and works with agents built on LangChain, CrewAI, AutoGen, and other frameworks.

  1. 🚀 Features
    1. 📋 Quick Start
      1. Option 1: Docker with stdio (Claude Code)
      2. Option 2: HTTP Server Mode
      3. Option 3: PyPI Installation
      4. Option 4: Development Setup
    2. 🔧 Configuration
      1. Environment Variables
      2. 🔐 Authentication
      3. Claude Code Integration
    3. 🛠️ Available Workflows
      1. 1. Code Review (mesh_code_review)
      2. 2. Refactor & Optimize (mesh_refactor_optimize)
      3. 3. Debug & Fix (mesh_debug_fix)
      4. 4. Document & Explain (mesh_document_explain)
      5. 5. Architecture Review (mesh_architecture_review)
      6. 6. Feature Development (mesh_feature_development)
    4. 🌐 HTTP API Usage
      1. Starting HTTP Server
      2. API Endpoints
      3. Usage Examples
    5. 🐋 Docker Deployment
      1. Development Setup
      2. Production Considerations
    6. 🧪 Development
      1. Setup Development Environment
      2. Code Quality
      3. Building Docker Images
    7. 📚 Documentation
      1. 🤝 Contributing
        1. Development Workflow
      2. 📝 License
        1. 🆘 Support
          1. 🗺️ Roadmap

            Related MCP Servers

            • -
              security
              A
              license
              -
              quality
              Facilitates integration with Claude Desktop to run AI agents and execute purchased actions without code, leveraging the Model Context Protocol framework.
              Last updated -
              1
              TypeScript
              GPL 3.0
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that enables Claude users to access specialized OpenAI agents (web search, file search, computer actions) and a multi-agent orchestrator through the MCP protocol.
              Last updated -
              9
              Python
              • Linux
              • Apple
            • A
              security
              A
              license
              A
              quality
              An AI-powered Model Context Protocol server for Claude Code that provides code intelligence tools including codebase analysis, task management, component generation, and deployment configuration.
              Last updated -
              23
              14
              JavaScript
              GPL 3.0
            • A
              security
              A
              license
              A
              quality
              Connects Blender to Claude AI through the Model Context Protocol, enabling AI-assisted 3D modeling, scene creation, and manipulation through natural language commands.
              Last updated -
              17
              Python
              MIT License
              • Apple
              • Linux

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/meshailabs-org/meshai-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server