Skip to main content
1

Pick a driver and install its prerequisites

The server needs Node.js 22 or higher. What else it needs depends on the driver.See Database drivers for install steps per platform.
2

Install the server

Or run it with npx mcp-server-db2i from the client config, as in the next step. To run it in a container instead, see Docker.Only the odbc driver installs with the server. For jt400 or mapepire, add its packages:
With npx, pass them with -p instead: "args": ["-y", "-p", "mcp-server-db2i@latest", "-p", "node-jt400", "mcp-server-db2i"]. See Installing the jt400 and mapepire packages.
3

Add it to your MCP client

Add the server to your client’s config, for example ~/.cursor/mcp.json in Cursor:
The ${env:...} references keep credentials out of the config file. Set the variables in your shell profile (~/.zshrc or ~/.bashrc). Claude Code uses ${VAR_NAME} instead, and can add the server with:
@latest makes npx check for a new release each time the client starts the server. Without it, npx keeps running the version it cached first. To upgrade on your own schedule instead, pin a version, such as mcp-server-db2i@3.0.0. See Choosing a version.See Client setup for config paths in Cursor, Claude Desktop, and Claude Code, and for Docker-based setups.
4

Ask a question

Restart the client, then try:
  • “List all schemas that contain ‘PROD’”
  • “Show me the tables in schema MYLIB”
  • “Describe the columns in MYLIB/CUSTOMERS”
  • “What indexes exist on the ORDERS table?”
  • “Find the order header and line tables in MYLIB and write a GET /orders/:orderNo endpoint”

Next steps

Limit what the assistant can reach

Set QUERY_ALLOWED_SCHEMAS, disable tools, and mask sensitive columns.

Add business SQL tools

Turn reviewed ERP queries into named tools with typed parameters.

Connect several systems

Reach production and test from one server with DB2I_PROFILES.

Serve remote clients

Run over HTTP with OAuth so claude.ai connectors can sign in.