Skip to main content
mcpSource-backed
FastAPI-MCP logo

FastAPI-MCP Server

FastAPI-native package that exposes FastAPI endpoints as Model Context Protocol tools while preserving schemas, docs, and existing authentication dependencies.

by Tadata · submitted by oktofeesh1·added 2026-06-05·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://fastapi-mcp.tadata.com/, https://github.com/tadata-org/fastapi_mcp
Brand
FastAPI-MCP
Brand domain
fastapi-mcp.tadata.com
Brand asset source
brandfetch
Safety notes
FastAPI-MCP can expose real API operations as tools; do not blindly expose admin, destructive, payment, credential, or production-write endpoints., Preserve and test FastAPI authentication dependencies before letting agents call protected tools., Review request models, side effects, rate limits, and authorization boundaries for each endpoint., Prefer explicit allowlists and non-production deployments for early MCP testing.
Privacy notes
Request schemas, response schemas, OpenAPI docs, route names, validation errors, and endpoint outputs may be visible to the MCP client and model., Endpoint calls can expose user data, internal identifiers, tokens in payloads, and business logic., Keep API credentials, service secrets, and test-user tokens out of prompts, repository files, and logs.
Author
Tadata
Submitted by
oktofeesh1
Claim status
unclaimed
Last verified
2026-06-05

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

63

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Needs review

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    No reviewed flag detected in metadata.

    Pending

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

CLI install

Copy-ready — paste the snippet to get started.

15 minutes

Adoption plan

Balanced adoption plan

Current risk score 24/100. Use staged verification before broader rollout.

Risk 24

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    No review metadata found; increase manual validation.

    Pending
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Missing required evidence: Metadata review. Risk score 31.

Risk 31

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Missing

Review metadata is missing.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required gaps: Metadata review

Decision timeline

Decision timeline · balanced

Blocking gaps: Check metadata review status. Risk 28.

Risk 28

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is missing.

Pending

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

Blockers: Check metadata review status

Prerequisite readiness

Prerequisite readiness

5 prerequisites to line up before setup. Includes a review or approval gate.

0/5 ready
Install & runtime3Permissions & scopes1Review & approval115 minutes

Safety & privacy surface

Safety & privacy surface

4 safety and 3 privacy notes across 4 risk areas. Review closely: credentials & tokens, permissions & scopes, network access.

4 areas
  • SafetyCredentials & tokensFastAPI-MCP can expose real API operations as tools; do not blindly expose admin, destructive, payment, credential, or production-write endpoints.
  • SafetyGeneralPreserve and test FastAPI authentication dependencies before letting agents call protected tools.
  • SafetyPermissions & scopesReview request models, side effects, rate limits, and authorization boundaries for each endpoint.
  • SafetyGeneralPrefer explicit allowlists and non-production deployments for early MCP testing.
  • PrivacyNetwork accessRequest schemas, response schemas, OpenAPI docs, route names, validation errors, and endpoint outputs may be visible to the MCP client and model.
  • PrivacyCredentials & tokensEndpoint calls can expose user data, internal identifiers, tokens in payloads, and business logic.
  • PrivacyCredentials & tokensKeep API credentials, service secrets, and test-user tokens out of prompts, repository files, and logs.

Safety notes

  • FastAPI-MCP can expose real API operations as tools; do not blindly expose admin, destructive, payment, credential, or production-write endpoints.
  • Preserve and test FastAPI authentication dependencies before letting agents call protected tools.
  • Review request models, side effects, rate limits, and authorization boundaries for each endpoint.
  • Prefer explicit allowlists and non-production deployments for early MCP testing.

Privacy notes

  • Request schemas, response schemas, OpenAPI docs, route names, validation errors, and endpoint outputs may be visible to the MCP client and model.
  • Endpoint calls can expose user data, internal identifiers, tokens in payloads, and business logic.
  • Keep API credentials, service secrets, and test-user tokens out of prompts, repository files, and logs.

Prerequisites

  • Python 3.10 or newer, with Python 3.12 recommended by the project.
  • Existing FastAPI application or a reviewed FastAPI service design.
  • uv or pip for installing fastapi-mcp.
  • Clear endpoint allowlist and authentication policy before exposing API operations to an agent.
  • MCP client that can connect to the mounted or separately deployed MCP endpoint.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
15 minutes
Difficulty
intermediate
Full copyable content
from fastapi import FastAPI
from fastapi_mcp import FastApiMCP

app = FastAPI()

mcp = FastApiMCP(app)
mcp.mount_http()

About this resource

Content

FastAPI-MCP is a FastAPI-native package for exposing FastAPI endpoints as MCP tools. It preserves request and response schemas, endpoint documentation, and FastAPI dependency-based authentication patterns instead of treating an API only as a generic OpenAPI document.

The simplest documented pattern mounts an HTTP MCP server directly into a FastAPI app so the MCP endpoint becomes available from the application at /mcp.

Source Review

