Read-only queries against IBM Db2 for i (IBM i, AS/400); users sign in with their own IBM i credentials.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add db2i --env DB2I_HOSTNAME='<DB2I_HOSTNAME>' --env DB2I_USERNAME='<DB2I_USERNAME>' --env DB2I_PASSWORD='<DB2I_PASSWORD>' -- npx -y mcp-server-db2i~/.codex/config.toml
[mcp_servers.db2i]
command = "npx"
args = ["-y", "mcp-server-db2i"]
env = { DB2I_HOSTNAME = "<DB2I_HOSTNAME>", DB2I_USERNAME = "<DB2I_USERNAME>", DB2I_PASSWORD = "<DB2I_PASSWORD>" }
# codex mcp add db2i --env DB2I_HOSTNAME='<DB2I_HOSTNAME>' --env DB2I_USERNAME='<DB2I_USERNAME>' --env DB2I_PASSWORD='<DB2I_PASSWORD>' -- npx -y mcp-server-db2i~/.cursor/mcp.json
{
"mcpServers": {
"db2i": {
"command": "npx",
"args": [
"-y",
"mcp-server-db2i"
],
"env": {
"DB2I_HOSTNAME": "<DB2I_HOSTNAME>",
"DB2I_USERNAME": "<DB2I_USERNAME>",
"DB2I_PASSWORD": "<DB2I_PASSWORD>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"db2i": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-server-db2i"
],
"env": {
"DB2I_HOSTNAME": "<DB2I_HOSTNAME>",
"DB2I_USERNAME": "<DB2I_USERNAME>",
"DB2I_PASSWORD": "<DB2I_PASSWORD>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"db2i": {
"command": "npx",
"args": [
"-y",
"mcp-server-db2i"
],
"env": {
"DB2I_HOSTNAME": "<DB2I_HOSTNAME>",
"DB2I_USERNAME": "<DB2I_USERNAME>",
"DB2I_PASSWORD": "<DB2I_PASSWORD>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"db2i": {
"command": "npx",
"args": [
"-y",
"mcp-server-db2i"
],
"env": {
"DB2I_HOSTNAME": "<DB2I_HOSTNAME>",
"DB2I_USERNAME": "<DB2I_USERNAME>",
"DB2I_PASSWORD": "<DB2I_PASSWORD>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"db2i": {
"command": "npx",
"args": [
"-y",
"mcp-server-db2i"
],
"env": {
"DB2I_HOSTNAME": "<DB2I_HOSTNAME>",
"DB2I_USERNAME": "<DB2I_USERNAME>",
"DB2I_PASSWORD": "<DB2I_PASSWORD>"
}
}
}
}Environment variables
DB2I_HOSTNAMEDB2I_USERNAMEDB2I_PASSWORD
Replace the placeholders with your own credentials and keep them out of version control.