MCP.so
登录

Running Your MCP Server with FastMCP v2.0

@GanonUchiha

基本信息

分类

其他

传输方式

stdio

作者

GanonUchiha

关于 Running Your MCP Server with FastMCP v2.0

My example of setting up a MCP server

Running Your MCP Server with FastMCP v2.0 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "My-FastMCP-Example": {
      "command": "uv",
      "args": [
        "pip",
        "install",
        "fastmcp"
      ]
    }
  }
}

Running Your MCP Server with FastMCP v2.0 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Running Your MCP Server with FastMCP v2.0?

This guide explains how to run a custom MCP server using FastMCP v2.0 and install it for use with Claude Desktop. It is intended for developers who already have a server script (e.g., server.py) ready.

How to use Running Your MCP Server with FastMCP v2.0?

Install FastMCP, run the server with fastmcp run server.py (or python server.py if using the standard entry point), then install it for Claude Desktop with fastmcp install server.py and restart Claude Desktop.

Key features of Running Your MCP Server with FastMCP v2.0

  • Provides fastmcp run and fastmcp install commands
  • Supports specifying additional Python dependencies
  • Allows passing environment variables during installation
  • Supports loading environment variables from a .env file

Use cases of Running Your MCP Server with FastMCP v2.0

  • Running a custom MCP server locally for development
  • Integrating a custom MCP server with Claude Desktop
  • Deploying a server with specific Python package dependencies

常见问题

1

How do I install FastMCP?

Use `uv pip install fastmcp` (recommended), `brew install uv` then `uv pip install fastmcp` on macOS, or `pip install fastmcp`.

2

How do I run my MCP server?

Run `fastmcp run server.py`. If your script uses `mcp.run()`, you can also run `python server.py`.

3

How do I install the server for Claude Desktop?

Run `fastmcp install server.py`, then restart Claude Desktop to load the server.

4

Can I specify additional Python dependencies?

Yes, by passing `dependencies=["pandas", "numpy"]` when instantiating FastMCP in your server code.

5

How do I set environment variables for the server?

During installation, use `fastmcp install server.py -e API_KEY=your_api_key` or load from a `.env` file with `fastmcp install server.py -f .env`.

评论

其他 分类下的更多 MCP 服务器