Poe Proxy MCP Server
A FastMCP server that proxies the Poe.com API, allowing users to query various AI models (including Claude 3.7 Sonnet) and share files with models that support it.
README
Poe Proxy MCP Server
A FastMCP server that proxies the Poe.com API, exposing tools for querying Poe models and sharing files. This server is specifically designed to ensure compatibility with Claude 3.7 Sonnet and other models available through Poe.
Features
- Multiple Model Support: Query various models available on Poe including GPT-4o, Claude 3 Opus, Claude 3 Sonnet, Gemini Pro, and more
- Claude 3.7 Sonnet Compatibility: Special handling for Claude's thinking protocol
- File Sharing: Share files with models that support it
- Session Management: Maintain conversation context across multiple queries
- Streaming Responses: Get real-time streaming responses from models
- Web Client Support: Use the server with web clients via SSE transport
Installation
Prerequisites
- Python 3.8 or higher
- A Poe API key (get one from Poe.com)
Quick Installation
Use the provided installation script:
git clone https://github.com/Anansitrading/poe-proxy-mcp.git
cd poe-proxy-mcp
chmod +x install.sh
./install.sh
The script will:
- Create a virtual environment
- Install all dependencies
- Create a
.envfile if it doesn't exist - Set up the server for both STDIO and SSE transports
Manual Setup
If you prefer to set up manually:
-
Clone this repository:
git clone https://github.com/Anansitrading/poe-proxy-mcp.git cd poe-proxy-mcp -
Create a virtual environment and install dependencies:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt -
Create a
.envfile with your Poe API key:cp .env.example .env # Edit .env with your API key
Installation as a Package
You can also install the server as a Python package:
pip install -e .
This will make the poe-mcp and poe-mcp-sse commands available in your environment.
Configuration
The server can be configured using environment variables:
| Variable | Description | Default |
|---|---|---|
POE_API_KEY |
Your Poe API key (required) | None |
DEBUG_MODE |
Enable verbose logging | false |
CLAUDE_COMPATIBLE |
Enable Claude compatibility mode | true |
MAX_FILE_SIZE_MB |
Maximum file size for uploads | 10 |
SESSION_EXPIRY_MINUTES |
Session expiry duration in minutes | 60 |
Usage
Running the Server
Standard Mode (STDIO)
This is the default mode and is suitable for command-line usage:
# If installed as a package:
poe-mcp
# Or directly:
python poe_server.py
Web Mode (SSE)
This mode enables the server to be used with web clients:
# If installed as a package:
poe-mcp-sse [port]
# Or directly:
python run_sse_server.py [port]
The server will start on port 8000 by default, or you can specify a different port.
Available Tools
The server exposes the following tools:
ask_poe
Ask a question to a Poe bot.
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
Ask a question to a Poe bot with a file attachment.
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
Clear a session's conversation history.
response = await mcp.call("clear_session", {
"session_id": "your-session-id"
})
list_available_models
List available Poe models and their capabilities.
response = await mcp.call("list_available_models", {})
get_server_info
Get information about the server configuration.
response = await mcp.call("get_server_info", {})
Web Client
A simple web client is included in the examples directory. To use it:
-
Start the server in SSE mode:
python run_sse_server.py -
Open
examples/web_client.htmlin your browser. -
Enter the server URL (default:
http://localhost:8000) and click "Get Available Models". -
Select a model, enter your prompt, and click "Submit".
Examples
Simple Query
# 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())
File Attachment
# 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 Compatibility
This server includes special handling for Claude models, particularly Claude 3.7 Sonnet, which requires specific formatting for the thinking protocol. When using Claude models:
- The server automatically detects Claude models and applies the appropriate formatting.
- You can enable the thinking protocol by providing a
thinkingparameter:"thinking": { "thinking_enabled": True, "thinking_depth": 2, # Optional, default is 1 "thinking_style": "detailed" # Optional } - If the thinking protocol fails, the server will automatically retry without it.
Testing
To run the test suite:
python run_tests.py
For verbose output:
python run_tests.py --verbose
Troubleshooting
Common Issues
- Authentication Error: Make sure your Poe API key is correct in the
.envfile. - Connection Error: Check that you can access Poe.com from your network.
- File Upload Error: Ensure the file exists and is within the size limit.
- Claude Thinking Protocol Issues: If you encounter errors with Claude's thinking protocol, try disabling it by setting
CLAUDE_COMPATIBLE=falsein your.envfile.
Debugging
Enable debug mode by setting DEBUG_MODE=true in your .env file for more detailed logs.
License
This project is licensed under the MIT License - see the LICENSE file for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。