Skip to main content
Glama

Multi-Agent Communication Platform (MCP)

logging.py805 B
import logging import os from pathlib import Path def setup_logging(): """Configure logging for the application.""" log_level = os.getenv('LOG_LEVEL', 'INFO') log_file = os.getenv('LOG_FILE_PATH', '/app/logs/chat-mcp.log') # Create log directory Path(log_file).parent.mkdir(parents=True, exist_ok=True) # Configure logging - only to file, not stdout # stdout/stderr must be reserved for MCP stdio communication logging.basicConfig( level=getattr(logging, log_level), format='%(asctime)s - %(name)s - %(levelname)s - %(message)s', handlers=[ logging.FileHandler(log_file) ] ) # Set specific loggers logging.getLogger('uvicorn').setLevel(logging.INFO) logging.getLogger('mcp').setLevel(logging.INFO)

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/thiagovictorino/chat-mcp'

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