MCP.so
ログイン

FastMCP MCP Server

@punkpeye

基本情報

カテゴリ

その他

ライセンス

MIT

トランスポート

stdio

作者

punkpeye

FastMCP MCP Server について

A TypeScript framework for building MCP servers.

FastMCP MCP Server の設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "fastmcp-punkpeye": {
      "command": "npx",
      "args": [
        "fastmcp",
        "dev",
        "src/examples/addition.ts"
      ]
    }
  }
}

FastMCP MCP Server のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

上のボタンで一時的なサンドボックスでこのサーバーを実行し、ツール一覧を取得できます。

概要

What is FastMCP?

FastMCP is a TypeScript framework for building Model Context Protocol (MCP) servers. It handles client sessions and simplifies the creation of tools, resources, and prompts by managing boilerplate, connections, responses, and error handling automatically. It is intended for developers who want to build MCP servers quickly without dealing with the low-level implementation details of the official MCP SDK.

How to use FastMCP?

Install with npm install fastmcp. Create a server instance with a name and version, add tools using the .addTool() method (with Zod or any Standard Schema-compatible validation), then start the server with .start({ transportType: "stdio" }) for stdio or with HTTP streaming options. Test your server using the CLI commands npx fastmcp dev or npx fastmcp inspect.

Key features of FastMCP

  • Simple Tool, Resource, and Prompt definition
  • Built-in authentication and session tracking
  • HTTP Streaming and SSE transport support
  • Custom HTTP routes for REST APIs and webhooks
  • Edge runtime support (Cloudflare Workers, Deno Deploy)
  • Stateless mode for serverless deployments
  • CORS enabled by default, with full configuration options
  • HTTPS support with SSL certificates

Use cases of FastMCP

  • Rapidly prototype an MCP server that adds two numbers or performs other simple functions
  • Build a remote MCP server accessible over HTTP Streaming or SSE for client connections
  • Deploy an MCP server to edge runtimes like Cloudflare Workers for global low-latency access
  • Create an MCP server that also serves custom REST APIs, admin panels, or webhooks on the same HTTP port
  • Implement an MCP server with authentication, session management, and progress notifications for complex client interactions

よくある質問

1

When should I choose FastMCP over the official MCP SDK?

Choose FastMCP when you want to build MCP servers quickly without dealing with low-level implementation details. The official SDK provides foundational blocks but leaves configuration, connection handling, and response management to you; FastMCP handles all the boilerplate automatically.

2

How do I install FastMCP?

Install via npm: `npm install fastmcp`. The package provides TypeScript types and functions for building and starting MCP servers.

3

What transports does FastMCP support?

FastMCP supports stdio, HTTP Streaming (with SSE compatibility), and HTTPS. HTTP Streaming is configured by setting `transportType: "httpStream"` and specifying a port; an SSE endpoint is also started automatically at `/sse`.

4

Can I add custom HTTP routes to my FastMCP server?

Yes. Use `server.addRoute(method, path, handler, options)` to add custom REST API endpoints, webhooks, or admin interfaces. Routes support path parameters, query strings, JSON/text body parsing, and can be made public (bypassing authentication) with `{ public: true }`.

5

Does FastMCP support authentication and sessions?

Yes. FastMCP includes built-in authentication, session ID and request ID tracking, and configurable session management. The `authenticate` function can be used for both MCP endpoints and custom HTTP routes.

コメント

「その他」の他のコンテンツ