Back to Home
punkpeye icon

fastmcp

Verified Safe

by punkpeye

Overview

Build Model Context Protocol (MCP) servers in TypeScript with features like session management, authentication (including OAuth), streaming, and type-safe tool/resource/prompt definitions.

Installation

Run Command
npx fastmcp dev src/examples/addition.ts

Environment Variables

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET
  • GITHUB_CLIENT_ID
  • GITHUB_CLIENT_SECRET
  • AZURE_CLIENT_ID
  • AZURE_CLIENT_SECRET
  • OAUTH_CLIENT_ID
  • OAUTH_CLIENT_SECRET
  • FASTMCP_TRANSPORT
  • FASTMCP_PORT
  • FASTMCP_ENDPOINT
  • FASTMCP_STATELESS
  • FASTMCP_HOST
  • USER_ID
  • USERNAME
  • USER_ROLE
  • JWT_SECRET

Security Notes

The framework demonstrates strong security practices, especially around OAuth flows, token storage (encryption and token swap by default), and PKCE implementation. Sensitive keys are expected to be provided via environment variables, not hardcoded. The `authenticate` function, `imageContent` and `audioContent` helpers allow custom logic or fetching from external/local paths; developers using the framework must ensure proper input sanitization and validation for user-controlled inputs to prevent risks like SSRF or path traversal. The optional 'jose' dependency for JWKS verification is a well-regarded cryptographic library.

Similar Servers

Stats

Interest Score100
Security Score9
Cost ClassLow
Stars2801
Forks237
Last Update2025-12-05

Tags

MCPTypeScriptFrameworkAPIAI Agents