MCP.so
登录

Db2 MCP Server

@huangjien

基本信息

分类

其他

许可证

MIT license

传输方式

stdio

作者

huangjien

关于 Db2 MCP Server

MCP server for DB2

Db2 MCP Server 配置

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

{
  "mcpServers": {
    "db2-mcp-server": {
      "command": "uv",
      "args": [
        "v0.6.x"
      ]
    }
  }
}

Db2 MCP Server 工具

工具列表暂未提供

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

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

概览

What is db2-mcp-server?

db2-mcp-server is a Python-based server that uses the Model Context Protocol (MCP) to interact with IBM DB2 databases. It provides tools for listing tables and retrieving table metadata, and is intended for read-only database exploration.

How to use db2-mcp-server?

Clone the repository, set up a virtual environment with uv, install dependencies with pip install -r requirements.txt, then run the server with python src/db2_mcp_server/core.py. Tests can be executed using pytest --strict-markers --cov.

Key features of db2-mcp-server

  • List tables from the connected DB2 database.
  • Retrieve metadata for a specific table (column details, data types).
  • Read-only access – prohibits INSERT, UPDATE, DELETE operations.
  • Structured JSON logging (sensitive data excluded).
  • Requires Python 3.12, FastMCP, ibm_db, and Pydantic.

Use cases of db2-mcp-server

—

常见问题

1

What databases does db2-mcp-server support?

It supports IBM DB2 databases.

2

Is the server read-only?

Yes, the server is read-only. It uses a database user with only SELECT privileges and prohibits SQL INSERT, UPDATE, or DELETE operations.

3

What are the software requirements?

Python 3.12, the FastMCP framework (latest stable version), the IBM DB2 Python driver (`ibm_db`), and Pydantic.

4

How do I run tests?

Use `pytest` (version ≥ 7.0.0) with the flags `--strict-markers --cov` to run tests and check code coverage (expected ≥ 90%).

5

What operations does db2-mcp-server provide?

It provides two tools: listing all tables from the connected database and retrieving metadata (column details and data types) for a specific table.

评论

其他 分类下的更多 MCP 服务器