Skip to content

Commit 2d82c1a

Browse files
update readme
1 parent 42540f9 commit 2d82c1a

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# 使用Python 3.9作为基础镜像
1+
# 使用Python 3.11作为基础镜像
22
FROM python:3.11-slim
33

44
# 设置工作目录
55
WORKDIR /app
66

77
# 复制requirements.txt文件并安装依赖
8-
COPY requirements.txt .
9-
RUN pip install --no-cache-dir -r requirements.txt
10-
8+
#COPY requirements.txt .
9+
RUN pip install xiyan-mcp-server
1110
# 复制应用代码
12-
COPY . .
11+
#COPY . .
1312

1413
# 暴露端口(如果需要)
1514
# EXPOSE 5000

README.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,29 @@
99
# XiYan MCP Server
1010

1111

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.
1313

1414
We support MySQL database now and more dialects are coming soon.
1515

1616
## 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)
1818
- List available MySQL tables as resources
1919
- Read table contents
2020

21+
22+
2123
## Installation
2224

2325
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
2527

2628
```bash
27-
pip install xiyan_mcp_server
29+
pip install xiyan-mcp-server
2830
```
2931

3032
After that you can directly run the server by:
3133
```bash
32-
python -m xiyan_mcp_server
34+
python -m xiyan-mcp-server
3335
```
3436
But it does not provide any functions until you complete following config.
3537
You will get a yml file. After that you can run the server by:
@@ -58,7 +60,7 @@ database:
5860
```
5961
6062
### 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.
6264
#### Using general LLMs
6365
if you want to use the general LLMs, e.g. gpt3.5, you can directly config like this:
6466
```yaml
@@ -80,7 +82,7 @@ database:
8082
#### Using Text-to-SQL SOTA model
8183
Last, we recommend the XiYanSQL-qwencoder-32B (https://github.com/XGenerationLab/XiYanSQL-QwenCoder), which is the SOTA model in text-to-sql.
8284
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``.
8486
```yaml
8587
model:
8688
name: "pre-xiyan_multi_dialect_v3"
@@ -93,9 +95,11 @@ database:
9395
To support in the future.
9496
9597
### 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+
97102
98-
You can use local or any remote databases. Currently we support MySQL (more dialects soon)
99103
```yaml
100104
database:
101105
host: "localhost"
@@ -105,6 +109,7 @@ database:
105109
database: ""
106110
```
107111
112+
108113
## Citation
109114
If you find our work helpful, feel free to give us a cite.
110115
```bib

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ mysql-connector-python>=9.1.0
33
sqlalchemy
44
llama_index
55
yaml
6-
pandas
6+
pandas
7+
pymysql

0 commit comments

Comments
 (0)