AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Db2 Mcp Server

mcp-huangjien-db2-mcp-server · by huangjien

MCP server for DB2

No reviews yet
0 installs
26 views
0.0% view→install

Install

$ agentstack add mcp-huangjien-db2-mcp-server

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-huangjien-db2-mcp-server)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
stale · 1y ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Db2 Mcp Server? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

db2-mcp-server

[](https://badge.fury.io/py/db2-mcp-server) [](https://opensource.org/licenses/MIT) [](https://github.com/huangjien/db2-mcp-server)

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

``bash git clone cd db2-mcp-server ``

  1. Set Up Virtual Environment

``bash uv v0.6.x source uv/bin/activate ``

  1. Install Dependencies

``bash pip install -r requirements.txt ``

  1. Run the Server

``bash 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:

``bash pytest --cov=src/db2_mcp_server --cov-report=html tests/ ``

  • For verbose output:

``bash 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.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.