MCP Agents - Example FastMCP Server
A simple Model Context Protocol (MCP) server built with FastMCP that demonstrates basic tool implementation.
Features
- greet: Greet a user by name
Installation
This project uses uv for package management and just for task running. Make sure you have both installed:
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install just if you don't have it
# On macOS with Homebrew:
brew install just
# Or with cargo:
cargo install just
Then build the project:
just build
Usage
Running the MCP Server
To start the MCP agents server:
just run
Using with MCP Clients
You can use this server with any MCP-compatible client. The configuration depends on how you want to run the server:
Option 1: Local Development (using source code)
For development or when running from a local clone:
{
"mcpServers": {
"mcp-agents": {
"command": "uv",
"args": ["run", "mcp-agents"],
"cwd": "/Users/means/repository/mcp-agents",
"env": {}
}
}
}
Option 2: PyPI Installation (recommended for end users)
Once published to PyPI, users can use this simpler configuration:
{
"mcpServers": {
"mcp-agents": {
"command": "uvx",
"args": ["amajakai14_mcp-agents"]
}
}
}
Alternative with pipx:
{
"mcpServers": {
"mcp-agents": {
"command": "pipx",
"args": ["run", "amajakai14_mcp-agents"]
}
}
}
Option 3: Version Pinning
To pin to a specific version:
{
"mcpServers": {
"mcp-agents": {
"command": "uvx",
"args": ["amajakai14_mcp-agents==0.1.0"]
}
}
}
For Claude Desktop
Add any of the above configurations to your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
Testing the Tools
Run the test script to verify the tools work correctly:
just test
Available Tools
greet
Greets a user by name.
Parameters:
name(string): The name of the person to greet
Returns: A friendly greeting message.
Example:
{
"name": "greet",
"arguments": {
"name": "Alice"
}
}
Response:
"Hello, Alice!"
Development
Available Just Commands
just build- Install dependencies and sync the projectjust run- Start the MCP agents serverjust test- Run the test scriptjust format- Format code with black and isortjust typecheck- Run type checking with mypyjust dev- Install development dependenciesjust dist- Build distribution packagesjust clean- Clean build artifactsjust publish- Publish to PyPI (used in CI)
Project Structure
mcp-agents/
├── src/
│ └── agents/
│ └── __init__.py # Main MCP server implementation
├── pyproject.toml # Project configuration and dependencies
├── justfile # Task runner configuration
├── mcp_config.json # MCP client configuration example
├── test_tools.py # Simple test script
└── README.md # This file
Adding New Tools
To add new tools using FastMCP:
-
Add a new function with the
@mcp.tool()decorator:@mcp.tool("tool_name", description="Description of what the tool does") def tool_name(param1: type, param2: type) -> return_type: # Tool implementation return result
-
Update the README with documentation for the new tool
Running Tests
just test
License
MIT License
Metadata
Release files for amajakai14_mcp-agents 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| amajakai14_mcp_agents-0.1.4.tar.gz | 86.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| amajakai14_mcp_agents-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 91.3 kB
Release files / amajakai14_mcp_agents-0.1.4.tar.gz
| Download URL | amajakai14_mcp_agents-0.1.4.tar.gz |
|---|---|
| Size | 86.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5b4ea5c53c64d83c84871fd507e57efb97836de563468fd8ace021488846d63a
|
|
BLAKE2b-256 checksum How to use checksums |
3fd9abd4fc7393f5ab4b0ab5796e90bf374edef56ebb45fbe9c795c67bd095ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.22
|
Release files / amajakai14_mcp_agents-0.1.4-py3-none-any.whl
| Download URL | amajakai14_mcp_agents-0.1.4-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92a74688117d9beef6f695b348bc6f5c7910ef55c6d4027608a530ecfc486ebd
|
|
BLAKE2b-256 checksum How to use checksums |
0585e3605476a03f431ac83556b156e733fc68bcedb3705b6275b628d72431c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.22
|
Security for amajakai14_mcp-agents 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.