Catalog PyPI
Back to packageRELEASE DETAILS

1.0.0

PyPI

a3m-mcp-server

MCP server for A3M Router — parallel multi-LLM execution for AI agents

Published16 Aug 2026
Direct dependencies5
Transitive dependenciesNot calculated

README

Version 1.0.0 documentation

A3M Router MCP Server (Python)

MCP (Model Context Protocol) server for A3M Router — parallel multi-LLM execution for AI agents.

Allows any MCP-compatible AI agent (Claude Desktop, Cursor, Windsurf, Codex, n8n, etc.) to use A3M's intelligent routing and ensemble execution directly from Python.

Tools

ToolDescription
a3m_routeRoute a query to the optimal LLM provider — returns model, tier, cost, reasoning
a3m_ensembleExecute a query across multiple providers in parallel and merge results
a3m_classifyClassify query type (fast/creative/deep/code) and get provider recommendations
a3m_providersList all configured providers with cost and availability

Installation

# From source
cd python/mcp-server
pip install -e .

# Or install the package directly (when published)
pip install a3m-mcp-server

Configuration

Set environment variables:

# Required: A3M Router URL (must be running)
export A3M_BASE_URL=http://localhost:8787

# Optional
export A3M_API_KEY=not-needed  # default
export A3M_TIMEOUT=30.0

Start A3M Router

# Node.js way
npx a3m-router serve

# Python way
pip install a3m-router
a3m-router serve

Usage

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "a3m-router": {
      "command": "python",
      "args": ["-m", "a3m_mcp"],
      "env": {
        "A3M_BASE_URL": "http://localhost:8787"
      }
    }
  }
}

Cursor

Settings → Features → MCP Servers → Add:

Name: A3M Router
Command: python
Arguments: -m a3m_mcp

n8n MCP Trigger

Add MCP Trigger node with:

{
  "server": "a3m-router",
  "command": "python",
  "args": ["-m", "a3m_mcp"]
}

Direct stdio (pipe JSON-RPC)

# List tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | python -m a3m_mcp

# Call a3m_route
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"a3m_route","arguments":{"query":"Write a Python quicksort"}}}' | python -m a3m_mcp

Examples

Route a query

# a3m_route tool
Input:  {"query": "Write a Python function to sort a list"}
Output:
{
  "model": "groq/llama-3.3-70b-versatile",
  "tier": "cheap",
  "cost": 0.000012,
  "reasoning": "Code query detected, routing to fast coding provider",
  "classification": "code"
}

Ensemble execution

# a3m_ensemble tool
Input:  {"query": "Explain quantum computing in 3 sentences", "providers": ["groq", "google", "cerebras"]}
Output:
{
  "query": "Explain quantum computing in 3 sentences",
  "parallel_responses": [
    {"provider": "groq", "content": "Quantum computing is..."},
    {"provider": "google", "content": "At its core, quantum..."},
    {"provider": "cerebras", "content": "Quantum computing leverages..."}
  ],
  "best_answer": "Quantum computing is...",
  "stats": {"total_providers": 3, "successful": 3, "failed": 0}
}

Architecture

┌──────────────────────────────────────────────────────┐
│           MCP Client (Claude, Cursor, Codex, n8n)      │
└──────────────────────┬───────────────────────────────┘
                       │ MCP Protocol (stdio)
┌──────────────────────▼───────────────────────────────┐
│           A3M Router MCP Server (Python)              │
│                                                        │
│  a3m_route   a3m_ensemble   a3m_classify  a3m_providers │
└──────────────────────┬───────────────────────────────┘
                       │ HTTP API
┌──────────────────────▼───────────────────────────────┐
│              A3M Router (a3m-router serve)             │
│                                                        │
│  routeQuery()  parallelEnsemble()  providers           │
└───────┬────────────┬────────────┬─────────────────────┘
        │            │            │
   ┌────▼───┐  ┌────▼───┐  ┌────▼───┐
   │  Groq  │  │ Google │  │Cerebras│  ...
   └────────┘  └────────┘  └────────┘

Testing

cd python/mcp-server
pip install -e ".[dev]"
pytest

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
mcp
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mcp>=1.0.0runtime
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.24.0runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest>=7.4.0; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.21.0; extra == "dev"runtime
black
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
black>=23.0.0; extra == "dev"runtime

Distribution files

2 collected
a3m_mcp_server-1.0.0-py3-none-any.whl

bdist_wheel · 7.04 KB · Python py3

Source file
a3m_mcp_server-1.0.0.tar.gz

sdist · 6.33 KB · Python source

Source file

Repository

PENDING
das-rebel/a3m-router

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:40 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:0a26dbd5b91e0accaf57342e8a6cb6ef8a6c637c2a826f5990c94e127cdcec06

Other collected versions

View all collected versions →