MCP.so
登录

MCP Stdio Server (MySQL/MariaDB)

@zerogon1203

基本信息

分类

数据库

最近更新

传输方式

stdio

作者

zerogon1203

关于 MCP Stdio Server

暂无概览

MCP Stdio Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "db-mcp-server-zerogon1203": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        "venv"
      ]
    }
  }
}

MCP Stdio Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP Stdio Server (MySQL/MariaDB)?

MCP Stdio Server (MySQL/MariaDB) is a Python-based Model Context Protocol (MCP) server that connects to MySQL or MariaDB databases via stdio transport. It returns table structures, relationships, and provides database analysis, query optimization, and monitoring capabilities, designed for integration with Cursor IDE.

How to use MCP Stdio Server (MySQL/MariaDB)?

Clone the repository, create a Python virtual environment, install dependencies, and set database credentials in a .env file (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME). Run the server by adding a stdio MCP server in Cursor IDE with command python main.py; optionally pass environment variables per project via JSON configuration.

Key features of MCP Stdio Server (MySQL/MariaDB)

  • Built on the official MCP Python SDK
  • Stdio transport for Cursor IDE integration
  • Configurable via .env file or JSON env values
  • Returns schema, columns, and foreign key relationships
  • Provides read‑only query execution and EXPLAIN plans
  • Offers table statistics, column stats, and sample data
  • Includes database monitoring and performance analysis

Use cases of MCP Stdio Server (MySQL/MariaDB)

  • Retrieve and visualize database schema and foreign keys
  • Analyze table statistics and column distributions
  • Execute read‑only queries and get execution plans
  • Monitor database status, table sizes, and index usage
  • Identify performance bottlenecks and receive optimization suggestions

常见问题

1

What are the runtime dependencies?

Python 3.8+ and a running MySQL or MariaDB database.

2

How is the database connection configured?

Credentials are set in a `.env` file at the project root, or passed as environment variables via Cursor’s MCP server JSON configuration.

3

Which transport does the server use?

It uses `stdio` transport, enabling seamless integration with Cursor IDE.

4

Is query execution read‑only?

Yes, the `mysql.execute_query` method is safe and read‑only; no write operations are performed.

5

What database information is returned?

The server returns table lists, column details, foreign key relationships, table statistics, sample data, query execution plans, and performance metrics.

评论

数据库 分类下的更多 MCP 服务器