Skip to main content
Glama

MCP Server

server.py813 B
import os import logging from flask import Flask, render_template from werkzeug.middleware.proxy_fix import ProxyFix # Create the Flask app first to avoid circular imports app = Flask(__name__) app.secret_key = os.environ.get("SESSION_SECRET", "dev-secret-key") app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1) # Import our modules after app creation from app.core.logging import setup_logging from app.transport.http import register_routes from app.metrics import setup_metrics # Setup logging setup_logging() # Setup metrics setup_metrics(app) # Register routes register_routes(app) # Basic health check @app.route('/health') def health_check(): return {"status": "healthy", "service": "mcp-server"} # Documentation page @app.route('/') def index(): return render_template('index.html')

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/Krishanu-das-05/MCP'

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