MCP Database Server
Servidor de base de datos MCP
Implementación de servidor del Protocolo de Contexto de Modelo (MCP) que permite que los Modelos de Lenguaje Grandes (LLM) interactúen con diversas bases de datos mediante lenguaje natural. Actualmente es compatible con MongoDB y se prevé que también lo sea:
PostgreSQL
Base de datos de cucarachas
Redis
Y más...
Características
Operaciones de bases de datos mediante lenguaje natural
Actualmente es compatible con MongoDB con las siguientes características:
Listar todas las colecciones
Consultar documentos con filtrado y proyección
Insertar documentos
Eliminar documentos
Operaciones de tuberías de agregados
Soporte futuro para otras bases de datos:
PostgreSQL: consultas SQL, operaciones de tabla
CockroachDB: Operaciones SQL distribuidas
Redis: Operaciones clave-valor, almacenamiento en caché
Related MCP server: MongoDB
Prerrequisitos
Node.js v20.12.2 o superior
Base de datos (actualmente MongoDB, próximamente se añadirán otras bases de datos)
Aplicación de escritorio Claude
Instalación
Clonar el repositorio:
git clone https://github.com/manpreet2000/mcp-database-server.git
cd mcp-database-serverInstalar dependencias:
npm installConstruya el código TypeScript:
npm run buildConfiguración
Para comenzar, debe configurar su conexión de base de datos en el archivo de configuración de Claude Desktop:
Sistema operativo Mac
~/Library/Application\ Support/Claude/claude_desktop_config.jsonVentanas
%APPDATA%/Claude/claude_desktop_config.jsonAgregue la siguiente configuración a su claude_desktop_config.json :
{
"mcpServers": {
"database": {
"command": "/path/to/node",
"args": ["/path/to/mcp-database/dist/index.js"],
"env": {
"MONGODB_URI": "your-mongodb-connection-string"
}
}
}
}Reemplazar:
/path/to/nodecon su ruta ejecutable Node.js o simplemente usenode/path/to/mcp-databasecon la ruta absoluta a este repositorioyour-mongodb-connection-stringcon la URL de su conexión MongoDB
Ejemplos de uso
Ejemplos de MongoDB
Enumere todas las colecciones en su base de datos:
Can you show me all the collections in my database?Obtener registros específicos de una colección:
Give me 2 records from the chargers collectionConsulta con filtros:
Show me all documents in the users collection where status is activeInsertar un documento:
Add a new user to the users collection with name John and email john@example.comEliminar un documento:
Remove the user with email john@example.com from the users collectionDatos agregados:
Show me the total count of users by status in the users collectionHerramientas disponibles
1. obtener colecciones
Enumera todas las colecciones en la base de datos conectada.
2. obtenerColección
Recupera documentos de una colección con parámetros de consulta opcionales:
collectionName: Nombre de la colecciónlimit: Número máximo de documentos a devolver (predeterminado: 10, máximo: 1000)query: objeto de consulta de MongoDBprojection: Campos a incluir/excluir
3. insertOne
Inserta un solo documento en una colección:
collectionName: Nombre de la coleccióndocument: Objeto de documento a insertar
4. deleteOne
Elimina un solo documento de una colección:
collectionName: Nombre de la colecciónquery: Consulta para que coincida con el documento a eliminar
5. agregado
Ejecuta una canalización de agregación:
collectionName: Nombre de la colecciónpipeline: Matriz de etapas de agregaciónoptions: Opciones de agregación opcionales
Soporte de bases de datos futuras
PostgreSQL
Ejecución de consultas SQL
Operaciones de tabla
Gestión de esquemas
Soporte para transacciones
Base de datos de cucarachas
Operaciones SQL distribuidas
Soporte multirregional
Gestión de transacciones
Operaciones de esquema
Redis
Operaciones clave-valor
Mecanismos de almacenamiento en caché
Operaciones de pub/suscripción
Operaciones de estructura de datos
Seguridad
Nunca envíe sus cadenas de conexión de base de datos al control de versiones
Utilice variables de entorno para información confidencial
Siga las mejores prácticas de seguridad específicas de la base de datos
Contribuyendo
¡Agradecemos sus contribuciones! No dude en enviar una solicitud de incorporación de cambios. Para cambios importantes, primero abra una incidencia para comentar qué desea cambiar.
Licencia
Licencia MIT: consulte LICENCIA para obtener más detalles
Available Tools
5 toolsaggregateD
| Name | Required | Description | Default |
|---|---|---|---|
| collectionName | Yes | ||
| pipeline | Yes | ||
| options | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
deleteOneD
| Name | Required | Description | Default |
|---|---|---|---|
| collectionName | Yes | ||
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getCollectionD
| Name | Required | Description | Default |
|---|---|---|---|
| collectionName | Yes | ||
| limit | No | ||
| query | No | ||
| projection | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
getCollectionsD
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
insertOneD
| Name | Required | Description | Default |
|---|---|---|---|
| collectionName | Yes | ||
| document | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Tool has no description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Tool has no description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Tool has no description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Tool has no description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Tool has no description.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Tool has no description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
- First observed
aggregate - First observed
deleteOne - First observed
getCollection - First observed
getCollections - First observed
insertOne
TDQS
Scored across 5 tools
The tools have distinct purposes: aggregate, deleteOne, getCollection, getCollections, and insertOne each target different database operations. However, getCollection and getCollections could potentially be confused due to similar naming and lack of descriptions clarifying their exact differences.
Naming is inconsistent with mixed conventions: getCollection and getCollections use camelCase, while deleteOne and insertOne use camelCase with different verb styles, and aggregate stands alone. There is no predictable pattern across all tools.
With 5 tools, the count is reasonable for a database server, but it feels borderline thin for covering full CRUD operations and database management. Key operations like update or query filtering are missing, making the set feel incomplete.
The tool set has significant gaps for a database server: it lacks update operations, query filtering tools, and transaction management. While basic insert, delete, and get operations are present, the surface is incomplete for typical database workflows, likely causing agent failures.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
- mcpOAuthcom.gibsonai
GibsonAI MCP server: manage your databases with natural language
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases. Query collections, inspect schemas, and manage data seamlessly through natural language.28 npm175MIT
- AlicenseBqualityAmaintenanceA Model Context Protocol server that provides access to MongoDB databases. This server enables LLMs to inspect collection schemas and execute read-only queries.8230 npm282MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.28 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables LLMs to interact directly with MongoDB databases, allowing users to query collections, inspect schemas, and manage data through natural language.28 npmMIT