Lightweight, modular framework for building and orchestrating AI agents using Model Context Protocol, enabling scalable multi-agent collaboration, specialization, and task delegation through simple configuration files.
Unlock the full potential of LW MCP Agents through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
Free tier available โข No credit card required
LW MCP Agents is a lightweight, modular framework for building and orchestrating AI agents using the Model Context Protocol (MCP). It empowers you to rapidly design multi-agent systems where each agent can specialize, collaborate, delegate, and reasonโwithout writing complex orchestration logic.
Build scalable, composable AI systems using only configuration files.
git clone https://github.com/Autumn-AIs/LW-MCP-agents.git cd LW-MCP-agents python -m venv venv source venv/bin/activate # Windows: venv\Scripts\activate pip install -r requirements.txt
python src/agent/agent_runner.py --config examples/base_agent/base_agent_config.json
Terminal 1 (Research Agent Server):
python src/agent/agent_runner.py --config examples/orchestrator_researcher/research_agent_config.json --server-mode
Terminal 2 (Orchestrator Agent):
python src/agent/agent_runner.py --config examples/orchestrator_researcher/master_orchestrator_config.json
Your orchestrator now intelligently delegates research tasks to the research agent.
Configure agents to run inside Claude Desktop:
1. Locate your Claude config file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add your agent under mcpServers
:
{ "mcpServers": { "research-agent": { "command": "/bin/bash", "args": ["-c", "/path/to/venv/bin/python /path/to/agent_runner.py --config=/path/to/agent_config.json --server-mode"], "env": { "PYTHONPATH": "/path/to/project", "PATH": "/path/to/venv/bin:/usr/local/bin:/usr/bin" } } } }
Base Agent
A minimal agent that connects to tools via MCP.
๐ examples/base_agent/
Orchestrator + Researcher
Demonstrates hierarchical delegation and capability sharing.
๐ examples/orchestrator_researcher/
๐ก Contribute your own example! Submit a PR or reach out to the maintainers.
python src/agent/agent_runner.py --config
Option | Description |
---|---|
--server-mode | Exposes the agent as an MCP server |
--server-name | Assigns a custom MCP server name |
{ "agent_name": "my-agent", "llm_provider": "groq", "llm_api_key": "YOUR_API_KEY", "server_mode": false }
Define specialized functions the agent can reason over:
"capabilities": [ { "name": "summarize_document", "description": "Summarize a document in a concise way", "input_schema": { "type": "object", "properties": { "document_text": { "type": "string" }, "max_length": { "type": "integer", "default": 200 } }, "required": ["document_text"] }, "prompt_template": "Summarize the following document in {max_length} words: {document_text}" } ]
{ "agent_name": "master-orchestrator", "servers": { "research-agent": { "command": "python", "args": ["src/agent/agent_runner.py", "--config=research_agent_config.json", "--server-mode"] } } }
Each capability:
[INFO] agent:master-orchestrator - Executing tool: research_topic
[INFO] agent:research-agent - Using tool: brave_web_search
[INFO] agent:research-agent - Finished capability: research_topic
Component | Role |
---|---|
AgentServer | Starts, configures, and runs an agent |
MCPServerWrapper | Wraps the agent to expose it over MCP |
CapabilityRegistry | Loads reasoning tasks from config |
ToolRegistry | Discovers tools from other agents |
This project draws inspiration from the brilliant work on mcp-agents by LastMile AI.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!