Cover image
Try Now
2025-04-14

Ein FASTMCP V2 -Server, der die POE.com -API stellt und sowohl STDIO- als auch SSE -Transporte unterstützt

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

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:

  1. Create a virtual environment
  2. Install all dependencies
  3. Create a .env file if it doesn't exist
  4. Set up the server for both STDIO and SSE transports

Manual Setup

If you prefer to set up manually:

  1. Clone this repository:

    git clone https://github.com/Anansitrading/poe-proxy-mcp.git
    cd poe-proxy-mcp
    
  2. 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
    
  3. Create a .env file 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:

  1. Start the server in SSE mode:

    python run_sse_server.py
    
  2. Open examples/web_client.html in your browser.

  3. Enter the server URL (default: http://localhost:8000) and click "Get Available Models".

  4. 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:

  1. The server automatically detects Claude models and applies the appropriate formatting.
  2. You can enable the thinking protocol by providing a thinking parameter:
    "thinking": {
        "thinking_enabled": True,
        "thinking_depth": 2,  # Optional, default is 1
        "thinking_style": "detailed"  # Optional
    }
    
  3. 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

  1. Authentication Error: Make sure your Poe API key is correct in the .env file.
  2. Connection Error: Check that you can access Poe.com from your network.
  3. File Upload Error: Ensure the file exists and is within the size limit.
  4. Claude Thinking Protocol Issues: If you encounter errors with Claude's thinking protocol, try disabling it by setting CLAUDE_COMPATIBLE=false in your .env file.

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.

相关推荐

  • av
  • Führen Sie mühelos LLM -Backends, APIs, Frontends und Dienste mit einem Befehl aus.

  • 1Panel-dev
  • 🔥 1Panel bietet eine intuitive Weboberfläche und einen MCP -Server, um Websites, Dateien, Container, Datenbanken und LLMs auf einem Linux -Server zu verwalten.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llm 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Zusammenfassung der weltbesten LLM -Ressourcen.

  • rulego
  • ⛓️Rugele ist ein leichter, leistungsstarker, leistungsstarker, eingebetteter Komponenten-Orchestrierungsregel-Motor-Rahmen für GO.

  • Byaidu
  • PDF wissenschaftliche Papierübersetzung mit erhaltenen Formaten - 基于 ai 完整保留排版的 pdf 文档全文双语翻译 , 支持 支持 支持 支持 google/deeptl/ollama/openai 等服务 提供 cli/gui/mcp/docker/zotero

  • Onelevenvy
  • Flock ist eine Workflow-basierte Low-Code-Plattform, um schnell Chatbots, Lappen und Koordinierung von Multi-Agent-Teams zu erstellen, die von Langgraph, Langchain, Fastapi und NextJs angetrieben werden.

  • n8n-io
  • Fair-Code-Workflow-Automatisierungsplattform mit nativen KI-Funktionen. Kombinieren Sie visuelles Gebäude mit benutzerdefiniertem Code, SelbstHost oder Cloud, 400+ Integrationen.

  • sigoden
  • Erstellen Sie einfach LLM -Tools und -Argarten mit einfachen Bash/JavaScript/Python -Funktionen.

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / diskord / telegram / slack 等平台 | 支持 Chatgpt 、 Deepseek 、 Diffy 、 Claude 、 Gemini 、 xai 、 ppio 、 、 ulama 、 lm Studio 、阿里云百炼、火山方舟、 siliconflow 、 qwen 、 mondshot 、 chatglm 、 sillytraven 、 mcp 等 llm 的机器人 / agent | LLM-basierte Instant Messaging Bots-Plattform, unterstützt Zwietracht, Telegramm, Wechat, Lark, Dingtalk, QQ, Slack

  • hkr04
  • Leichtes C ++ MCP (Modellkontextprotokoll) SDK

  • dmayboroda
  • On-Premise-Konversationslappen mit konfigurierbaren Behältern

    Reviews

    2.2 (6)
    Avatar
    user_S4OxcfU4
    2025-04-24

    I've been using the poe-proxy-mcp from Anansitrading and I'm thoroughly impressed. The tool is incredibly robust and easy to integrate into my projects. It offers seamless proxy functionalities which have significantly improved my workflow. Highly recommend it to anyone looking for reliable proxy management!

    Avatar
    user_o7rVuOt6
    2025-04-24

    I've been using poe-proxy-mcp by Anansitrading and it's fantastic! It significantly simplifies managing multiple proxies for Path of Exile with its intuitive interface. The seamless integration and robust performance have made my gaming experience much more enjoyable. Highly recommend it to fellow Path of Exile players!

    Avatar
    user_LN07ttN2
    2025-04-24

    As a devoted user of the poe-proxy-mcp developed by Anansitrading, I am thoroughly impressed by its seamless functionality and user-friendly interface. This tool has significantly simplified my workflow, providing an efficient and robust solution for my needs. Highly recommend it to anyone looking for a reliable proxy application!

    Avatar
    user_19kx9eG2
    2025-04-24

    I've been using the poe-proxy-mcp by Anansitrading and it has significantly improved my workflow. The intuitive design and seamless integration with my existing systems save me a great deal of time. The robust features and reliable performance make it an indispensable tool for anyone dealing with proxies. Highly recommend it!

    Avatar
    user_RF5YVKJB
    2025-04-24

    I've been using poe-proxy-mcp by Anansitrading and I'm thoroughly impressed. This tool is incredibly efficient and reliable for managing proxies. It's user-friendly and integrates seamlessly into my workflow. The support provided is excellent, and it significantly improves productivity. Highly recommend!

    Avatar
    user_wYjX5AfH
    2025-04-24

    POE-Proxy-MCP by Anansitrading is a fantastic tool for managing proxies with ease. Its intuitive interface and reliable performance make it a standout in its category. The seamless integration and user-friendly experience save time and boost productivity. Highly recommend to anyone in need of a top-notch proxy management solution!