Poe Proxy MCP Server

MIT License
  • Linux
  • Apple

Integrations

  • Supports configuration through environment variables stored in .env files for settings like API keys, debug mode, and file size limits.

  • Provides file sharing capabilities with AI models, allowing users to upload and analyze files with size limits configurable through environment variables.

  • Repository hosting for the project code with installation instructions for cloning from GitHub.

Poe プロキシ MCP サーバー

Poe.com APIをプロキシするFastMCPサーバー。Poeモデルのクエリやファイル共有のためのツールを公開します。このサーバーは、Claude 3.7 SonnetおよびPoeで利用可能な他のモデルとの互換性を確保するように特別に設計されています。

特徴

  • 複数のモデルのサポート: GPT-4o、Claude 3 Opus、Claude 3 Sonnet、Gemini Pro など、Poe で利用可能なさまざまなモデルを照会します。
  • Claude 3.7 Sonnet 互換性: Claude の思考プロトコルの特別な処理
  • ファイル共有: 対応するモデルとファイルを共有します
  • セッション管理: 複数のクエリにわたって会話のコンテキストを維持する
  • ストリーミングレスポンス: モデルからリアルタイムのストリーミングレスポンスを取得する
  • Webクライアントのサポート: SSEトランスポート経由でWebクライアントでサーバーを使用する

インストール

前提条件

  • Python 3.8以上
  • Poe API キー ( Poe.comから取得)

クイックインストール

提供されているインストール スクリプトを使用します。

git clone https://github.com/Anansitrading/poe-proxy-mcp.git cd poe-proxy-mcp chmod +x install.sh ./install.sh

スクリプトは次のようになります。

  1. 仮想環境を作成する
  2. すべての依存関係をインストールする
  3. .envファイルが存在しない場合は作成します
  4. STDIOとSSEトランスポートの両方に対応するサーバーを設定する

手動設定

手動で設定する場合:

  1. このリポジトリをクローンします:
    git clone https://github.com/Anansitrading/poe-proxy-mcp.git cd poe-proxy-mcp
  2. 仮想環境を作成し、依存関係をインストールします。
    python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
  3. Poe API キーを使用して.envファイルを作成します。
    cp .env.example .env # Edit .env with your API key

パッケージとしてのインストール

サーバーを Python パッケージとしてインストールすることもできます。

pip install -e .

これによりpoe-mcppoe-mcp-sseコマンドが環境で使用できるようになります。

構成

サーバーは環境変数を使用して設定できます。

変数説明デフォルト
POE_API_KEYPoe APIキー(必須)なし
DEBUG_MODE詳細ログを有効にするfalse
CLAUDE_COMPATIBLEClaude互換モードを有効にするtrue
MAX_FILE_SIZE_MBアップロード可能なファイルの最大サイズ10
SESSION_EXPIRY_MINUTESセッションの有効期限(分)60

使用法

サーバーの実行

標準モード(STDIO)

これはデフォルトのモードで、コマンドラインでの使用に適しています。

# If installed as a package: poe-mcp # Or directly: python poe_server.py
ウェブモード(SSE)

このモードでは、サーバーを Web クライアントで使用できるようになります。

# If installed as a package: poe-mcp-sse [port] # Or directly: python run_sse_server.py [port]

デフォルトではサーバーはポート 8000 で起動しますが、別のポートを指定することもできます。

利用可能なツール

サーバーは次のツールを公開します。

ask_poe

Poe ボットに質問します。

