@cmd233/mcp-database-server 1.1.1 → 1.1.3

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 CHANGED
@@ -1,148 +1,148 @@
1
1
  [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/executeautomation-mcp-database-server-badge.png)](https://mseep.ai/app/executeautomation-mcp-database-server)
2
2
 
3
- # MCP Database Server
3
+ # MCP 数据库服务器
4
4
 
5
- This MCP (Model Context Protocol) server provides database access capabilities to Claude, supporting SQLite, SQL Server, PostgreSQL, and MySQL databases.
5
+ MCP (Model Context Protocol) 服务器为 Claude 提供数据库访问能力,支持 SQLiteSQL ServerPostgreSQL MySQL 数据库。
6
6
 
7
- ## Installation
7
+ ## 安装
8
8
 
9
- 1. Clone the repository:
9
+ 1. 克隆仓库:
10
10
  ```
11
11
  git clone https://github.com/executeautomation/mcp-database-server.git
12
12
  cd mcp-database-server
13
13
  ```
14
14
 
15
- 2. Install dependencies:
15
+ 2. 安装依赖:
16
16
  ```
17
17
  npm install
18
18
  ```
19
19
 
20
- 3. Build the project:
20
+ 3. 构建项目:
21
21
  ```
22
22
  npm run build
23
23
  ```
24
24
 
25
- ## Usage Options
25
+ ## 使用选项
26
26
 
27
- There are two ways to use this MCP server with Claude:
27
+ 有两种方式可以在 Claude 中使用此 MCP 服务器:
28
28
 
29
- 1. **Direct usage**: Install the package globally and use it directly
30
- 2. **Local development**: Run from your local development environment
29
+ 1. **直接使用**: 全局安装包并直接使用
30
+ 2. **本地开发**: 从本地开发环境运行
31
31
 
32
- ### Direct Usage with NPM Package
32
+ ### 使用 NPM 包直接安装
33
33
 
34
- The easiest way to use this MCP server is by installing it globally:
34
+ 使用此 MCP 服务器最简单的方法是全局安装:
35
35
 
36
36
  ```bash
37
37
  npm install -g @executeautomation/database-server
38
38
  ```
39
39
 
40
- This allows you to use the server directly without building it locally.
40
+ 这允许您直接使用服务器,无需在本地构建。
41
41
 
42
- ### Local Development Setup
42
+ ### 本地开发设置
43
43
 
44
- If you want to modify the code or run from your local environment:
44
+ 如果您想修改代码或在本地环境运行:
45
45
 
46
- 1. Clone and build the repository as shown in the Installation section
47
- 2. Run the server using the commands in the Usage section below
46
+ 1. 按照安装部分所示克隆并构建仓库
47
+ 2. 使用下面使用部分中的命令运行服务器
48
48
 
49
- ## Usage
49
+ ## 使用方法
50
50
 
51
- ### SQLite Database
51
+ ### SQLite 数据库
52
52
 
53
- To use with an SQLite database:
53
+ 用于 SQLite 数据库:
54
54
 
55
55
  ```
56
56
  node dist/src/index.js /path/to/your/database.db
57
57
  ```
58
58
 
59
- ### SQL Server Database
59
+ ### SQL Server 数据库
60
60
 
61
- To use with a SQL Server database:
61
+ 用于 SQL Server 数据库:
62
62
 
63
63
  ```
64
64
  node dist/src/index.js --sqlserver --server <server-name> --database <database-name> [--user <username> --password <password>]
65
65
  ```
66
66
 
67
- Required parameters:
68
- - `--server`: SQL Server host name or IP address
69
- - `--database`: Name of the database
67
+ 必需参数:
68
+ - `--server`: SQL Server 主机名或 IP 地址
69
+ - `--database`: 数据库名称
70
70
 
71
- Optional parameters:
72
- - `--user`: Username for SQL Server authentication (if not provided, Windows Authentication will be used)
73
- - `--password`: Password for SQL Server authentication
74
- - `--port`: Port number (default: 1433)
71
+ 可选参数:
72
+ - `--user`: SQL Server 认证的用户名(如果未提供,将使用 Windows 身份验证)
73
+ - `--password`: SQL Server 认证的密码
74
+ - `--port`: 端口号(默认: 1433)
75
75
 
76
- ### PostgreSQL Database
76
+ ### PostgreSQL 数据库
77
77
 
78
- To use with a PostgreSQL database:
78
+ 用于 PostgreSQL 数据库:
79
79
 
80
80
  ```
81
81
  node dist/src/index.js --postgresql --host <host-name> --database <database-name> [--user <username> --password <password>]
82
82
  ```
83
83
 
84
- Required parameters:
85
- - `--host`: PostgreSQL host name or IP address
86
- - `--database`: Name of the database
84
+ 必需参数:
85
+ - `--host`: PostgreSQL 主机名或 IP 地址
86
+ - `--database`: 数据库名称
87
87
 
88
- Optional parameters:
89
- - `--user`: Username for PostgreSQL authentication
90
- - `--password`: Password for PostgreSQL authentication
91
- - `--port`: Port number (default: 5432)
92
- - `--ssl`: Enable SSL connection (true/false)
93
- - `--connection-timeout`: Connection timeout in milliseconds (default: 30000)
88
+ 可选参数:
89
+ - `--user`: PostgreSQL 认证的用户名
90
+ - `--password`: PostgreSQL 认证的密码
91
+ - `--port`: 端口号(默认: 5432)
92
+ - `--ssl`: 启用 SSL 连接 (true/false)
93
+ - `--connection-timeout`: 连接超时时间(毫秒,默认: 30000)
94
94
 
95
- ### MySQL Database
95
+ ### MySQL 数据库
96
96
 
97
- #### Standard Authentication
97
+ #### 标准认证
98
98
 
99
- To use with a MySQL database:
99
+ 用于 MySQL 数据库:
100
100
 
101
101
  ```
102
102
  node dist/src/index.js --mysql --host <host-name> --database <database-name> --port <port> [--user <username> --password <password>]
103
103
  ```
104
104
 
105
- Required parameters:
106
- - `--host`: MySQL host name or IP address
107
- - `--database`: Name of the database
108
- - `--port`: Port number (default: 3306)
105
+ 必需参数:
106
+ - `--host`: MySQL 主机名或 IP 地址
107
+ - `--database`: 数据库名称
108
+ - `--port`: 端口号(默认: 3306)
109
109
 
110
- Optional parameters:
111
- - `--user`: Username for MySQL authentication
112
- - `--password`: Password for MySQL authentication
113
- - `--ssl`: Enable SSL connection (true/false or object)
114
- - `--connection-timeout`: Connection timeout in milliseconds (default: 30000)
110
+ 可选参数:
111
+ - `--user`: MySQL 认证的用户名
112
+ - `--password`: MySQL 认证的密码
113
+ - `--ssl`: 启用 SSL 连接 (true/false 或对象)
114
+ - `--connection-timeout`: 连接超时时间(毫秒,默认: 30000)
115
115
 
116
- #### AWS IAM Authentication
116
+ #### AWS IAM 认证
117
117
 
118
- For Amazon RDS MySQL instances with IAM database authentication:
118
+ 对于支持 IAM 数据库认证的 Amazon RDS MySQL 实例:
119
119
 
120
- **Prerequisites:**
121
- - AWS credentials must be configured (the RDS Signer uses the default credential provider chain)
122
- - Configure using one of these methods:
123
- - `aws configure` (uses default profile)
124
- - `AWS_PROFILE=myprofile` environment variable
125
- - `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables
126
- - IAM roles (if running on EC2)
120
+ **前置条件:**
121
+ - 必须配置 AWS 凭据(RDS 签名者使用默认凭据提供程序链)
122
+ - 使用以下方法之一配置:
123
+ - `aws configure`(使用默认配置文件)
124
+ - `AWS_PROFILE=myprofile` 环境变量
125
+ - `AWS_ACCESS_KEY_ID` `AWS_SECRET_ACCESS_KEY` 环境变量
126
+ - IAM 角色(如果在 EC2 上运行)
127
127
 
128
128
  ```
129
129
  node dist/src/index.js --mysql --aws-iam-auth --host <rds-endpoint> --database <database-name> --user <aws-username> --aws-region <region>
130
130
  ```
131
131
 
132
- Required parameters:
133
- - `--host`: RDS endpoint hostname
134
- - `--database`: Name of the database
135
- - `--aws-iam-auth`: Enable AWS IAM authentication
136
- - `--user`: AWS IAM username (also the database user)
137
- - `--aws-region`: AWS region where RDS instance is located
132
+ 必需参数:
133
+ - `--host`: RDS 端点主机名
134
+ - `--database`: 数据库名称
135
+ - `--aws-iam-auth`: 启用 AWS IAM 认证
136
+ - `--user`: AWS IAM 用户名(也是数据库用户)
137
+ - `--aws-region`: RDS 实例所在的 AWS 区域
138
138
 
139
- Note: SSL is automatically enabled for AWS IAM authentication
139
+ 注意: AWS IAM 认证会自动启用 SSL
140
140
 
141
- ## Configuring Claude Desktop
141
+ ## 配置 Claude Desktop
142
142
 
143
- ### Direct Usage Configuration
143
+ ### 直接使用配置
144
144
 
145
- If you installed the package globally, configure Claude Desktop with:
145
+ 如果您全局安装了包,使用以下配置配置 Claude Desktop:
146
146
 
147
147
  ```json
148
148
  {
@@ -209,9 +209,9 @@ If you installed the package globally, configure Claude Desktop with:
209
209
  }
210
210
  ```
211
211
 
212
- ### Local Development Configuration
212
+ ### 本地开发配置
213
213
 
214
- For local development, configure Claude Desktop to use your locally built version:
214
+ 对于本地开发,配置 Claude Desktop 使用您本地构建的版本:
215
215
 
216
216
  ```json
217
217
  {
@@ -219,7 +219,7 @@ For local development, configure Claude Desktop to use your locally built versio
219
219
  "sqlite": {
220
220
  "command": "node",
221
221
  "args": [
222
- "/absolute/path/to/mcp-database-server/dist/src/index.js",
222
+ "/absolute/path/to/mcp-database-server/dist/src/index.js",
223
223
  "/path/to/your/database.db"
224
224
  ]
225
225
  },
@@ -273,56 +273,56 @@ For local development, configure Claude Desktop to use your locally built versio
273
273
  }
274
274
  ```
275
275
 
276
- The Claude Desktop configuration file is typically located at:
276
+ Claude Desktop 配置文件通常位于:
277
277
  - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
278
278
  - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
279
279
  - Linux: `~/.config/Claude/claude_desktop_config.json`
280
280
 
281
- ## Available Database Tools
281
+ ## 可用的数据库工具
282
282
 
283
- The MCP Database Server provides the following tools that Claude can use:
283
+ MCP 数据库服务器提供以下可供 Claude 使用的工具:
284
284
 
285
- | Tool | Description | Required Parameters |
285
+ | 工具 | 描述 | 必需参数 |
286
286
  |------|-------------|---------------------|
287
- | `read_query` | Execute SELECT queries to read data | `query`: SQL SELECT statement |
288
- | `write_query` | Execute INSERT, UPDATE, or DELETE queries | `query`: SQL modification statement |
289
- | `create_table` | Create new tables in the database | `query`: CREATE TABLE statement |
290
- | `alter_table` | Modify existing table schema | `query`: ALTER TABLE statement |
291
- | `drop_table` | Remove a table from the database | `table_name`: Name of table<br>`confirm`: Safety flag (must be true) |
292
- | `list_tables` | Get a list of all tables | None |
293
- | `describe_table` | View schema information for a table | `table_name`: Name of table |
294
- | `export_query` | Export query results as CSV/JSON | `query`: SQL SELECT statement<br>`format`: "csv" or "json" |
295
- | `append_insight` | Add a business insight to memo | `insight`: Text of insight |
296
- | `list_insights` | List all business insights | None |
287
+ | `read_query` | 执行 SELECT 查询以读取数据 | `query`: SQL SELECT 语句 |
288
+ | `write_query` | 执行 INSERTUPDATE DELETE 查询 | `query`: SQL 修改语句 |
289
+ | `create_table` | 在数据库中创建新表 | `query`: CREATE TABLE 语句 |
290
+ | `alter_table` | 修改现有表架构 | `query`: ALTER TABLE 语句 |
291
+ | `drop_table` | 从数据库中删除表 | `table_name`: 表名<br>`confirm`: 安全标志(必须为 true) |
292
+ | `list_tables` | 获取所有表的列表 | |
293
+ | `describe_table` | 查看表的架构信息 | `table_name`: 表名 |
294
+ | `export_query` | 将查询结果导出为 CSV/JSON | `query`: SQL SELECT 语句<br>`format`: "csv" "json" |
295
+ | `append_insight` | 添加业务洞察到备忘录 | `insight`: 洞察文本 |
296
+ | `list_insights` | 列出所有业务洞察 | |
297
297
 
298
- For practical examples of how to use these tools with Claude, see [Usage Examples](docs/usage-examples.md).
298
+ 有关如何在 Claude 中使用这些工具的实际示例,请参阅[使用示例](docs/usage-examples.md)
299
299
 
300
- ## Additional Documentation
300
+ ## 附加文档
301
301
 
302
- - [SQL Server Setup Guide](docs/sql-server-setup.md): Details on connecting to SQL Server databases
303
- - [PostgreSQL Setup Guide](docs/postgresql-setup.md): Details on connecting to PostgreSQL databases
304
- - [Usage Examples](docs/usage-examples.md): Example queries and commands to use with Claude
302
+ - [SQL Server 设置指南](docs/sql-server-setup.md): 连接到 SQL Server 数据库的详细信息
303
+ - [PostgreSQL 设置指南](docs/postgresql-setup.md): 连接到 PostgreSQL 数据库的详细信息
304
+ - [使用示例](docs/usage-examples.md): Claude 一起使用的示例查询和命令
305
305
 
306
- ## Development
306
+ ## 开发
307
307
 
308
- To run the server in development mode:
308
+ 以开发模式运行服务器:
309
309
 
310
310
  ```
311
311
  npm run dev
312
312
  ```
313
313
 
314
- To watch for changes during development:
314
+ 在开发期间监视更改:
315
315
 
316
316
  ```
317
317
  npm run watch
318
318
  ```
319
319
 
320
- ## Requirements
320
+ ## 系统要求
321
321
 
322
322
  - Node.js 18+
323
- - For SQL Server connectivity: SQL Server 2012 or later
324
- - For PostgreSQL connectivity: PostgreSQL 9.5 or later
323
+ - SQL Server 连接: SQL Server 2012 或更高版本
324
+ - PostgreSQL 连接: PostgreSQL 9.5 或更高版本
325
325
 
326
- ## License
326
+ ## 许可证
327
327
 
328
328
  MIT