These sources were reviewed on 2026-06-07. Prefer live documentation for current installation, mounting, deployment, authentication, and endpoint selection options.

Features

  • Expose FastAPI endpoints as MCP tools.
  • Preserve request models, response models, and route documentation.
  • Use existing FastAPI dependencies for authentication and authorization.
  • Mount the MCP server into the same app or deploy it separately.
  • Use ASGI transport directly with the FastAPI app.
  • Add MCP support with minimal code for existing services.

Installation

Install with uv:

uv add fastapi-mcp

Or install with pip:

pip install fastapi-mcp

Basic FastAPI integration:

from fastapi import FastAPI
from fastapi_mcp import FastApiMCP

app = FastAPI()

mcp = FastApiMCP(app)
mcp.mount_http()

When the app runs on port 8000, the generated Streamable HTTP MCP endpoint is available at http://localhost:8000/mcp.

Client configuration:

{
  "mcpServers": {
    "fastapi-mcp": {
      "url": "http://localhost:8000/mcp"
    }
  }
}

Use Cases

  • Give an internal agent controlled access to selected FastAPI operations.
  • Add MCP tooling to a FastAPI backend without writing a custom MCP server.
  • Preserve existing Pydantic schema descriptions as tool context.
  • Reuse FastAPI authentication dependencies for protected MCP tools.
  • Test an API as agent-callable tools in staging before production rollout.

Safety and Privacy

Treat FastAPI-MCP as a way to expose live API capabilities, not just docs. Review which endpoints become tools, preserve authentication, and block destructive or sensitive operations unless they are explicitly intended for agent use.

Endpoint schemas, payloads, validation errors, and responses may reveal internal data models or user data. Use redacted test data and non-production environments when experimenting.

Duplicate Check

Existing entries include generic OpenAPI and API tooling, but no tadata-org/fastapi_mcp entry was found in content/mcp. This entry is for the FastAPI-native MCP framework package and uses the documented local Streamable HTTP endpoint.

Source citations

Add this badge to your README