response = await mcp.call("ask_poe", { "bot": "claude", # or "o3", "gemini", "perplexity", "gpt" "prompt": "What is the capital of France?", "session_id": "optional-session-id", # Optional "thinking": { # Optional, for Claude models "thinking_enabled": True, "thinking_depth": 2 } })
ask_with_attachment

ファイルを添付して Poe ボットに質問します。

response = await mcp.call("ask_with_attachment", { "bot": "claude", "prompt": "Analyze this code", "attachment_path": "/path/to/file.py", "session_id": "optional-session-id", # Optional "thinking": { # Optional, for Claude models "thinking_enabled": True } })
clear_session

セッションの会話履歴を消去します。

response = await mcp.call("clear_session", { "session_id": "your-session-id" })
list_available_models

利用可能な Poe モデルとその機能を一覧表示します。

response = await mcp.call("list_available_models", {})
get_server_info

サーバー構成に関する情報を取得します。

response = await mcp.call("get_server_info", {})

ウェブクライアント

シンプルなウェブクライアントがexamplesディレクトリに含まれています。使い方は以下のとおりです。

  1. サーバーを SSE モードで起動します。
    python run_sse_server.py
  2. ブラウザでexamples/web_client.htmlを開きます。
  3. サーバーの URL (デフォルト: http://localhost:8000 ) を入力し、「利用可能なモデルを取得」をクリックします。
  4. モデルを選択し、プロンプトを入力して、「送信」をクリックします。

シンプルなクエリ

# examples/simple_query.py import asyncio from fastmcp import MCPClient async def main(): client = MCPClient("http://localhost:8000") response = await client.call("ask_poe", { "bot": "claude", "prompt": "Explain quantum computing in simple terms" }) print(f"Session ID: {response['session_id']}") print(f"Response: {response['text']}") if __name__ == "__main__": asyncio.run(main())

ファイル添付

# examples/file_attachment.py import asyncio from fastmcp import MCPClient async def main(): client = MCPClient("http://localhost:8000") response = await client.call("ask_with_attachment", { "bot": "claude", "prompt": "Analyze this code and suggest improvements", "attachment_path": "examples/simple_query.py" }) print(f"Session ID: {response['session_id']}") print(f"Response: {response['text']}") if __name__ == "__main__": asyncio.run(main())

クロードの互換性

このサーバーは、Claudeモデル、特に思考プロトコルに特定のフォーマットを必要とするClaude 3.7 Sonnetモデルに対する特別な処理を備えています。Claudeモデルを使用する場合:

  1. サーバーは自動的に Claude モデルを検出し、適切な書式を適用します。
  2. thinkingパラメータを指定することで思考プロトコルを有効にすることができます。
    "thinking": { "thinking_enabled": True, "thinking_depth": 2, # Optional, default is 1 "thinking_style": "detailed" # Optional }
  3. 思考プロトコルが失敗した場合、サーバーは自動的に思考プロトコルなしで再試行します。

テスト

テスト スイートを実行するには:

python run_tests.py

詳細出力の場合:

python run_tests.py --verbose

トラブルシューティング

よくある問題

  1. 認証エラー: .envファイル内の Poe API キーが正しいことを確認してください。
  2. 接続エラー: ネットワークから Poe.com にアクセスできることを確認してください。
  3. ファイルアップロードエラー: ファイルが存在し、サイズ制限内であることを確認してください。
  4. クロード思考プロトコルの問題: クロード思考プロトコルでエラーが発生した場合は、 .envファイルでCLAUDE_COMPATIBLE=false設定して無効にしてみてください。

デバッグ

より詳細なログを取得するには、 .envファイルでDEBUG_MODE=trueを設定してデバッグ モードを有効にします。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Poe.com API をプロキシする FastMCP サーバー。ユーザーはさまざまな AI モデル (Claude 3.7 Sonnet を含む) を照会し、それをサポートするモデルとファイルを共有できます。

  1. Features
    1. Installation
      1. Prerequisites
      2. Quick Installation
      3. Manual Setup
      4. Installation as a Package
    2. Configuration
      1. Usage
        1. Running the Server
        2. Available Tools
      2. Web Client
        1. Examples
          1. Simple Query
          2. File Attachment
        2. Claude Compatibility
          1. Testing
            1. Troubleshooting
              1. Common Issues
              2. Debugging
            2. License

              Related MCP Servers

              • A
                security
                F
                license
                A
                quality
                An MCP protocol server that enables web search functionality using the Tavily API, allowing AI assistants to perform internet searches in real-time.
                Last updated -
                4
                2
                Python
              • -
                security
                A
                license
                -
                quality
                An MCP server that enables AI assistants like Claude to interact with Substack newsletters, allowing for post retrieval, content searching, and author information access through a standardized interface.
                Last updated -
                Python
                MIT License
                • Linux
                • Apple
              • -
                security
                A
                license
                -
                quality
                An MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.
                Last updated -
                125
                Python
                MIT License
                • Apple
                • Linux
              • -
                security
                F
                license
                -
                quality
                An MCP server that crawls API documentation websites and exposes their content to AI models, enabling them to search, browse, and reference API specifications.
                Last updated -
                Python

              View all related MCP servers

              ID: f5z8e8j9gt