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
A Model Context Protocol (MCP) server that enables natural language queries to databases, powered by [XiYanSQL](https://github.com/XGenerationLab/XiYan-SQL) as text-to-sql technique (SOTA of text-to-sql open benchmarks).
16
-
17
-
We support MySQL database now and more dialects are coming soon.
18
-
19
-
## 1. Features
20
-
- Fetch data by natural language through [XiYanSQL](https://github.com/XGenerationLab/XiYan-SQL)
- 🌐 Fetch data by natural language through [XiYanSQL](https://github.com/XGenerationLab/XiYan-SQL)
40
+
- 🖱️ List available MySQL tables as resources
41
+
- 🔧 Read table contents
42
+
43
+
## Tool Preview
25
44
- The tool ``get_data_via_natural_language`` provides a natural language interface for retrieving data from a database. This server will convert the input natural language into SQL using a built-in model and call the database to return the query results.
26
45
27
46
- The ``mysql://{table_name}`` resource allows obtaining a portion of sample data from the database for model reference when a specific table_name is specified.
28
47
- The ``mysql://`` resource will list the names of the current databases
29
48
30
-
## 3. Installation
31
-
### 3.1 Install from pip
49
+
## Installation
50
+
### Installing from pip
32
51
33
52
Python 3.11+ is required.
34
53
you can install the server through pip, and it will install the latest verion
@@ -47,13 +66,12 @@ You will get a yml file. After that you can run the server by:
47
66
env YML=path/to/yml python -m xiyan_mcp_server
48
67
```
49
68
50
-
51
-
### 3.2 Install from Smithery.ai
69
+
### Installing from Smithery.ai
52
70
See [@XGenerationLab/xiyan_mcp_server](https://smithery.ai/server/@XGenerationLab/xiyan_mcp_server)
53
71
54
72
Not fully tested.
55
73
56
-
## 4. Configuration
74
+
## Configuration
57
75
58
76
You need a yml config file to configure the server.
59
77
a default config file is provided in config_demo.yml which looks like this:
@@ -72,9 +90,9 @@ database:
72
90
database: ""
73
91
```
74
92
75
-
### 4.1 About LLM
93
+
### LLM Configuration
76
94
``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.
77
-
#### Using general LLMs
95
+
#### general LLMs
78
96
if you want to use the general LLMs, e.g. gpt3.5, you can directly config like this:
0 commit comments