1. Conduid
  2. Data
  3. Db2 MCP Server
MCP server · Data

Db2 MCP Server

MCP server for DB2

Unclaimed MIT last commit a year ago data
49Fair

Scored 23 hours ago · breakdown

About Db2 MCP Server

Db2 MCP Server is an MCP server published by huangjien in the Data category: mCP server for DB2.

The repository has 2 stars and 5 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/huangjien/db2-mcp-server

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Db2 MCP Server

Powered by Claude · Grounded in docs

I know everything about Db2 MCP Server. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 23 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.2.2Release v0.2.2 · 1 Jul 2025Changes Package version 0.2.2 published to PyPI Docker image 0.2.2 pushed to Docker Hub
v0.2.0Release v0.2.0 · 1 Jul 2025Changes Package version 0.2.0 published to PyPI Docker image 0.2.0 pushed to Docker Hub
v0.1.2Release v0.1.2 · 30 Jun 2025Changes Package version 0.1.2 published to PyPI Docker image 0.1.2 pushed to Docker Hub
v0.1.1Release v0.1.1 · 27 Jun 2025Changes Package version 0.1.1 published to PyPI Docker image 0.1.1 pushed to Docker Hub
v0.1.0Release v0.1.0 · 27 Jun 2025Changes Package version 0.1.0 published to PyPI Docker image 0.1.0 pushed to Docker Hub

README

db2-mcp-server

PyPI version Coverage

Overview

The db2-mcp-server is a Python-based server utilizing the MCP framework to interact with IBM DB2 databases. It provides tools for listing tables and retrieving table metadata.

Features

  • List Tables: Retrieve a list of tables from the connected DB2 database.
  • Get Table Metadata: Fetch metadata for a specific table, including column details and data types.
  • Dynamic Prompt Loading: Load custom prompts from JSON configuration files for flexible query assistance.
  • Built-in Prompts: Pre-configured prompts for DB2 query help and schema analysis.

Requirements

  • Python 3.12
  • FastMCP (latest stable version)
  • IBM DB2 Python driver (ibm_db)
  • Pydantic

Setup Instructions

  1. Clone the Repository

    git clone <repository-url>
    cd db2-mcp-server
    
  2. Set Up Virtual Environment

    uv v0.6.x
    source uv/bin/activate
    
  3. Install Dependencies

    pip install -r requirements.txt
    
  4. Run the Server

    python src/db2_mcp_server/core.py
    

Dynamic Prompts

The server supports dynamic prompt loading from JSON configuration files. Set the PROMPTS_FILE environment variable to specify a custom prompts configuration file.

Example Usage

export PROMPTS_FILE=/path/to/your/prompts_config.json
python src/db2_mcp_server/core.py

Configuration Format

See examples/prompts_config.json for a complete example and docs/DYNAMIC_PROMPTS.md for detailed documentation.

Testing

  • Use pytest (version ≥ 7.0.0) for running tests.
  • Current test coverage: 92.98% (exceeding the 80% requirement).
  • Comprehensive test suite includes:
    • Core functionality tests (test_core.py)
    • Database tools tests (test_list_tables.py, test_metadata_retrieval.py)
    • Caching mechanism tests (test_cache.py)
    • Logging configuration tests (test_logger.py)
    • Dynamic prompt loading tests (test_dynamic_loader.py, test_integration_dynamic_prompts.py)
  • Run tests with:
    pytest --cov=src/db2_mcp_server --cov-report=html tests/
    
  • For verbose output:
    pytest --cov=src/db2_mcp_server --cov-report=term-missing -v
    

Security and API Restrictions

  • The server is read-only, prohibiting SQL INSERT, UPDATE, or DELETE operations.
  • Uses a database user with only SELECT privileges.

Logging

  • Errors are logged with structured logs in JSON format, excluding sensitive data.

Contribution

  • Contributions are welcome. Please follow the project's coding standards and testing guidelines.

README fetched from the repository 23 hours ago. The original is authoritative.

Questions

About Db2 MCP Server

How do I install Db2 MCP Server?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Db2 MCP Server safe to use with an AI agent?

Its trust score is 49 out of 100 (fair). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Db2 MCP Server still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.