Fastmcp Agents project
Project description
- Are you tired of teaching every Agent how to use every tool?
- Why put the instructions on how to run
git_cloneinto every Agent you write? - Why do you have to keep telling it that it cant clone with
depth: 0?
FastMCP-Agents is a framework for building Agents into yours and more importantly, other people's MCP Servers!
How's it work?!
Just take any third-party MCP Server and add just one extra tool -- an embedded Agent that can use the tools the server provides!
Simply take your existing MCP Server
"mcp-server-tree-sitter": {
"command": "uvx",
"args": ["mcp-server-tree-sitter"]
}
And wrap it with an Agent:
"mcp-server-tree-sitter": {
"command": "uvx",
"args": [
"fastmcp_agents", "cli",
"agent",
"--name","ask_tree_sitter",
"--description", "Ask the tree-sitter agent to find items in the codebase.",
"--instructions", "You are a helpful assistant that provides users a simple way to find items in their codebase.",
"wrap",
"uvx", "mcp-server-tree-sitter"
]
}
There's more than just adding an AI Agent in FastMCP-Agents. You can also modify the tools and parameters of the server to make it easier for the Agent to use.
You can use FastMCP-Agents to wrap any MCP Server via the command line, configure the transformation with a YAML or JSON file, or even write Python code to configure the transformations!
| Option | Agents | Servers | Override Tools | Wrap Tools |
|---|---|---|---|---|
| Python | ∞ | ∞ | Yes | Yes |
| YAML or JSON | ∞ | ∞ | Yes | No |
| Command-line | ∞ | 1 | No | No |
Example Servers
Here are some example servers that you can use to get started. You can find the full list of bundled servers here.
Using FastMCP-Agents as a CLI or MCP Server
For all of the following options start with:
- Install UV
- Follow the instructions for configuring your preferred provider and model
- Follow the instruction for your MCP Client (Web UI, IDE (VSCode, Roo Code), cli)
Providers
Google Gemini
- Create a gemini api key
export GEMINI_API_KEY=your-gemini-api-keyexport MODEL="gemini/gemini-2.5-flash-preview-05-20"
Command line api key creation:
- Use the gcloud cli.
gcloud alpha services api-keys create --display-name 'my-fast-mcp-gemini-key' --api-target=service=generativelanguage.googleapis.com - use the Response keyString for
GEMINI_API_KEY(append--format json | jq .response.keyStringto the above command if you like)
Google Vertex AI
- Set up your Google Vertex AI credentials.
gcloud initshould be your first option. - Set your model
export MODEL="vertex_ai/gemini-2.5-flash-preview-05-20"
Alternatives to gcloud init:
- Create a service account with
Vertex AI Userrole - Download the credentials
- Set the environment variable
GOOGLE_APPLICATION_CREDENTIALSto the path of the JSON key file
MCP Clients
In each of these examples we'll use the wrale_mcp-server-tree-sitter as our MCP Server.
Feel free to experiment with other MCP Servers.
CLI Tool Call Example
uvx fastmcp_agents cli \
agent \
--name "ask_tree_sitter" \
--description "Ask the tree-sitter agent to find items in the codebase." \
--instructions "You are a helpful assistant that provides users a simple way to find items in their codebase." \
call "ask_tree_sitter" "{\"instructions\": \"Analyze the codebase in . and tell me what you found.\"}" \
wrap uvx git+https://github.com/wrale/mcp-server-tree-sitter.git
MCP Inspector
- Run
npx @modelcontextprotocol/inspector uvx fastmcp_agents config --bundled wrale_mcp-server-tree-sitter - Visit http://localhost:6274/#tools
- Click
Connectto connect to your MCP Server - Click
List Tools - Click
ask_tree_sitter - Interact with the tool via the instructions text area
Open Webui
- Run open-webui. This is the best way:
docker pull ghcr.io/open-webui/open-webui:main
docker rm -f open-webui
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui -e WEBUI_AUTH=false --restart always ghcr.io/open-webui/open-webui:main
- Run mcpo and your MCP Server to provide an OpenAPI interface for open webui to use:
uvx mcpo --port 8000 -- uvx fastmcp_agents config --bundled wrale_mcp-server-tree-sitter - Visit http://127.0.0.1:3000
- Register your tool with open webui. Click the account in the upper right and select
settings > tools > (+) add connection. Set the base url to http://localhost:8000 and click save.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastmcp_agents-0.2.0.tar.gz.
File metadata
- Download URL: fastmcp_agents-0.2.0.tar.gz
- Upload date:
- Size: 218.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3cdfb3a8e0070032b77711d9fa1b88135217a48da2f24c83533ede60aa412d8
|
|
| MD5 |
a36720d4023cffff89f18688ba96be8e
|
|
| BLAKE2b-256 |
cb7e19b534208eb812de29114f46f5afae1e34d2911e1e8d93e236e43b98bab1
|
File details
Details for the file fastmcp_agents-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fastmcp_agents-0.2.0-py3-none-any.whl
- Upload date:
- Size: 80.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4e905828e43d7e4efc42fa222f673005a9f20d7624e531c131cc25ec658df16
|
|
| MD5 |
b10e1f51abb2e7c1c5c481341a8cee1c
|
|
| BLAKE2b-256 |
e0c224d290716ba5614aefb2e7cbef7a5881ee19028325a9e660e9dd3785d304
|