fastestmcp
by mo-mostafa-123
Overview
A Python framework and CLI for rapidly generating Model Context Protocol (MCP) servers and clients, providing modular components, templates, and best practices for AI/LLM agent development.
Installation
python src/server/builder/server.pyEnvironment Variables
- DEBUG
- MAX_CONNECTIONS
- TIMEOUT
- API_KEY
- MCP_SERVER_COMMAND
Security Notes
The server-side git interaction tools (`clone_git_repository`, `download_git_repository` in `src/server/stdio/app/tools.py` and `src/server/stdio/app/resources.py`) use `subprocess.run` with dynamically constructed commands taking user-provided `repository_url`, `target_directory`, and `branch`. While `repo_name` is validated against an allowlist in some contexts, the `repository_url` and `branch` are not strictly sanitized, creating a significant command injection and path traversal vulnerability. The `WebScraper` component (`fastestmcp/__init__.py`) uses `requests.get` with user-provided URLs, which could lead to Server-Side Request Forgery (SSRF) or excessive resource consumption. The `eval()` function is used in `src/fastestmcp/demo.py` (`advanced_calculation`) for a demo, which is an explicit code execution vulnerability. Overall, inputs to many tools/resources are not sufficiently sanitized before use in shell commands or network requests, making the server unsafe to run with untrusted input without significant modifications or a robust sandboxing environment.
Similar Servers
mcpm.sh
This server provides a command-line interface to manage Model Context Protocol (MCP) servers, allowing users to discover, install, configure, run, share, and monitor them.
mcp-interviewer
A Python CLI tool designed to evaluate, test, and generate reports on Model Context Protocol (MCP) servers to ensure compatibility and quality for LLM agent use cases.
mcp-kit
A CLI tool for scaffolding Model Context Protocol (MCP) applications, either as servers providing tools, resources, and prompts, or clients consuming them.
template-mcp-server
Provides a CLI tool and template to quickly get started building a Model Context Protocol (MCP) server using FastMCP, supporting both stdio and HTTP transports.