Skip to content

Files

Latest commit

0a3ea26 · May 29, 2025

History

History

mcp_basic_agent

README.md

Basic MCP Agent example

This MCP Agent app shows a "finder" Agent which has access to the fetch and filesystem MCP servers.

You can ask it information about local files or URLs, and it will make the determination on what to use at what time to satisfy the request.

Image

┌──────────┐      ┌──────────────┐
│  Finder  │──┬──▶│  Fetch       │
│  Agent   │  │   │  MCP Server  │
└──────────┘  │   └──────────────┘
              |   ┌──────────────┐
              └──▶│  Filesystem  │
                  │  MCP Server  │
                  └──────────────┘

1 App set up

First, clone the repo and navigate to the basic‑agent example:

git clone https://github.com/lastmile-ai/mcp-agent.git
cd mcp-agent/examples/basic/mcp_basic_agent

Install uv (if you don’t have it):

pip install uv

Sync mcp-agent project dependencies:

uv sync

Install requirements specific to this example:

uv pip install -r requirements.txt

2 Set up api keys

In main.py, set your api_key in OpenAISettings and/or AnthropicSettings.

3 Run locally

Run your MCP Agent app:

uv run main.py