
This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server for connecting to and working with SQLite, PostgreSQL, Microsoft SQL Server, and MongoDB databases.
MCP Database Server is cataloged as an MCP server attributed to cuongtl1992. A Model Context Protocol server for connecting to and working with SQLite, PostgreSQL, Microsoft SQL Server, and MongoDB databases. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for MCP Database Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It supports SQLite, PostgreSQL, Microsoft SQL Server, and MongoDB.
Connections can be configured through environment variables for each supported database, and these take precedence over any configuration passed to the connect-database tool.
README.md · 5c949a202d6e · Fetched 2026-11-13 09:26:01 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A Model Context Protocol (MCP) implementation for connecting to and working with various database systems.
npm install -g mcp-dbs
The MCP Database Server can be used in two modes:
By default, the server runs in SSE (Server-Sent Events) mode on port 3001:
npx mcp-dbs
This will start an HTTP server with an SSE endpoint at http://localhost:3001/mcp.
You can specify a custom port using the --port option:
npx mcp-dbs --port 8080
For tools that communicate over standard input/output, you can use the --stdio option:
npx mcp-dbs --stdio
You can integrate mcp-dbs with Claude Desktop by adding it to your Claude configuration file.
mcpServers section:{
"mcpServers": {
"mcp-dbs": {
"command": "node",
"args": [
"/path/to/your/mcp-dbs/dist/cli.js",
"--stdio"
],
"env": {
"MCP_MONGODB_URI": "mongodb://localhost:27017",
"MCP_MONGODB_DATABASE": "your-database-name"
}
}
}
}
Replace the environment variables with your own database connection details.
command should be nodeargs, provide the absolute path to the cli.js file in your mcp-dbs installationOnce configured, Claude will be able to access your database using the MCP tools described below. You can ask Claude to:
You can configure your database connections using environment variables:
# Set these environment variables before connecting
export MCP_SQLITE_FILENAME="path/to/database.db"
export MCP_SQLITE_CREATE_IF_NOT_EXISTS="true"
# Set these environment variables before connecting
export MCP_POSTGRES_HOST="your-postgres-host"
export MCP_POSTGRES_PORT="5432"
export MCP_POSTGRES_DATABASE="your-database-name"
export MCP_POSTGRES_USER="your-username"
export MCP_POSTGRES_PASSWORD="your-password"
export MCP_POSTGRES_SSL="false"
# Set these environment variables before connecting
export MCP_MSSQL_SERVER="your-server-address"
export MCP_MSSQL_PORT="1433"
export MCP_MSSQL_DATABASE="your-database-name"
export MCP_MSSQL_USER="your-username"
export MCP_MSSQL_PASSWORD="your-password"
export MCP_MSSQL_ENCRYPT="true"
export MCP_MSSQL_TRUST_SERVER_CERTIFICATE="true"
# Set these environment variables before connecting
export MCP_MONGODB_URI="mongodb://localhost:27017"
export MCP_MONGODB_DATABASE="your-database-name"
export MCP_MONGODB_MAX_POOL_SIZE="10"
export MCP_MONGODB_USE_UNIFIED_TOPOLOGY="true"
These environment variables will take precedence over any configuration passed to the connect-database tool.
The server exposes the following MCP tools:
Connect to a database.
Parameters:
connectionId: A unique identifier for the connectiontype: Database type (sqlite, postgres, mssql, or mongodb)Example for SQLite:
{
"connectionId": "my-sqlite-db",
"type": "sqlite"
}
Example for PostgreSQL:
{
"connectionId": "my-postgres-db",
"type": "postgres"
}
Example for SQL Server:
{
"connectionId": "my-mssql-db",
"type": "mssql"
}
Example for MongoDB:
{
"connectionId": "my-mongodb-db",
"type": "mongodb"
}
Disconnect from a database.
Parameters:
connectionId: The connection ID to disconnectExecute a query that returns results.
Parameters:
connectionId: The connection IDquery: SQL query or MongoDB aggregation pipeline (as JSON string)params: (Optional) Array of parameters for the query. For MongoDB, the first parameter is the collection name.Example for SQL:
{
"connectionId": "my-postgres-db",
"query": "SELECT * FROM users WHERE age > $1",
"params": [21]
}
Example for MongoDB:
{
"connectionId": "my-mongodb-db",
"query": "[{\"$match\": {\"age\": {\"$gt\": 21}}}, {\"$sort\": {\"name\": 1}}]",
"params": ["users"]
}
Example for MongoDB (new format with embedded collection):
{
"connectionId": "my-mongodb-db",
"query": "{\"collection\": \"users\", \"pipeline\": [{\"$match\": {\"age\": {\"$gt\": 21}}}, {\"$sort\": {\"name\": 1}}]}"
}
Example for MongoDB (shell syntax):
{
"connectionId": "my-mongodb-db",
"query": "db.getCollection('users').find({\"age\": {\"$gt\": 21}})"
}
Example for MongoDB (direct collection reference shell syntax):
{
"connectionId": "my-mongodb-db",
"query": "db.users.find({\"age\": {\"$gt\": 21}})"
}
Example for MongoDB (raw command):
{
"connectionId": "my-mongodb-db",
"query": "{\"find\": \"users\", \"filter\": {\"age\": {\"$gt\": 21}}}"
}
Execute a query that doesn't return results (INSERT, UPDATE, DELETE).
Parameters:
connectionId: The connection IDquery: SQL query or MongoDB command (as JSON string)params: (Optional) Array of parameters for the query. For MongoDB, the first parameter is the collection name.Example for SQL:
{
"connectionId": "my-postgres-db",
"query": "INSERT INTO users (name, age) VALUES ($1, $2)",
"params": ["John Doe", 30]
}
Example for MongoDB:
{
"connectionId": "my-mongodb-db",
"query": "{\"insertOne\": {\"name\": \"John Doe\", \"age\": 30}}",
"params": ["users"]
}
Example for MongoDB (new format with embedded collection):
{
"connectionId": "my-mongodb-db",
"query": "{\"collection\": \"users\", \"operation\": {\"insertOne\": {\"name\": \"John Doe\", \"age\": 30}}}"
}
Example for MongoDB (shell syntax):
{
"connectionId": "my-mongodb-db",
"query": "db.getCollection('users').insertOne({\"name\": \"John Doe\", \"age\": 30})"
}
Example for MongoDB (direct collection reference shell syntax):
{
"connectionId": "my-mongodb-db",
"query": "db.users.insertOne({\"name\": \"John Doe\", \"age\": 30})"
}
Example for MongoDB (raw command):
{
"connectionId": "my-mongodb-db",
"query": "{\"insert\": \"users\", \"documents\": [{\"name\": \"John Doe\", \"age\": 30}]}"
}
The server exposes the following MCP resources:
URI: database://{connectionId}/schema
Returns schema information about the database, including all tables and their columns.
URI: database://{connectionId}/tables/{tableName}
Returns schema information about a specific table, including its columns.
URI: database://{connectionId}/tables
Returns a list of all tables in the database.
Run the tests:
npm test
If you find this project helpful, consider buying me a coffee!
Scan the QR code above or click here to support the development of this project.
MIT
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for MCP Database Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/database-connections)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

A Model Context Protocol server that lets AI assistants run SQL queries against AWS Athena databases and retrieve results.

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.