MCP RifaExpress Backend
Provides tools to interact with a PostgreSQL database, allowing users to execute SELECT queries, inspect table schemas, and list available tables.
Click on "Deploy 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., "@MCP RifaExpress Backend show me the list of active users and their plans"
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.
MCP RifaExpress Backend
MCP Server para interactuar con el backend de RifaExpress (PostgreSQL + API REST).
Variables de Entorno
Crea un archivo .env en la raíz del proyecto:
# PostgreSQL Connection
DB_HOST=localhost
DB_PORT=5432
DB_NAME=rifaexpress
DB_USER=postgres
DB_PASSWORD=tu_password
# API REST (opcional)
API_URL=http://localhost:3000/api
API_TOKEN=tu_jwt_tokenInstalación
npm install
npm run buildUso
npm startTools Disponibles
Base de Datos
rifaexpress_query_db- Ejecutar queries SELECT en PostgreSQLrifaexpress_inspect_table- Ver schema de una tablarifaexpress_list_tables- Listar todas las tablas
Entidades
rifaexpress_get_companies- Obtener companies con filtrosrifaexpress_get_users- Obtener users con filtrosrifaexpress_get_plans- Obtener plansrifaexpress_get_subscriptions- Obtener subscriptions (cuando exista la tabla)
Utilidades
rifaexpress_health_check- Verificar conexión a BD y API
Available Tools
8 toolsrifaexpress_get_companiesB
Obtiene companies (empresas) con filtros opcionales de subscriptionStatus.
Inputs: subscriptionStatus, limit.
rifaexpress_get_plansC
Obtiene plans de suscripción.
Inputs: isActive.
rifaexpress_get_subscriptionsC
Obtiene subscriptions (si la tabla existe). Esta entidad se creará en Fase 1 del SaaS Core.
Inputs: companyId, status, limit.
rifaexpress_get_usersC
Obtiene users con filtros opcionales de companyId y role.
Inputs: companyId, role, limit.
rifaexpress_health_checkA
Verifica la conexión con la base de datos PostgreSQL. Útil para diagnosticar problemas de configuración.
Inputs: no named parameters.
rifaexpress_inspect_tableB
Inspecciona el schema de una tabla específica (columnas, tipos, nullability, etc.).
Inputs: tableName (required).
rifaexpress_list_tablesC
Lista todas las tablas en el schema especificado.
Inputs: schema.
rifaexpress_query_dbA
Ejecuta una query SELECT en la base de datos PostgreSQL de RifaExpress. Solo queries SELECT están permitidas por seguridad.
Inputs: sql (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose with no overlap: get_companies, get_plans, get_subscriptions, get_users retrieve specific entities, health_check tests connectivity, inspect_table examines schema, list_tables enumerates tables, and query_db executes custom queries. The descriptions reinforce these distinct roles, making misselection unlikely.
All tools follow a consistent 'rifaexpress_verb_noun' pattern using snake_case, with verbs like 'get', 'health_check', 'inspect', 'list', and 'query'. This predictability aids agent understanding and tool selection without confusion from mixed conventions.
With 8 tools, this server is well-scoped for a backend database interaction server. It covers essential operations like data retrieval, schema inspection, and health checks without being overly sparse or bloated, making each tool earn its place in the set.
The toolset provides strong read-only coverage for database interaction, including entity retrieval, schema exploration, and connectivity checks. However, it lacks write operations (e.g., create, update, delete), which could be a gap for full CRUD workflows, though this might be intentional for security as noted in query_db's description.
Related MCP Connectors
MCP server for interacting with the Supabase platform
Butterbase MCP server — manage your backend: schemas, auth, functions, storage, RAG, deploys.
MCP Server for agents to onboard, pay, and provision services autonomously with InFlow
Hosted MCP server for PostgreSQL diagnostics: slow queries, missing indexes, connection pressure.