Skip to main content
Glama
DavidHolguin

FastAPI MCP Server

by DavidHolguin

MCP Server (FastAPI + Supabase + n8n)

Estructura

  • main.py: App FastAPI y healthcheck /healthz.

  • app/mcp/server.py: Endpoint /mcp JSON-RPC 2.0 (tools/list, tools/call).

  • app/integrations/supabase.py: Operaciones DB/Storage/Vector.

  • app/integrations/n8n.py: Invocación de webhooks n8n.

  • app/security/auth.py: API tokens por cabecera x-api-key.

  • app/config.py: Carga de variables de entorno.

  • migrations/001_init.sql: Esquema Supabase (session_state, tool_audit, vector_store, RPC match_vectors).

  • tools.schema.json: Definiciones de herramientas MCP.

Related MCP server: SupaMCPBuilder

Variables de entorno

Copiar .env.example a .env en local o configurar en Railway.

  • SUPABASE_URL: URL del proyecto Supabase.

  • SUPABASE_SERVICE_ROLE_KEY: clave service role (solo backend).

  • SUPABASE_ANON_KEY: opcional.

  • N8N_WEBHOOK_BASE: base de webhooks públicos de n8n, ej: https://n8n.tu-dominio.com/webhook.

  • MCP_API_TOKENS: CSV de tokens válidos, ej: token1,token2.

  • ALLOW_ORIGINS: lista CORS, ej: https://mi-host-agente.com.

Desarrollo local (Windows PowerShell)

python -m venv .venv
. .venv/Scripts/Activate.ps1
pip install -r requirements.txt
$env:MCP_API_TOKENS="dev-token"
$env:SUPABASE_URL="https://xxxxx.supabase.co"
$env:SUPABASE_SERVICE_ROLE_KEY="eyJ..."
$env:N8N_WEBHOOK_BASE="https://n8n.tu-dominio.com/webhook"
uvicorn main:app --host 0.0.0.0 --port 8000 --reload

Probar:

  • GET http://localhost:8000/healthz

  • POST http://localhost:8000/mcp con header x-api-key: dev-token y body:

{"jsonrpc":"2.0","id":"1","method":"tools/list"}

Despliegue en Railway

  • Añadir servicio Dockerfile.

  • Variables de entorno: SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, N8N_WEBHOOK_BASE, MCP_API_TOKENS, ALLOW_ORIGINS.

  • Comando inicio: uvicorn main:app --host 0.0.0.0 --port $PORT --proxy-headers.

  • Healthcheck: /healthz.

  • Escalado horizontal: habilitar auto-scale; la app es stateless.

Migraciones Supabase

Ejecutar migrations/001_init.sql en el SQL Editor de Supabase.

Seguridad

  • Mantener Service Role solo en backend.

  • Rotar MCP_API_TOKENS periódicamente.

  • Opcional: firmar requests con HMAC y timestamp para antireplay.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Docker-deployable server that enables interaction with Supabase databases via HTTP streaming, allowing n8n workflows, AI agents, and automation tools to execute SQL queries, manage database migrations, deploy edge functions, and search documentation.
    5
    Apache 2.0
  • A
    license
    Not graded
    quality
    D
    maintenance
    A runtime-configurable MCP server for Supabase databases that enables dynamic tool creation through JSON configuration. Build custom database operations (select, insert, update, delete) without writing code, with built-in authentication and template support.
    16
    11
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    A production-grade MCP server that centralizes AI integrations for Appwrite, Supabase, and MySQL databases. It also enables triggering n8n workflows via webhooks and performing generic REST API calls with built-in retry logic.
    -

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/DavidHolguin/mcpEAM'

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