You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -88,7 +89,7 @@ Another mode is local mode, which is more secure. It does not require an API key
88
89
### Installing from pip
89
90
90
91
Python 3.11+ is required.
91
-
you can install the server through pip, and it will install the latest verion
92
+
You can install the server through pip, and it will install the latest version:
92
93
93
94
```bash
94
95
pip install xiyan-mcp-server
@@ -111,8 +112,8 @@ Not fully tested.
111
112
112
113
## Configuration
113
114
114
-
You need a yml config file to configure the server.
115
-
a default config file is provided in config_demo.yml which looks like this:
115
+
You need a YAML config file to configure the server.
116
+
A default config file is provided in config_demo.yml which looks like this:
116
117
117
118
```yaml
118
119
model:
@@ -139,7 +140,7 @@ database:
139
140
| url | the endpoint of the service provider (e.g."https://api.openai.com/v1") | https://api-inference.modelscope.cn/v1/ | https://xiyan-stream.biz.aliyun.com/service/api/xiyan-sql | http://localhost:5090 |
140
141
141
142
#### General LLMs
142
-
if you want to use the general LLMs, e.g. gpt3.5, you can directly config like this:
143
+
If you want to use the general LLMs, e.g. gpt3.5, you can directly config like this:
143
144
```yaml
144
145
model:
145
146
name: "gpt-3.5-turbo"
@@ -148,7 +149,7 @@ model:
148
149
database:
149
150
```
150
151
151
-
if you want to use Qwen from alibaba, e.g. Qwen-max, you can use following config.
152
+
If you want to use Qwen from Alibaba, e.g. Qwen-max, you can use following config:
152
153
```yaml
153
154
model:
154
155
name: "qwen-max"
@@ -201,27 +202,27 @@ Note: this model service is just for trial, if you need to use it in production,
201
202
Alternatively, you can also deploy the model [XiYanSQL-qwencoder-32B](https://github.com/XGenerationLab/XiYanSQL-QwenCoder) on your own server.
202
203
203
204
#### Local Model
204
-
Note: local model is slow (about 12 seconds per query on my macbook).
205
-
If your need stable and fast service, we still recommend to use the modelscope version.
205
+
Note: the local model is slow (about 12 seconds per query on my macbook).
206
+
If you need a stable and fast service, we still recommend to use the modelscope version.
step4: download the script and run server. src/xiyan_mcp_server/local_xiyan_server.py
225
+
Step 3: download the script and run server. src/xiyan_mcp_server/local_xiyan_server.py
225
226
226
227
227
228
@@ -230,7 +231,7 @@ python local_xiyan_server.py
230
231
```
231
232
The server will be running on http://localhost:5090/
232
233
233
-
step4: prepare config and run xiyan_mcp_server
234
+
Step 4: prepare config and run xiyan_mcp_server
234
235
the config.yml should be like:
235
236
```yml
236
237
model:
@@ -239,7 +240,7 @@ model:
239
240
url: "http://127.0.0.1:5090"
240
241
```
241
242
242
-
Til now the local mode is ready.
243
+
Till now the local mode is ready.
243
244
244
245
### Database Configuration
245
246
``host``, ``port``, ``user``, ``password``, ``database`` are the connection information of the database.
@@ -257,11 +258,11 @@ database:
257
258
database: ""
258
259
```
259
260
#### PostgreSQL
260
-
step1: Install python packages
261
+
Step 1: Install Python packages
261
262
```bash
262
263
pip install psycopg2
263
264
```
264
-
step2: prepare the config.yml like this:
265
+
Step 2: prepare the config.yml like this:
265
266
```yaml
266
267
database:
267
268
dialect: "postgresql"
@@ -274,8 +275,8 @@ database:
274
275
275
276
Note that ``dialect`` should be ``postgresql`` for postgresql.
276
277
## Launch
277
-
### Claude desktop
278
-
Add this in your claude desktop config file, ref <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/claude_desktop.jpg">claude desktop config example</a>
278
+
### Claude Desktop
279
+
Add this in your Claude Desktop config file, ref <a href="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/claude_desktop.jpg">Claude Desktop config example</a>
279
280
```json
280
281
{
281
282
"mcpServers": {
@@ -293,27 +294,27 @@ Add this in your claude desktop config file, ref <a href="https://github.com/XGe
293
294
}
294
295
```
295
296
### Cline
296
-
prepare the config like [Claude desktop](#claude-desktop)
297
+
Prepare the config like [Claude Desktop](#claude-desktop)
297
298
298
299
### Goose
299
-
Add following command in the config, ref <ahref="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/goose.jpg">goose config example</a>
300
+
Add following command in the config, ref <ahref="https://github.com/XGenerationLab/xiyan_mcp_server/blob/main/imgs/goose.jpg">Goose config example</a>
300
301
301
302
```yaml
302
303
env YML=path/to/yml python -m xiyan_mcp_server
303
304
```
304
305
### Cursor
305
-
Use the same command like [Goose](#goose).
306
+
Use the same command like [Goose](#goose).
306
307
307
308
308
309
### Witsy
309
-
Add following in command.
310
+
Add following in command:
310
311
```yaml
311
312
python -m xiyan_mcp_server
312
313
```
313
314
Add an env: key is YML and value is the path to your yml file.
0 commit comments