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クライアントでサーバーを使用する
Related MCP server: MCP Server for Replicate
インストール
前提条件
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スクリプトは次のようになります。
仮想環境を作成する
すべての依存関係をインストールする
.envファイルが存在しない場合は作成しますSTDIOとSSEトランスポートの両方に対応するサーバーを設定する
手動設定
手動で設定する場合:
このリポジトリをクローンします:
git clone https://github.com/Anansitrading/poe-proxy-mcp.git cd poe-proxy-mcp仮想環境を作成し、依存関係をインストールします。
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txtPoe API キーを使用して
.envファイルを作成します。cp .env.example .env # Edit .env with your API key
パッケージとしてのインストール
サーバーを Python パッケージとしてインストールすることもできます。
pip install -e .これによりpoe-mcpとpoe-mcp-sseコマンドが環境で使用できるようになります。
構成
サーバーは環境変数を使用して設定できます。
変数 | 説明 | デフォルト |
| Poe APIキー(必須) | なし |
| 詳細ログを有効にする |
|
| Claude互換モードを有効にする |
|
| アップロード可能なファイルの最大サイズ |
|
| セッションの有効期限(分) |
|
使用法
サーバーの実行
標準モード(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ディレクトリに含まれています。使い方は以下のとおりです。
サーバーを SSE モードで起動します。
python run_sse_server.pyブラウザで
examples/web_client.htmlを開きます。サーバーの URL (デフォルト:
http://localhost:8000) を入力し、「利用可能なモデルを取得」をクリックします。モデルを選択し、プロンプトを入力して、「送信」をクリックします。
例
シンプルなクエリ
# 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モデルを使用する場合:
サーバーは自動的に Claude モデルを検出し、適切な書式を適用します。
thinkingパラメータを指定することで思考プロトコルを有効にすることができます。"thinking": { "thinking_enabled": True, "thinking_depth": 2, # Optional, default is 1 "thinking_style": "detailed" # Optional }思考プロトコルが失敗した場合、サーバーは自動的に思考プロトコルなしで再試行します。
テスト
テスト スイートを実行するには:
python run_tests.py詳細出力の場合:
python run_tests.py --verboseトラブルシューティング
よくある問題
認証エラー:
.envファイル内の Poe API キーが正しいことを確認してください。接続エラー: ネットワークから Poe.com にアクセスできることを確認してください。
ファイルアップロードエラー: ファイルが存在し、サイズ制限内であることを確認してください。
クロード思考プロトコルの問題: クロード思考プロトコルでエラーが発生した場合は、
.envファイルでCLAUDE_COMPATIBLE=false設定して無効にしてみてください。
デバッグ
より詳細なログを取得するには、 .envファイルでDEBUG_MODE=trueを設定してデバッグ モードを有効にします。
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.