Skip to main content
Glama

IBKR TWS MCP Server

by haymant
test_server_endpoints.py1.07 kB
#!/usr/bin/env python3 """Test the MCP server endpoints""" import asyncio import httpx async def test_endpoints(): # Wait a bit for server to start await asyncio.sleep(2) base_url = "http://localhost:8000" async with httpx.AsyncClient(timeout=5.0) as client: # Test various endpoints endpoints = [ "/api/v1", "/api/v1/", "/api/v1/mcp", ] for endpoint in endpoints: url = f"{base_url}{endpoint}" try: response = await client.get(url) print(f"\nGET {endpoint}") print(f" Status: {response.status_code}") print(f" Headers: {dict(response.headers)}") if response.status_code < 500: content = response.text[:200] print(f" Content: {content}...") except Exception as e: print(f"\nGET {endpoint}") print(f" Error: {e}") if __name__ == "__main__": asyncio.run(test_endpoints())

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/haymant/tws-mcp'

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