Atlas / MCP servers / panz2018 / FastAPI SSE

FastAPI SSESAFE

mcp/panz2018/fastapi-sse

A working example to create a FastAPI server with SSE-based MCP support

Verdict
SAFE
Grade
B
Trust score
89 /100
Exposed tools
2 2r · 0w · 0d
Transport
sse
License
MIT
Stars
51
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

English | 简体中文

A Server-Sent Events (SSE) implementation using FastAPI framework with Model Context Protocol (MCP) integration.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI models to interact with external tools and data sources. MCP solves several key challenges in AI development:

  • Context limitations: Allows models to access up-to-date information beyond their training data
  • Tool integration: Provides a standardized way for models to use external tools and APIs
  • Interoperability: Creates a common interface between different AI models and tools
  • Extensibility: Makes it easy to add new capabilities to AI systems without retraining

This project demonstrates how to implement MCP using Server-Sent Events (SSE) in a FastAPI web application.

Description

This project demonstrates how to implement Server-Sent Events (SSE) using the FastAPI framework while integrating Model Context Protocol (MCP) functionality. The key feature is the seamless integration of MCP's SSE capabilities within a full-featured FastAPI web application that includes custom routes.

Features

  • Server-Sent Events (SSE) implementation with MCP
  • FastAPI framework integration with custom routes
  • Unified web application with both MCP and standard web endpoints
  • Customizable route structure
  • Clean separation of concerns between MCP and web functionality

Architecture

This project showcases a modular architecture that:

  1. Integrates MCP SSE endpoints (/sse and /messages/) into a FastAPI application
  2. Provides standard web routes (/, /about, /status, /docs, /redoc)
  3. Demonstrates how to maintain separation between MCP functionality and web routes

Installation & Usage Options

Prerequisites

Install [UV Package Manager](https://docs.astral.sh/

Read from source at commit 712240fd0dcbOBSERVED · 2026-10-08
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.

claude-code
claude mcp add fastapi-mcp-sse -- uvx fastapi-mcp-sse
claude-desktop
{
  "mcpServers": {
    "fastapi-mcp-sse": {
      "command": "uvx",
      "args": [
        "fastapi-mcp-sse"
      ]
    }
  }
}
03

Exposed tools (2)

2 read · 0 write · 0 destructive.

ToolRiskDescription
get_alertsreadGet weather alerts for a US state.
get_forecastreadGet weather forecast for a location.
04

Trust audit

SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codePASS
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
none-observed
Network
declared (1 observation(s))
Shell
none-observed
Dependencies
pinned
Secrets in source
none-found

Findings (2)

MEDIUMAuth / authz · mcp.remote_no_auth · CWE-287, CWE-862
sse
Why it matters. a network transport with no auth environment variable found
Fix. require a token
LOWInventory / provenance · inv.hidden_file · CWE-1104
.flake8
.flake8
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose

Gates applied: no_behavioural_pass.

Audited 2026-10-08 · audit v0.4.1 · source sha 712240fd0dcbfull audit observations/trust-audit/mcp-server/panz2018__fastapi-sse.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-08712240fd0dcbSAFEB89first audit
06

Questions

What is the FastAPI SSE MCP server?

A working example to create a FastAPI server with SSE-based MCP support

What tools does FastAPI SSE expose?

2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is FastAPI SSE safe to connect to an agent?

The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.

What credentials does FastAPI SSE need?

No credential environment variables were found in its source, so it appears to need none.

How does FastAPI SSE run?

It speaks sse, so it runs as a service you connect to over the network. It is published on PyPI as fastapi-mcp-sse.

How current is this page?

The grade is for one exact copy of the source (712240fd0dcb), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement