MCP GraphQL Server Multi-Fuente
Allows querying and mutating data in Google Sheets through a dynamically generated GraphQL schema, including support for multiple sheets/tabs such as employee records and departments.
Allows querying and mutating collections in MongoDB with filtering, ordering, pagination, and CRUD operations through GraphQL.
Allows querying and mutating tables in MySQL databases with filtering, ordering, pagination, and CRUD operations through GraphQL.
Allows querying and mutating tables in PostgreSQL databases with filtering, ordering, pagination, and CRUD operations through GraphQL.
Allows querying and mutating records in SQLite databases with filtering, ordering, pagination, and CRUD operations through GraphQL.
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., "@MCP GraphQL Server Multi-Fuenteconsulta los empleados con salario mayor a 50000 ordenados por salario"
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.
đź“„ README.md
# MCP GraphQL Server Multi-Fuente
Servidor MCP (Model Context Protocol) que expone una API GraphQL dinámica sobre múltiples fuentes de datos: CSV, Google Sheets, SQLite, PostgreSQL, MySQL, MongoDB y Oracle.
## ✨ CaracterĂsticas
- 🔌 **Adaptadores múltiples**: CSV, Google Sheets, SQLite, PostgreSQL, MySQL, MongoDB, Oracle (preparado).
- 🧠**Esquema GraphQL dinámico**: genera automáticamente el esquema según los datos.
- 🔍 **Consultas flexibles**: filtros avanzados (`where` con operadores), ordenamiento, paginación, selección de campos.
- ✍️ **Mutaciones**: crear, actualizar y eliminar registros con confirmación para eliminaciones.
- 🚀 **Batching**: ejecuta varias consultas en una sola petición.
- đź’ľ **Persisted Queries**: guarda consultas frecuentes y reutilĂzalas por hash.
- 📊 **Métricas**: seguimiento de rendimiento de consultas y mutaciones.
- 🛡️ **Seguridad**: lĂmite de complejidad, errores personalizados, directiva `@auth` de ejemplo.
- 🔄 **Cambio de fuente dinámico**: alterna entre bases de datos sin reiniciar.
## 🏗️ Arquitectura
Cliente MCP (LM Studio, Claude Desktop) │ (stdio) ▼ Servidor MCP (index.ts) │ ├── Herramientas: graphql_query, graphql_mutation, switch_source, list_sources, etc. │ ▼ Capa GraphQL (schema.ts + resolvers.ts) │ ├── Adaptadores (BaseAdapter) │ ├── CSVAdapter │ ├── GoogleSheetsAdapter │ ├── SQLiteAdapter │ ├── PostgresAdapter │ ├── MySQLAdapter │ ├── MongoDBAdapter │ └── OracleAdapter │ ▼ Fuentes de datos (CSV, Google Sheets, SQLite, ...)
## 📦 Requisitos
- Node.js 18 o superior
- npm 9+
- Para SQLite: `better-sqlite3`
- Para PostgreSQL: `pg`
- Para MySQL: `mysql2`
- Para MongoDB: `mongodb`
- Para Oracle: `oracledb` (requiere cliente nativo)
## 🛠️ Instalación
```bash
# Clonar o descargar el proyecto
git clone <url-del-repo>
cd mcp-graphql-server
# Instalar dependencias base
npm install
# Instalar dependencias especĂficas segĂşn adaptadores a usar
npm install better-sqlite3 # SQLite
npm install pg # PostgreSQL
npm install mysql2 # MySQL
npm install mongodb # MongoDB
npm install oracledb # Oracle (requiere Oracle Instant Client)⚙️ Configuración
Crea un archivo .env en la raĂz con las variables de entorno:
# Fuente activa por defecto: csv, google-sheets, sqlite, postgres, mysql, mongodb, oracle
DEFAULT_SOURCE=google-sheets
# CSV
CSV_FILE_PATH=./src/data/sample.csv
# Google Sheets
GOOGLE_SHEETS_API_URL=https://script.google.com/macros/s/TU_ID/exec
GOOGLE_SHEETS_NAME=Empleados
# SQLite
SQLITE_DB_PATH=./src/data/sample.db
SQLITE_TABLE=empleados
# PostgreSQL
PG_CONNECTION_STRING=postgres://user:password@localhost:5432/dbname
PG_TABLE=empleados
# MySQL
MYSQL_HOST=localhost
MYSQL_USER=root
MYSQL_PASSWORD=secret
MYSQL_DATABASE=test
MYSQL_TABLE=empleados
# MongoDB
MONGO_URI=mongodb://localhost:27017
MONGO_DB_NAME=test
MONGO_COLLECTION=empleados
# Oracle
ORACLE_USER=system
ORACLE_PASSWORD=oracle
ORACLE_CONNECT_STRING=localhost:1521/XEPDB1
ORACLE_TABLE=empleadosRelated MCP server: Polyglot DB MCP
🚀 Uso
Compilar
npm run buildIniciar el servidor
node dist/index.jsEl servidor se conecta por stdio, listo para que un cliente MCP (como LM Studio o Claude Desktop) lo utilice.
Configurar en LM Studio
Abre LM Studio y carga un modelo (ej. Gemma).
Ve a la configuraciĂłn del chat y agrega un servidor MCP.
Comando:
nodeArgumentos:
H:\deepseek-graphql-mcp\dist\index.jsVariables de entorno: copia las de tu
.env.
Reinicia la conversaciĂłn para que el modelo reconozca las herramientas.
Herramientas disponibles
graphql_query– Ejecuta consultas GraphQL.graphql_batch– Ejecuta varias consultas en una llamada.graphql_mutation– Crea, actualiza o elimina registros (con confirmación para DELETE).switch_source– Cambia la fuente de datos activa.list_sources– Lista las fuentes disponibles.register_persisted_query– Registra una consulta persistida.get_metrics– Obtiene métricas de rendimiento.get_schema– Muestra el esquema de la fuente activa.
đź§Ş Ejemplos de consultas
Obtener todos los registros
{
records {
id
nombre
email
}
}Filtrar y ordenar
{
records(
where: { salario: { operator: gt, value: "50000" } },
orderBy: [{ field: "salario", direction: "desc" }]
) {
nombre
salario
}
}Obtener departamentos (solo Google Sheets)
{
departamentos {
id
nombre
ubicacion
}
}Crear registro
mutation {
createRecord(input: { nombre: "Nuevo", email: "nuevo@email.com" }) {
id
nombre
}
}Eliminar con confirmaciĂłn
mutation {
deleteRecord(id: "11")
}La primera llamada devuelve una advertencia; el modelo debe llamar de nuevo con confirm: true.
🔌 Adaptadores incluidos
Adaptador | Archivo | Dependencia | Estado |
CSV |
|
| âś… Probado |
Google Sheets |
|
| âś… Probado |
SQLite |
|
| âś… Probado |
PostgreSQL |
|
| 📦 Catálogo |
MySQL |
|
| 📦 Catálogo |
MongoDB |
|
| 📦 Catálogo |
Oracle |
|
| 📦 Catálogo |
Consulta EXTRA.md para más detalles sobre los adaptadores de base de datos.
đź§° SoluciĂłn de problemas
El modelo no cambia de fuente: Refuerza el system prompt con instrucciones claras sobre
switch_source.Error de tipos en GraphQL: AsegĂşrate de que el esquema se haya inferido correctamente (revisa logs de inicializaciĂłn).
Google Sheets no carga: Verifica que la URL de Apps Script sea pĂşblica y que el nombre de la hoja coincida.
SQLite no funciona: Comprueba que la base de datos exista y tenga la tabla indicada.
Error de compilaciĂłn TS5055: Revisa que
tsconfig.jsonincluya solosrc/**/*y no archivos sueltos en la raĂz.
đź“„ Licencia
MIT – Libre uso y modificación.
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.
This 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
A collaborative substrate over your data: vector, knowledge graph, SQL, geospatial, streaming.
Query your Google Sheets as structured JSON: list sheets and tabs, read schemas, filter rows.
Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAutomatically discovers GraphQL APIs through introspection and generates table-formatted queries with pagination, filters, and sorting. Supports multiple authentication types and provides both CLI and REST API interfaces for seamless integration.1MIT
- -licenseNot gradedqualityNot gradedmaintenanceEnables interaction with 20+ databases (PostgreSQL, MongoDB, Neo4j, Elasticsearch, Redis, and more) through a single unified interface, allowing cross-database queries and operations via natural language.1-
- FlicenseAqualityCmaintenanceProvides GraphQL access to Airtable and Google Sheets data, enabling natural language queries for data exploration, schema introspection, and record management.6-
- AlicenseNot gradedqualityDmaintenanceEnables interaction with multiple databases (MySQL, PostgreSQL, SQLite, Supabase) through a unified interface with security features like SQL injection detection and rate limiting.61MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Denisijcu/DeepSeek-Graphql---MCP-Project'
If you have feedback or need assistance with the MCP directory API, please join our Discord server