SyncOFIMA
Provides tools to query data replicated from OFIMA into Supabase, including listing tables, describing table schemas, querying rows with filters, counting rows, and running custom SQL SELECT statements against the Supabase PostgreSQL database.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SyncOFIMACount rows in the clientes table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SyncOFIMA
Replicación automática de tablas OFIMA (SQL Server) → Supabase (PostgreSQL)
MCP Server para consultar los datos desde Claude.
Estructura
SyncOFIMA/
├── replicate.py # Script de replicación
├── mcp_server.py # MCP server para Claude
├── requirements.txt
├── .env.example # Plantilla de variables de entorno
└── README.mdRelated MCP server: Supabase MCP
Setup inicial
1. Instalar dependencias
pip install -r requirements.txtEn Windows necesitas tener instalado ODBC Driver 17 for SQL Server.
Descarga: https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
2. Crear el archivo .env
cp .env.example .envLlena las variables:
Replicación
Ejecutar manualmente
python replicate.pyCómo funciona
Lee cada tabla desde SQL Server (OFIMA)
Borra y recrea la tabla en Supabase (sobrescritura total)
Reintentos automáticos: máximo 3, con backoff exponencial (10s, 20s, 40s)
Logs por stdout (visibles en Railway dashboard)
Configurar en Railway (Cron Job)
En tu proyecto Railway → New Service → Empty Service
En Settings → Source: apunta a este repositorio
En Settings → Start Command:
python replicate.pyEn Variables: agrega todas las del
.envEn Cron Schedule:
0 2 * * *(todos los días a las 2:00 AM UTC)
⚠️ Ajusta la hora al timezone de tu servidor. Si OFIMA está en Colombia (UTC-5), usa
0 7 * * *para que corra a las 2:00 AM hora Colombia.
MCP Server (Claude.ai web)
Desplegar en Railway
En tu proyecto Railway → New Service → apunta al repositorio
Railway detecta el
Procfiley correpython mcp_server.pyautomáticamenteAgrega la variable
DATABASE_URLen las variables del servicioRailway te da una URL pública tipo
https://tu-app.up.railway.app
Conectar en Claude.ai web
En Claude.ai → icono de herramientas → Agregar conector personalizado
Nombre: OFIMA
URL del servidor MCP remoto:
https://tu-app.up.railway.app/mcpGuardar
Verás las herramientas disponibles:
Herramienta | Descripción |
| Lista las tablas disponibles |
| Columnas y tipos de una tabla |
| Consulta con filtros opcionales |
| Cuenta filas con filtros opcionales |
| SQL SELECT personalizado |
Troubleshooting
Error: [ODBC Driver 17] Cannot open server
Verifica que el host
172.200.231.95sea accesible desde donde corres el scriptEn Railway puede requerir que el servidor SQL Server tenga acceso desde IPs externas
Error: SSL connection required en Supabase
Agrega
?sslmode=requireal final delDATABASE_URL:postgresql://user:pass@host:5432/db?sslmode=require
Error: column X is of type Y but expression is of type Z
Supabase es estricto con tipos. El script infiere tipos básicos pero puede fallar con tipos especiales de SQL Server.
Solución: edita el
pg_type_mapenreplicate.pypara ajustar la columna problemática.
La tabla llega vacía
Confirma que el usuario
db_readtiene permisos de SELECT en esa tabla en OFIMA.Prueba la consulta directamente:
SELECT TOP 10 * FROM dbo.nombre_tabla
MCP no aparece en Claude
Verifica que la ruta en
argssea la ruta absoluta correctaCorre
python mcp_server.pymanualmente para ver si hay erroresRevisa los logs de Claude en
%APPDATA%\Claude\logs\
Cambiar esquema de OFIMA
Si las tablas no están en dbo, agrega al .env:
OFIMA_SCHEMA=nombre_esquemaThis server cannot be installed
Maintenance
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
- SupabaseOAuthcom.supabase
MCP server for interacting with the Supabase platform
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that connects to Supabase PostgreSQL databases, exposing table schemas as resources and providing tools for data analysis through SQL queries.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Supabase, enabling database CRUD, storage management, auth administration, project management, edge functions, and secrets via 31 tools.10MIT
- AlicenseBqualityCmaintenanceMCP server providing backend access to PostgreSQL, Storage (Supabase/S3), Iceberg data lake, and SQL seeds. It offers 32 tools for database queries, storage operations, seed management, and more.313MIT
- AlicenseNot gradedqualityFmaintenanceMCP server for self-hosted Supabase with RLS-aware PostgreSQL and PostgREST layers, enabling safe database introspection, SQL queries, and PostgREST access via natural language.MIT