Skip to main content
Glama
phuihock

TA-Lib MCP Server

by phuihock
http_api.py1.38 kB
"""HTTP REST API transport implementation.""" import logging import uvicorn from .base import BaseTransport from ..http_api_server import create_http_api_app # Configure logger logger = logging.getLogger(__name__) class HttpApiTransport(BaseTransport): """HTTP REST API transport for indicator endpoints only (no MCP). This transport runs a pure FastAPI server exposing /api/tools endpoints for calling indicators via HTTP. It does not expose MCP protocol endpoints. """ def __init__(self, host: str = "0.0.0.0", port: int = 8001, debug: bool = False): # Note: No server argument since this doesn't use FastMCP super().__init__(None, debug) self.host = host self.port = port async def run(self) -> None: """Run the HTTP API server on the specified host and port.""" if self.debug: logger.debug(f"Starting HTTP API server on {self.host}:{self.port}") # Create the FastAPI app with only /api/tools endpoints app = create_http_api_app() # Run using uvicorn config = uvicorn.Config( app, host=self.host, port=self.port, log_level="info" if self.debug else "warning", access_log=self.debug, ) server = uvicorn.Server(config) await server.serve()

Latest Blog Posts

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/phuihock/mcp-talib'

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