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
Copy file name to clipboardExpand all lines: README.md
+14-9Lines changed: 14 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -9,27 +9,29 @@
9
9
# XiYan MCP Server
10
10
11
11
12
-
A Model Context Protocol (MCP) server that enables natural language queries to databases, power by XiYanSQL(https://github.com/XGenerationLab/XiYan-SQL) as text-to-sql technique.
12
+
A Model Context Protocol (MCP) server that enables natural language queries to databases, power by [XiYanSQL](https://github.com/XGenerationLab/XiYan-SQL) as text-to-sql technique.
13
13
14
14
We support MySQL database now and more dialects are coming soon.
15
15
16
16
## Features
17
-
- Fetch data by natural language through XiYanSQL(https://github.com/XGenerationLab/XiYan-SQL)
17
+
- Fetch data by natural language through [XiYanSQL](https://github.com/XGenerationLab/XiYan-SQL)
18
18
- List available MySQL tables as resources
19
19
- Read table contents
20
20
21
+
22
+
21
23
## Installation
22
24
23
25
Python 3.11+ is required.
24
-
you can install the server by a pre-release verion
26
+
you can install the server through pip, and it will install the latest verion
25
27
26
28
```bash
27
-
pip install xiyan_mcp_server
29
+
pip install xiyan-mcp-server
28
30
```
29
31
30
32
After that you can directly run the server by:
31
33
```bash
32
-
python -m xiyan_mcp_server
34
+
python -m xiyan-mcp-server
33
35
```
34
36
But it does not provide any functions until you complete following config.
35
37
You will get a yml file. After that you can run the server by:
@@ -58,7 +60,7 @@ database:
58
60
```
59
61
60
62
### About LLM
61
-
Name is the name of the model to use, key is the API key of the model, url is the API url of the model.
63
+
``Name`` is the name of the model to use, ``key`` is the API key of the model, ``url`` is the API url of the model. We support following models.
62
64
#### Using general LLMs
63
65
if you want to use the general LLMs, e.g. gpt3.5, you can directly config like this:
64
66
```yaml
@@ -80,7 +82,7 @@ database:
80
82
#### Using Text-to-SQL SOTA model
81
83
Last, we recommend the XiYanSQL-qwencoder-32B (https://github.com/XGenerationLab/XiYanSQL-QwenCoder), which is the SOTA model in text-to-sql.
82
84
We deployed the model on DashScope, so you need to set the following environment variables:
83
-
Contact us to get the key.
85
+
Contact us to get the ``key``.
84
86
```yaml
85
87
model:
86
88
name: "pre-xiyan_multi_dialect_v3"
@@ -93,9 +95,11 @@ database:
93
95
To support in the future.
94
96
95
97
### About the database
96
-
host, port, user, password, database are the connection information of the MySQL database.
98
+
``host``, ``port``, ``user``, ``password``, ``database`` are the connection information of the MySQL database.
99
+
100
+
You can use local or any remote databases. Now we support MySQL (more dialects soon).
101
+
97
102
98
-
You can use local or any remote databases. Currently we support MySQL (more dialects soon)
99
103
```yaml
100
104
database:
101
105
host: "localhost"
@@ -105,6 +109,7 @@ database:
105
109
database: ""
106
110
```
107
111
112
+
108
113
## Citation
109
114
If you find our work helpful, feel free to give us a cite.
0 commit comments