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

A Model Context Protocol server that provides tools for connecting to and interacting with various database systems.
Database MCP Server is cataloged as an MCP server attributed to georgi-terziyski. A Model Context Protocol server that provides tools for connecting to and interacting with various database systems. 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 License. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Database MCP 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, MySQL/MariaDB, and SQL Server.
Yes, it provides schema management tools to create, alter, and drop tables and indexes in addition to query execution.
Yes, it includes begin, commit, and rollback transaction tools.
README.md · a8f971721b2f · 采集于 2026-11-13 12:37:01 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
A Model Context Protocol (MCP) server that provides tools for connecting to and interacting with various database systems.
psycopg2-binarymysql-connector-pythonpyodbc# Clone the repository
git clone <repository-url>
# Install the package
pip install -e .
The server can be configured using environment variables, a configuration file, or by providing connection details at runtime.
DB_CONFIG_PATH: Path to a JSON configuration fileDB_CONNECTIONS: A comma-separated list of connection IDs or a JSON string with connection details{
"connections": {
"sqlite_conn": {
"type": "sqlite",
"db_path": "/path/to/database.db"
},
"postgres_conn": {
"type": "postgres",
"host": "localhost",
"port": 5432,
"database": "mydatabase",
"user": "myuser",
"password": "mypassword"
}
}
}
# Run with default settings
python -m db_mcp_server
# Specify a configuration file
python -m db_mcp_server --config /path/to/config.json
# Set logging level
python -m db_mcp_server --log-level DEBUG
# Run as a web server
python -m db_mcp_server.web_server
# Specify host and port
python -m db_mcp_server.web_server --host 0.0.0.0 --port 8000
# Specify configuration file and logging level
python -m db_mcp_server.web_server --config /path/to/config.json --log-level DEBUG
add_connection: Add a new database connectiontest_connection: Test a database connectionlist_connections: List all database connectionsremove_connection: Remove a database connectionexecute_query: Execute a SQL queryget_records: Get records from a tableinsert_record: Insert a record into a tableupdate_record: Update records in a tabledelete_record: Delete records from a tablelist_tables: List all tables in a databaseget_table_schema: Get the schema for a tablecreate_table: Create a new tabledrop_table: Drop a tablecreate_index: Create an index on a tabledrop_index: Drop an indexalter_table: Alter a table structurebegin_transaction: Begin a transactioncommit_transaction: Commit a transactionrollback_transaction: Rollback a transaction{
"connection_id": "my_sqlite_db",
"type": "sqlite",
"db_path": "/path/to/database.db"
}
{
"connection_id": "my_sqlite_db",
"query": "SELECT * FROM users WHERE age > ?",
"params": [21]
}
{
"connection_id": "my_sqlite_db",
"table": "users",
"columns": [
{
"name": "id",
"type": "INTEGER",
"primary_key": true,
"nullable": false
},
{
"name": "name",
"type": "TEXT",
"nullable": false
},
{
"name": "email",
"type": "TEXT",
"nullable": true
}
]
}
{
"connection_id": "my_sqlite_db",
"table": "users",
"data": {
"name": "John Doe",
"email": "john@example.com"
}
}
# Run all tests
python -m unittest discover
# Run specific test file
python -m unittest tests.test_sqlite
When running as a standalone web server, other LLMs (like Llama 3) can connect to the database MCP server via HTTP. The server exposes the following endpoints:
/list_tools - GET or POST: Returns a list of all available tools with their descriptions and input schemas/call_tool - POST: Execute a specific database toolTo use this server with another LLM, have the LLM generate HTTP requests to the server. Here's an example of how you could structure the prompt for an LLM like Llama 3:
You can interact with a database by making HTTP requests to a database service at http://localhost:8000.
The service provides the following endpoints:
1. To get a list of available tools:
Make a POST request to: http://localhost:8000/list_tools
2. To execute a database tool:
Make a POST request to: http://localhost:8000/call_tool
with a JSON body like:
{
"name": "tool_name",
"arguments": {
"param1": "value1",
"param2": "value2"
}
}
For example, to execute a SQL query, you would make a request like:
POST http://localhost:8000/call_tool
Content-Type: application/json
{
"name": "execute_query",
"arguments": {
"connection_id": "my_db",
"query": "SELECT * FROM users"
}
}
import requests
import json
# Base URL of the database MCP server
BASE_URL = "http://localhost:8000"
# List available tools
def list_tools():
response = requests.post(f"{BASE_URL}/list_tools")
return response.json()
# Execute a database tool
def call_tool(tool_name, arguments):
payload = {
"name": tool_name,
"arguments": arguments
}
response = requests.post(f"{BASE_URL}/call_tool", json=payload)
return response.json()
# Example: List tables in a database
def list_tables(connection_id):
return call_tool("list_tables", {"connection_id": connection_id})
# Example: Execute a SQL query
def execute_query(connection_id, query, params=None):
return call_tool("execute_query", {
"connection_id": connection_id,
"query": query,
"params": params
})
# Example: Add a new connection
def add_connection(connection_id, db_type, **kwargs):
args = {"connection_id": connection_id, "type": db_type}
args.update(kwargs)
return call_tool("add_connection", args)
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Database MCP Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/database_mcp_server)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
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.