Skip to main content
Glama

Poe Proxy MCP Server

simple_query.py1.7 kB
#!/usr/bin/env python3 """ Simple example of using the Poe Proxy MCP server. """ import os import sys import asyncio from fastmcp.client import Client # Add parent directory to path for imports sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) async def main(): """Run the example.""" # Connect to the server using STDIO transport # Replace with the path to your poe_server.py server_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'poe_server.py')) print(f"Connecting to server at: {server_path}") async with Client(f"stdio://{server_path}") as client: # Ask a question print("Asking initial question...") response = await client.call( "ask_poe", bot="GPT-3.5-Turbo", prompt="What is the capital of France?" ) print(f"\nResponse: {response['text']}") print(f"Session ID: {response['session_id']}") # Continue the conversation using the session ID print("\nAsking follow-up question...") follow_up = await client.call( "ask_poe", bot="GPT-3.5-Turbo", prompt="What is its population?", session_id=response["session_id"] ) print(f"\nResponse: {follow_up['text']}") # Clear the session print("\nClearing session...") clear_result = await client.call( "clear_session", session_id=response["session_id"] ) print(f"Clear result: {clear_result['status']} - {clear_result['message']}") if __name__ == "__main__": asyncio.run(main())

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Anansitrading/poe-proxy-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server