asyncmcp can be installed using various Python package managers. Choose the one that best fits your workflow.

Package Managers

Requirements

asyncmcp requires Python 3.10 or higher.

Core Dependencies

asyncmcp automatically installs these core dependencies:
  • mcp - Model Context Protocol implementation
  • anyio - Async runtime support
  • httpx - HTTP client for webhook transport
  • boto3 - AWS SDK for SQS/SNS transports (optional)
  • starlette - ASGI framework for webhook server

Optional Dependencies

Depending on your transport choice, you may need additional packages:

Verify Installation

After installation, verify asyncmcp is properly installed:
import asyncmcp
print(f"asyncmcp version: {asyncmcp.__version__}")

# Check available transports
from asyncmcp import (
    SqsClientConfig,
    SnsSqsClientConfig, 
    WebhookClientConfig,
    StreamableHTTPWebhookClientConfig
)
print("✅ All transports available")

Development Setup

For contributing to asyncmcp or running examples:
1

Clone the Repository

git clone https://github.com/bh-rat/asyncmcp.git
cd asyncmcp
2

Install Dependencies

# Install with uv (recommended)
uv sync

# Or with pip
pip install -e .[dev,test]
3

Install Pre-commit Hooks

pre-commit install
Pre-commit hooks automatically format code and check for linting issues before commits.
4

Set Up LocalStack

# Install LocalStack
uv add localstack

# Start LocalStack
localstack start

# Set up test resources
uv run examples/setup.py
LocalStack should be running on http://localhost:4566

Environment Configuration

AWS Configuration

For AWS-based transports (SQS, SNS+SQS), configure your AWS credentials:
.env
# LocalStack configuration
AWS_ENDPOINT_URL=http://localhost:4566
AWS_REGION=us-east-1
AWS_ACCESS_KEY_ID=test
AWS_SECRET_ACCESS_KEY=test

Python Path Configuration

If running examples directly:
# Add src to Python path
export PYTHONPATH="${PYTHONPATH}:./src"

# Or use uv run (automatically handles paths)
uv run examples/website_server.py

Docker Setup

For containerized deployments:
FROM python:3.11-slim

WORKDIR /app

# Install dependencies
COPY pyproject.toml .
RUN pip install uv && uv pip install asyncmcp

# Copy application
COPY . .

# Run server
CMD ["python", "server.py"]

Troubleshooting

Next Steps