Back to Home
jlowin icon

fastmcp

Verified Safe

by jlowin

Overview

FastMCP is an ergonomic interface for the Model Context Protocol (MCP), providing a comprehensive framework for building and interacting with AI agents, tools, resources, and prompts across various transports and authentication methods.

Installation

Run Command
fastmcp run <your_server_file.py>

Environment Variables

  • OPENAI_API_KEY
  • ANTHROPIC_API_KEY
  • FASTMCP_SERVER_AUTH_CLIENT_ID
  • FASTMCP_SERVER_AUTH_CLIENT_SECRET
  • FASTMCP_SERVER_AUTH_JWT_VERIFIER_PUBLIC_KEY
  • FASTMCP_REDIS_URL
  • UV_PROJECT_DIR
  • MCP_AUTH_GITHUB_CLIENT_ID
  • MCP_AUTH_GITHUB_CLIENT_SECRET

Security Notes

The library implements robust security practices, including HTML escaping for XSS prevention, X-Frame-Options for clickjacking, and secure OAuth/OIDC flows. Sensitive data (e.g., tokens) are handled using Pydantic's SecretStr. The primary security risks stem from how developers use the framework, specifically exposing untrusted input to features like `StdioTransport` (arbitrary command execution) or file system resources without proper application-level validation and authorization. Developers must ensure that paths for local scripts/files are not user-controlled and that `StdioTransport` commands are predefined and safe.

Similar Servers

Stats

Interest Score100
Security Score8
Cost ClassLow
Stars22084
Forks1661
Last Update2026-01-19

Tags

MCPProtocolClientServerAPIToolsResourcesPromptsAILLMFrameworkPythonDependency InjectionOAuthTasks