Python MCP Cat Facts

by akream
  • Linux
  • Apple

Integrations

  • Provides a FastAPI-based server implementation that exposes cat facts data through SSE transport, complete with automatic OpenAPI documentation.

  • Integrates with Swagger UI to provide interactive API documentation, allowing users to explore and test the cat facts endpoints.

Python MCP Cat の豆知識

Server-Sent Events (SSE) トランスポートを使用してモデル コンテキスト プロトコル (MCP) を実装し、cat ファクトを提供する FastAPI サーバー。

特徴

  • ランダムに猫の豆知識を1つ入手
  • 10秒ごとに配信される猫の豆知識のストリームを購読してください
  • リアルタイム通信のためのSSE(サーバー送信イベント)
  • 自動 OpenAPI ドキュメントを備えた FastAPI フレームワーク

要件

  • Python 3.12以上
  • 依存関係:
    • ファスタピ
    • mcp[cli]
    • ウビコーン
    • cmake

インストール

リポジトリをクローンする

git clone <repository-url> cd python-mcp

仮想環境を作成する

python -m venv venv source venv/bin/activate # On Windows, use: venv\Scripts\activate

依存関係をインストールする

pip install -e .

SSEモードでサーバーを起動する

uv run コマンドを使用してサーバーを起動します。

uv run start

サーバーが稼働すると、次の場所で利用できるようになります:

VSコード統合

この MCP サーバーを VS Code で使用するには、 mcp.jsonファイルに次の構成を追加する必要があります。

{ "servers": { "mcp-sse": { "type": "sse", "url": "http://0.0.0.0:8000/sse" } } }

この構成は、SSE トランスポートを使用して MCP サーバーに接続する方法を VS Code に指示します。

Cat Facts APIの使用

猫に関する事実:

SSEエンドポイントに接続し、猫に関する情報を1つリクエストします。レスポンスは常に「Hi!」で始まります。

APIエンドポイント

  • GET / : ホームページ
  • GET /about : アプリケーションに関する情報
  • GET /status : 現在のサーバーステータス
  • GET /sse : MCP通信用のSSEエンドポイント
  • GET /docs : API ドキュメント (Swagger UI)
  • GET /redoc : 代替 API ドキュメント (ReDoc)

ライセンス

マサチューセッツ工科大学

-
security - not tested
F
license - not found
-
quality - not tested

Server-Sent Events (SSE) トランスポートを使用してモデル コンテキスト プロトコル (MCP) を実装し、オンデマンドまたは継続的なストリームとしてランダムな猫の情報を提供する FastAPI サーバー。

  1. 特徴
    1. 要件
      1. インストール
        1. リポジトリをクローンする
        2. 仮想環境を作成する
        3. 依存関係をインストールする
      2. SSEモードでサーバーを起動する
        1. VSコード統合
          1. Cat Facts APIの使用
            1. 猫に関する事実:
          2. APIエンドポイント
            1. ライセンス

              Related MCP Servers

              • -
                security
                A
                license
                -
                quality
                A high-performance FastAPI server supporting Model Context Protocol (MCP) for seamless integration with Large Language Models, featuring REST, GraphQL, and WebSocket APIs, along with real-time monitoring and vector search capabilities.
                Last updated -
                5
                Python
                MIT License
              • -
                security
                A
                license
                -
                quality
                A Server-Sent Events implementation using FastAPI framework that integrates Model Context Protocol (MCP), allowing AI models to access external tools and data sources like weather information.
                Last updated -
                9
                Python
                MIT License
              • -
                security
                F
                license
                -
                quality
                A simple application demonstrating Model Context Protocol (MCP) integration with FastAPI and Streamlit, allowing users to interact with LLMs through a clean interface.
                Last updated -
                3
                Python
                • Linux
              • A
                security
                F
                license
                A
                quality
                An implementation of the Model Context Protocol (MCP) server using Server-Sent Events (SSE) for real-time communication, providing tools for calculations and dynamic resource templates.
                Last updated -
                1
                JavaScript

              View all related MCP servers

              ID: 4sslfgnx26