Skip to main content
Glama

FastMCP

by Dev00355
config.py•1.19 kB
""" Configuration for FastMCP Server """ import os from typing import Optional from dotenv import load_dotenv # Load environment variables load_dotenv() class MCPConfig: """Configuration class for MCP server""" # Server Configuration SERVER_NAME: str = os.getenv("MCP_SERVER_NAME", "fastmcp-llm-router") SERVER_VERSION: str = os.getenv("MCP_SERVER_VERSION", "0.1.0") # LLM Service Configuration LOCAL_LLM_SERVICE_URL: str = os.getenv("LOCAL_LLM_SERVICE_URL", "http://localhost:5001") # Timeouts LLM_REQUEST_TIMEOUT: int = int(os.getenv("LLM_REQUEST_TIMEOUT", "60")) HEALTH_CHECK_TIMEOUT: int = int(os.getenv("HEALTH_CHECK_TIMEOUT", "10")) # Logging LOG_LEVEL: str = os.getenv("LOG_LEVEL", "INFO") # Optional: Authentication for LLM service LLM_SERVICE_API_KEY: Optional[str] = os.getenv("LLM_SERVICE_API_KEY") @classmethod def get_headers(cls) -> dict: """Get headers for LLM service requests""" headers = {"Content-Type": "application/json"} if cls.LLM_SERVICE_API_KEY: headers["Authorization"] = f"Bearer {cls.LLM_SERVICE_API_KEY}" return headers

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/Dev00355/custom-mcp'

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