Sample MCP server tutorial project using FastMCP

Sample MCP server tutorial project using FastMCP

python-mcp-server-sample•by0shimax

A sample Python project demonstrating how to create a Model Context Protocol server with the MCP SDK's FastMCP and run it over stdio.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Creates an MCP server named Demo using FastMCP with debug enabled.
  • •Exposes an addition tool that takes two integers and returns their sum.
  • •Runs the server using the stdio transport.

BEST FOR

  • •Developers learning how to build a basic MCP server in Python.
  • •Connecting a simple MCP server to the Cline client.

ABOUT PYTHON-MCP-SERVER-SAMPLE

Sample MCP server tutorial project using FastMCP is cataloged as an MCP server attributed to 0shimax. A sample Python project demonstrating how to create a Model Context Protocol server with the MCP SDK's FastMCP and run it over stdio. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Sample MCP server tutorial project using FastMCP are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What transport does the sample server use?

It runs the MCP server using the stdio transport.

What tool does the sample server expose?

It exposes an addition tool that adds two integers.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 9eed5004f892 · 采集于 2026-11-13 12:24:02 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

uvのインストール

curl -LsSf https://astral.sh/uv/install.sh | sh

Pythonプロジェクトを作成

# mcp-server-demoというPythonプロジェクトを作成
uv init mcp-server-demo

MCP SDKのインストール

# mcp-server-demoプロジェクト配下に移動
cd mcp-server-demo
# mcp-server-demoプロジェクトにmcp sdkをインストール
uv add "mcp[cli]"

MCPサーバの構築

server.pyファイルの作成(ファイル名はなんでもよい)

mv main.py server.py

server.pyに以下のように記述

from mcp.server.fastmcp import FastMCP

# Create an MCP server with debug enabled
mcp = FastMCP("Demo", debug=True)


# Add an addition tool
@mcp.tool()
def add(a: int, b: int) -> int:
    """Add two numbers"""
    return a + b

# Add this part to run the server
if __name__ == "__main__":
    # stdioトランスポートを使用
    print("Starting MCP server in stdio mode")
    mcp.run(transport="stdio")

ClineへのMCPサーバの登録

ClineのプロジェクトMCPファイルを以下のように編集

{
  "mcpServers": {
    "mcp-demo-server": {
      "command": "uv",
      "args": [
        "--directory",
        <path to mcp-server-demo>,
        "run",
        "server.py"
      ],
      "alwaysAllow": [
        "add"
      ],
      "disabled": false
    }
  }
}

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Sample MCP server tutorial project using FastMCP from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/python-mcp-server-sample)

REPOSITORY STATS

GitHub Stars1
Forks0

GitHub API evidence checked 2026-11-13 13:11:35.976Z (UTC). Repository-level counts are shared by all components, not individual server installs. Open issues including pull requests: 0.

Last repository push (UTC):2025-06-29

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools