Observed since 20 Oct, 22:40 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
A Python framework for building multi-agent MCP servers
A Python framework for building multi-agent MCP (Model Context Protocol) servers.
Compose multi-agent systems with sequential, parallel, conditional, and map-reduce pipeline patterns, agent lifecycle hooks, and structured outputs — and expose the result as MCP tools for Claude, VSCode, or any MCP-compatible client.
Agent, LLMAgent, FunctionAgent with lifecycle hookspip install agent-mcp-framework
from agent_mcp_framework import Agent, AgentContext, AgentResult, SequentialPipeline, AgentMCPServer
class AnalyzerAgent(Agent):
async def run(self, context: AgentContext) -> AgentResult:
code = context.get("code", "")
issues = []
if len(code.splitlines()) > 500:
issues.append("File exceeds 500 lines — consider splitting")
if "import *" in code:
issues.append("Wildcard imports detected")
context.set("issues", issues)
return AgentResult(success=True, output={"issues": issues, "count": len(issues)})
class ScorerAgent(Agent):
async def run(self, context: AgentContext) -> AgentResult:
issues = context.get("issues", [])
score = max(0, 100 - len(issues) * 15)
return AgentResult(success=True, output={"score": score, "grade": "A" if score >= 90 else "B" if score >= 70 else "C"})
# Compose agents into a pipeline
pipeline = SequentialPipeline("code-review", agents=[
AnalyzerAgent("analyzer", description="Find code issues"),
ScorerAgent("scorer", description="Score code quality"),
])
# Expose as an MCP server
server = AgentMCPServer("code-review-server", description="Multi-agent code review")
server.add_pipeline_tool(
pipeline,
name="review_code",
description="Analyze code quality and return a score",
parameters={"code": str}, # the input schema MCP clients see
)
if __name__ == "__main__":
server.run() # Starts MCP server on stdio
# Build and run locally
docker compose up --build
# Or build manually
docker build -t agent-mcp-framework .
docker run -p 8080:8080 agent-mcp-framework
Health check endpoints:
| Endpoint | Purpose |
|---|---|
GET / | Service info |
GET /health | Liveness probe |
GET /ready | Readiness probe |
Agent — Base classImplement run() to define your agent's logic.
LLMAgent — Claude-powered agentBuilt-in Anthropic client with complete() helper for LLM calls.
FunctionAgent — Quick inline agentsWrap any async function as an agent without subclassing.
| Pattern | Description |
|---|---|
SequentialPipeline | Run agents one after another, each seeing updated context |
ParallelPipeline | Run agents concurrently with optional concurrency limits |
ConditionalPipeline | Route to agents based on a condition function |
MapReducePipeline | Split work, fan out, and reduce results |
# Start an MCP server
agent-mcp serve my_project.server
# Run a pipeline directly
agent-mcp run my_project.pipeline --input '{"code": "import *"}'
# Show framework info
agent-mcp info
Dockerfile — Multi-stage build with health checksdocker-compose.yml — Local development.github/workflows/ci.yml — CI pipeline (lint, test, Docker build)MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.2.0 | 6 Jul 2026 | 11 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 22:40 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:c9a4f1d69639d31c8ecabfd9689d5cbbac77ff92234bbdc1ea70326c9d54a397