db2-mcp-server
@huangjien
About db2-mcp-server
MCP server for DB2
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"db2-mcp-server": {
"command": "uv",
"args": [
"v0.6.x"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
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
—
FAQ from db2-mcp-server
What databases does db2-mcp-server support?
It supports IBM DB2 databases.
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.
What are the software requirements?
Python 3.12, the FastMCP framework (latest stable version), the IBM DB2 Python driver (ibm_db), and Pydantic.
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%).
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.
Frequently asked questions
What databases does db2-mcp-server support?
It supports IBM DB2 databases.
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.
What are the software requirements?
Python 3.12, the FastMCP framework (latest stable version), the IBM DB2 Python driver (`ibm_db`), and Pydantic.
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%).
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.
Basic information
More Other MCP servers

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
XcodeBuildMCP
cameroncookeA Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.

Lemon.io
lemon-ioRequest dedicated senior developers to work on your project, write job descriptions, and prep technical interviews — all without leaving your Claude chat. Just describe what you need, and Lemon.io MCP does the rest. 1–3
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.

DeepMark
DeepMark helps teachers deliver rapid, consistent marking with meaningful feedback for every student — in a fraction of the time. What once took a week, now takes one free period.
Comments