Prerequisites

Python 3.10+

mcp-agent requires Python 3.10 or higher

Node.js

Required for some MCP servers like filesystem (optional)

Install mcp-agent

Install Model Provider Dependencies

mcp-agent supports multiple LLM providers. Choose your preferred provider:

Install MCP Servers

mcp-agent works with MCP servers that provide tools, resources, and other capabilities.
For more MCP servers, check out the Awesome MCP Servers repository.

Verify Installation

Create a simple test file to verify your installation:
import asyncio
from mcp_agent.app import MCPApp

async def test_installation():
  app = MCPApp(name="test_app")

  async with app.run() as mcp_agent_app:
    logger = mcp_agent_app.logger
    logger.info("mcp-agent installed successfully!")
    print("✅ mcp-agent is working!")

if __name__ == "__main__":
asyncio.run(test_installation())

Run the test:
python test_mcp_agent.py
You should see output confirming that mcp-agent is working correctly.

Development Setup

1

Clone the Repository

git clone https://github.com/lastmile-ai/mcp-agent.git
cd mcp-agent
2

Install Dependencies

# Sync project dependencies
uv sync --all-extras
3

Run Examples

# Navigate to any example
cd examples/basic/mcp_basic_agent

# Copy and configure secrets
cp mcp_agent.secrets.yaml.example mcp_agent.secrets.yaml
# Edit mcp_agent.secrets.yaml with your API keys

# Run the example
uv run main.py

Troubleshooting

Next Steps

Now that you have mcp-agent installed, let’s create your first agent!