Skip to main content
Glama
nginx.confβ€’2.92 kB
user nginx; worker_processes auto; error_log /var/log/nginx/error.log warn; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; client_max_body_size 100M; # Gzip compression gzip on; gzip_vary on; gzip_proxied any; gzip_comp_level 6; gzip_types text/plain text/css text/xml text/javascript application/json application/javascript application/xml+rss application/rss+xml font/truetype font/opentype application/vnd.ms-fontobject image/svg+xml; # Rate limiting limit_req_zone $binary_remote_addr zone=api_limit:10m rate=10r/s; limit_req_zone $binary_remote_addr zone=general_limit:10m rate=30r/s; # MCP Backend upstream upstream mcp_backend { server mcp-backend:5000; } # Redirect HTTP to HTTPS (if using SSL) server { listen 8000; server_name _; # MCP Backend API endpoints location /api/ { limit_req zone=api_limit burst=20 nodelay; proxy_pass http://mcp_backend; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; # Timeouts for long-running operations proxy_connect_timeout 10s; proxy_send_timeout 60s; proxy_read_timeout 60s; } # Health check endpoint location /health { access_log off; return 200 "healthy\n"; add_header Content-Type text/plain; } # Metrics endpoint (Prometheus) location /metrics { limit_req zone=general_limit burst=5 nodelay; proxy_pass http://mcp_backend/metrics; } # Default error handling error_page 502 503 504 /50x.html; location = /50x.html { return 503; } } # Metrics/Monitoring port server { listen 9000; server_name _; location /metrics { proxy_pass http://mcp_backend/metrics; access_log off; } location /health { access_log off; return 200 "healthy\n"; add_header Content-Type text/plain; } } }

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/mikeychann-hash/MCPM'

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