Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Examples

БесплатноНе проверен

Provides reference implementations of MCP servers using FastAPI and FastMCP, including calculator and RSS/Atom feed parser tools.

GitHubEmbed

Описание

Provides reference implementations of MCP servers using FastAPI and FastMCP, including calculator and RSS/Atom feed parser tools.

README

Reference implementations of MCP servers using:

  • FastAPI + fastapi-mcp
  • FastMCP (STDIO and HTTP transports)
  • FastMCP + feedparser for RSS/Atom querying

These examples are intentionally small and are useful as starter templates.

Repository layout

.
├── .env-template
├── fastapi-mcp/
│   └── fastapi-mcp-calculator.py
├── fastmcp/
│   ├── fastmcp-calculator.py
│   └── fastmcp-calculator-v2.py
├── mcp-feed-parser/
│   └── mcp-feed-parser.py
└── requirements.txt

Prerequisites

  • Python 3.10+
  • uv (Python package manager and runner)
  • Node.js (optional, only for MCP Inspector)

Environment setup

Create a local environment file from the template:

cp .env-template .env

Then edit .env with your local values.

The provided .env-template includes starter defaults. The current examples do not require environment variables unless you wire these values into the scripts.

Install dependencies (uv)

uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

Examples

1) FastAPI + FastAPI-MCP calculator

File: fastapi-mcp/fastapi-mcp-calculator.py

What it demonstrates:

  • Building a basic FastAPI calculator API (add, subtract, multiply, divide)
  • Mounting MCP over the same app using FastApiMCP(app).mount_http()
  • Running with Uvicorn on 0.0.0.0:8000

Run:

uv run python fastapi-mcp/fastapi-mcp-calculator.py

2) FastMCP calculator (STDIO transport)

File: fastmcp/fastmcp-calculator.py

What it demonstrates:

  • Registering tools with @mcp.tool()
  • Naming/tagging tools for better discoverability
  • Running an MCP server over STDIO (useful for local client subprocess integration)

Run:

uv run python fastmcp/fastmcp-calculator.py

3) FastMCP calculator (HTTP transport)

File: fastmcp/fastmcp-calculator-v2.py

What it demonstrates:

  • The same calculator tools as above
  • Running FastMCP with HTTP transport on localhost:8080

Run:

uv run python fastmcp/fastmcp-calculator-v2.py

4) FastMCP feed parser

File: mcp-feed-parser/mcp-feed-parser.py

What it demonstrates:

  • Querying RSS/Atom feeds using feedparser
  • Reusing a shared feed-search helper
  • Exposing feed lookup as MCP tools:
    • fcc_news_parser
    • fcc_youtube_parser
    • fcc_secret_message

Run:

uv run python mcp-feed-parser/mcp-feed-parser.py

Inspecting/debugging with MCP Inspector

The MCP Inspector is the easiest way to test tools and inspect schemas.

npx @modelcontextprotocol/inspector <your-server-command>

For example (local Python server):

npx @modelcontextprotocol/inspector uv run python fastmcp/fastmcp-calculator.py

Notes

  • The FastAPI sample filename is intentionally kept as-is (calcularor) to match repository history.
  • Calculator division tools guard against division by zero.
  • The feed parser returns a fallback message when no matches are found.

References:

Original reference video

from github.com/psyll0n/mcp-examples

Установка Examples

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/psyll0n/mcp-examples

FAQ

Examples MCP бесплатный?

Да, Examples MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Examples?

Нет, Examples работает без API-ключей и переменных окружения.

Examples — hosted или self-hosted?

Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.

Как установить Examples в Claude Desktop, Claude Code или Cursor?

Открой Examples на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

Compare Examples with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории development