MCP.so
ログイン

Starlette MCP SSE

@panz2018

基本情報

カテゴリ

その他

ライセンス

MIT

トランスポート

stdio

作者

panz2018

Starlette MCP SSE について

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

#starlette#sse#mcp

Starlette MCP SSE の設定

標準の設定はありません

このサーバーの README には解析可能な MCP 設定ブロックが含まれていません。インストール手順はリポジトリをご確認ください。

リポジトリ

Starlette MCP SSE のツール

ツール一覧はまだありません

この掲載には表示できるツール一覧がまだありません。サーバーにツールがないという意味ではありません。対応機能はプロジェクトのドキュメントをご確認ください。

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is Starlette MCP SSE?

It is a Server-Sent Events (SSE) implementation using the Starlette framework with Model Context Protocol (MCP) integration. The project demonstrates how to add MCP SSE endpoints to a Starlette web application while keeping standard web routes separate.

How to use Starlette MCP SSE?

You can run the server without cloning via uvx --from git+https://github.com/panz2018/starlette_mcp_sse.git start, or install fully with uv venv, activate it, install dependencies with uv pip install -r pyproject.toml, then start with python src/server.py or uv run start. After startup, the SSE endpoint is at /sse and message endpoint at /messages/. Debug using MCP Inspector with the mcp dev ./src/weather.py command and connect at http://localhost:8000/sse.

Key features of Starlette MCP SSE

  • Server-Sent Events (SSE) implementation with MCP
  • Starlette 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

Use cases of Starlette MCP SSE

  • Building AI assistants that need real‑time data via SSE
  • Integrating MCP tools into an existing Starlette web app
  • Debugging MCP functionality with the MCP Inspector
  • Extending a web application with custom routes while maintaining MCP endpoints
  • Connecting AI coding tools like Continue to MCP‑enabled weather services

よくある質問

1

What is the Model Context Protocol (MCP)?

MCP is an open standard that lets AI models interact with external tools and data sources, solving context limitations, tool integration, interoperability, and extensibility challenges.

2

What are the prerequisites for running Starlette MCP SSE?

You need the UV Package Manager installed. The recommended install command is: `powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"`.

3

What endpoints are available after starting the server?

Standard web routes: `/`, `/about`, `/status`, `/docs`. MCP SSE endpoints: `/sse` (SSE stream) and `/messages/` (message posting). The main server runs on `http://localhost:8000`.

4

How can I debug the MCP functionality?

Use the MCP Inspector by running `mcp dev ./src/weather.py`, open `http://localhost:5173`, set Transport Type to SSE, enter URL `http://localhost:8000/sse`, and click Connect. Then list and test tools like `get_alerts` and `get_forcast`.

5

How do I integrate this server with the Continue VS Code extension?

Add the following JSON to your Continue settings under `experimental.modelContextProtocolServers`: `{"transport":{"name":"weather","type":"sse","url":"http://localhost:8000/sse"}}`.

コメント

「その他」の他のコンテンツ