mcp-server-db2i 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,49 @@
|
|
|
1
1
|
# mcp-server-db2i
|
|
2
2
|
|
|
3
|
+
[](https://github.com/Strom-Capital/mcp-server-db2i/actions/workflows/ci.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/mcp-server-db2i)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://modelcontextprotocol.io/)
|
|
7
|
+
[](https://www.ibm.com/products/ibm-i)
|
|
8
|
+
[](https://www.typescriptlang.org/)
|
|
9
|
+
[](https://nodejs.org/)
|
|
10
|
+
[](docs/docker.md)
|
|
11
|
+
[](https://www.npmjs.com/package/mcp-server-db2i)
|
|
12
|
+
[](https://github.com/Strom-Capital/mcp-server-db2i/pulls)
|
|
13
|
+
[](https://github.com/Strom-Capital/mcp-server-db2i/commits/main)
|
|
14
|
+
|
|
3
15
|
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server for IBM DB2 for i (DB2i). This server enables AI assistants like Claude and Cursor to query and inspect IBM i databases using the JT400 JDBC driver.
|
|
4
16
|
|
|
17
|
+
## Architecture
|
|
18
|
+
|
|
19
|
+
AI clients connect to the MCP Server via stdio (IDEs) or HTTP (agents), which executes read-only queries against DB2 for i using the JT400 JDBC driver.
|
|
20
|
+
|
|
21
|
+
```mermaid
|
|
22
|
+
graph LR
|
|
23
|
+
subgraph clients ["AI Clients"]
|
|
24
|
+
claude("Claude")
|
|
25
|
+
cursor("Cursor IDE")
|
|
26
|
+
agents("Custom Agents")
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
subgraph server ["MCP Server"]
|
|
30
|
+
stdio["stdio"]
|
|
31
|
+
http["HTTP + Auth"]
|
|
32
|
+
tools[["MCP Tools"]]
|
|
33
|
+
jdbc["JT400 JDBC"]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
subgraph ibmi ["IBM i"]
|
|
37
|
+
db2[("DB2 for i")]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
claude & cursor -->|MCP Protocol| stdio
|
|
41
|
+
agents -->|REST API| http
|
|
42
|
+
stdio & http --> tools
|
|
43
|
+
tools --> jdbc
|
|
44
|
+
jdbc -->|JDBC| db2
|
|
45
|
+
```
|
|
46
|
+
|
|
5
47
|
## Features
|
|
6
48
|
|
|
7
49
|
- **Read-only SQL queries** - Execute SELECT statements safely with automatic result limiting
|
|
@@ -38,9 +80,9 @@ DB2I_PASSWORD=your-password
|
|
|
38
80
|
DB2I_SCHEMA=your-default-schema # Optional
|
|
39
81
|
```
|
|
40
82
|
|
|
41
|
-
###
|
|
83
|
+
### Client Setup
|
|
42
84
|
|
|
43
|
-
Add to `~/.cursor/mcp.json
|
|
85
|
+
Add to your MCP client config (e.g., `~/.cursor/mcp.json`):
|
|
44
86
|
|
|
45
87
|
```json
|
|
46
88
|
{
|
|
@@ -49,16 +91,18 @@ Add to `~/.cursor/mcp.json`:
|
|
|
49
91
|
"command": "npx",
|
|
50
92
|
"args": ["mcp-server-db2i"],
|
|
51
93
|
"env": {
|
|
52
|
-
"DB2I_HOSTNAME": "
|
|
53
|
-
"DB2I_USERNAME": "
|
|
54
|
-
"DB2I_PASSWORD": "
|
|
94
|
+
"DB2I_HOSTNAME": "${env:DB2I_HOSTNAME}",
|
|
95
|
+
"DB2I_USERNAME": "${env:DB2I_USERNAME}",
|
|
96
|
+
"DB2I_PASSWORD": "${env:DB2I_PASSWORD}"
|
|
55
97
|
}
|
|
56
98
|
}
|
|
57
99
|
}
|
|
58
100
|
}
|
|
59
101
|
```
|
|
60
102
|
|
|
61
|
-
|
|
103
|
+
This uses environment variable expansion to keep credentials out of config files. Set the variables in your shell profile (`~/.zshrc` or `~/.bashrc`).
|
|
104
|
+
|
|
105
|
+
See the [Client Setup Guide](docs/client-setup.md) for Cursor, Claude Desktop, Claude Code, and Docker setup options.
|
|
62
106
|
|
|
63
107
|
## Available Tools
|
|
64
108
|
|
|
@@ -96,7 +140,7 @@ Once connected, you can ask the AI assistant:
|
|
|
96
140
|
| [HTTP Transport](docs/http-transport.md) | REST API with token authentication |
|
|
97
141
|
| [Configuration](docs/configuration.md) | All environment variables and JDBC options |
|
|
98
142
|
| [Security](docs/security.md) | Credentials, rate limiting, query validation |
|
|
99
|
-
| [
|
|
143
|
+
| [Client Setup](docs/client-setup.md) | Cursor, Claude, Claude Code setup |
|
|
100
144
|
| [Docker Guide](docs/docker.md) | Container deployment |
|
|
101
145
|
| [Development](docs/development.md) | Contributing and local setup |
|
|
102
146
|
|