Show that FastAPI-MCP Server is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/mcp/fastapi-mcp.svg)](https://heyclau.de/entry/mcp/fastapi-mcp)

How it compares

FastAPI-MCP Server side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

3 trust signals differ across this comparison (Package trust, Source provenance, Submitter).

Field

FastAPI-native package that exposes FastAPI endpoints as Model Context Protocol tools while preserving schemas, docs, and existing authentication dependencies.

Open dossier

Django extension that exposes MCP endpoints and stdio transport for Django apps, with declarative model query tools, custom toolsets, DRF create/list/ update/delete tool publishing, serializer output, and MCP inspection.

Open dossier

The official SingleStore MCP server (singlestore-mcp-server) that lets AI assistants manage SingleStore from natural language — running SQL on a workspace, inspecting organizations, workspace groups, and workspaces, managing starter workspaces, notebooks, scheduled jobs, and Stage files — with no API keys required thanks to browser-based OAuth.

Open dossier

Configure MCP servers in the Claude Desktop app by editing claude_desktop_config.json. Grounded walkthrough covering config file locations, the mcpServers JSON structure, the filesystem server, and how to verify and troubleshoot the connection.

Open dossier
Next steps
Trust
Review statusNot reviewedNot reviewedNot reviewedNot reviewed
Package trustDiffersPackage not verifiedPackage not verifiedPackage not verifiedPackage verified
Source provenanceDiffersSource-backedSource-backedSource-backedNo submission link
SubmitterDiffersoktofeesh1oktofeesh1davion-knight
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety ✓ Privacy ✓
BrandFastAPI-MCP logoFastAPI-MCPDjango MCP Server logoDjango MCP ServerSingleStore MCP Server logoSingleStore MCP ServerAnthropic logoAnthropic
Categorymcpmcpmcpmcp
SourceSource-backedSource-backedSource-backedFirst-party
AuthorTadataSmart GTSsinglestore-labsJSONbored
Added2026-06-052026-06-062026-07-082025-10-27
Platforms
Harness
Source repo
Safety notesFastAPI-MCP can expose real API operations as tools; do not blindly expose admin, destructive, payment, credential, or production-write endpoints. Preserve and test FastAPI authentication dependencies before letting agents call protected tools. Review request models, side effects, rate limits, and authorization boundaries for each endpoint. Prefer explicit allowlists and non-production deployments for early MCP testing.Django MCP Server can expose Django model querysets, custom Python methods, DRF create/list/update/delete views, serializers, resources, and low-level FastMCP tools to an MCP client. Published DRF create, update, and delete tools can mutate application data if their serializers, views, and authentication rules permit it. The README notes that built-in DRF authentication classes, permission classes, filter backends, and pagination are disabled for published DRF tools in favor of MCP authentication; review this carefully before reusing production views. Query tools can evaluate QuerySets and return database records; restrict queryset scope and fields before exposing sensitive models. Require confirmation and application-level authorization before exposing write tools, email-sending methods, admin-like actions, or tools that touch customer, employee, financial, health, or regulated data.The `run_sql` tool executes SQL against a connected workspace with the authenticated user's permissions, so it can read and modify data; scope the SingleStore account/role to least privilege. Workspace and job tools can create and terminate starter workspaces and create or delete scheduled jobs (`create_starter_workspace`, `terminate_starter_workspace`, `create_job_from_notebook`, `delete_job`), which affect real cloud resources and billing. Stage tools can upload, move, and delete files in a deployment's Stage file system (`stage_upload_file`, `stage_move`, `stage_delete`); treat them as write/delete-capable. Authentication is the boundary — the standard flow stores browser-OAuth session credentials, and the Docker flow uses a Management API key, so restrict what the authenticated identity can reach. Point the server at a non-production organization or a least-privilege identity when letting an agent act autonomously.Local MCP servers run as processes on your machine with your user account's privileges, so they can perform any file or system operation you can. Only add servers you trust, and restrict filesystem server paths to the minimum directories the workflow needs. Each Claude Desktop tool call (file write, delete, move) requires your explicit approval before it executes; review every request before approving.
Privacy notesRequest schemas, response schemas, OpenAPI docs, route names, validation errors, and endpoint outputs may be visible to the MCP client and model. Endpoint calls can expose user data, internal identifiers, tokens in payloads, and business logic. Keep API credentials, service secrets, and test-user tokens out of prompts, repository files, and logs.Django sessions, request headers, model names, field names, primary keys, QuerySet results, serializer output, DRF request bodies, custom tool arguments, and tool responses can be exposed to the MCP client. Exposed models may contain user accounts, permissions, customer records, orders, messages, files, logs, internal notes, audit trails, or application-specific secrets. Remote streamable HTTP deployments can move application data outside the original Django UI and audit path if MCP auth, OAuth metadata, and retention are not configured correctly. Stdio usage can still expose data through local MCP client logs, transcripts, and tool traces. Keep MCP endpoint access, serializer fields, queryset filters, and tool docstrings intentionally narrow for each app.The server connects to your SingleStore account and workspaces; user and organization details, SQL results, notebook contents, and Stage files it returns are passed to the LLM/MCP client. SQL query results can include sensitive or PII data stored in your databases, and organization/workspace metadata can reveal infrastructure details. OAuth session credentials (standard setup) or the `MCP_API_KEY` (Docker) grant account access — keep client config out of version control and restrict access to it. Notebook and Stage tools can read and write files in SingleStore Spaces/Stage; treat that stored content as retained data.Configured servers receive the prompts, file contents, and directory data needed to run their tools, and may store credentials (API keys, tokens) passed through the env block. The claude_desktop_config.json file holds server commands, file paths, and environment-variable names; keep it private and do not commit it to public repositories.
Prerequisites
  • Python 3.10 or newer, with Python 3.12 recommended by the project.
  • Existing FastAPI application or a reviewed FastAPI service design.
  • uv or pip for installing fastapi-mcp.
  • Clear endpoint allowlist and authentication policy before exposing API operations to an agent.
  • Django 4 or 5 application with Python 3.10 or newer.
  • mcp_server added to INSTALLED_APPS and mcp_server.urls included in the Django URL configuration.
  • Review of which Django models, querysets, custom methods, DRF views, serializers, and request context should be exposed to MCP clients.
  • Authentication classes configured through DJANGO_MCP_AUTHENTICATION_CLASSES before exposing non-public data over streamable HTTP.
  • Python 3.10 or newer and the `uv`/`uvx` package manager (or `pip install singlestore-mcp-server`)
  • A SingleStore account; the standard setup signs in through browser-based OAuth on first start
  • For Docker runs only, a SingleStore Management API key (`MCP_API_KEY`), since the OAuth flow is not supported inside containers
  • An MCP-compatible client (Claude Desktop, Claude Code, Cursor, VS Code, Windsurf, Gemini, etc.)
  • Claude Desktop installed and running (macOS, Windows, or Linux)
  • Basic JSON knowledge - understand JSON syntax, objects, arrays, and key-value pairs
  • Text editor with JSON syntax highlighting (VS Code, Sublime Text, or similar)
  • Node.js 18+ installed for running npx commands and MCP server packages
Install
uv add fastapi-mcp
pip install django-mcp-server
uvx singlestore-mcp-server start
node --version
Config
{
  "mcpServers": {
    "fastapi-mcp": {
      "url": "http://localhost:8000/mcp",
      "type": "http"
    }
  }
}
{
  "mcpServers": {
    "django": {
      "command": "python",
      "args": [
        "manage.py",
        "stdio_server"
      ],
      "type": "stdio"
    }
  }
}
{
  "mcpServers": {
    "singlestore-mcp-server": {
      "command": "uvx",
      "args": ["singlestore-mcp-server", "start"]
    }
  }
}
Edit via Settings > Developer > Edit Config, then restart Claude Desktop:
{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/username/Desktop"
      ]
    }
  }
}
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.