get_dataLABSCO SUMMARY
A specialist text-to-SQL model in front of your database, instead of the chat model guessing.
The choice worth making here is remote or local. Remote uses a hosted model and needs a key; local runs the model on your own server and needs none, which is the option to take when the schema itself is sensitive. Either way the server, not the client, holds the database credentials.
What it is
A natural-language query layer over your database. The server converts the question to SQL with the XiYanSQL model, runs it, and returns the results. It can call a hosted model or one you run yourself.
What you get
- One natural-language data tool, get_data, that turns the question into SQL and returns the query results
- Table names exposed as resources, so the client can list what exists before asking
- Sample rows from a named table, given as a resource for the model to reference
- MySQL and PostgreSQL, with the dialect selected in the config file
- A local mode that needs no API key at all, for when the data cannot leave the network
Requirements
Python 3.11+ and pip install xiyan-mcp-server. A YAML config supplies the model name, key and URL plus the database host, port, user, password and database; its path is passed to the server in the YML environment variable. Remote mode needs a model API key; local mode does not. PostgreSQL additionally needs psycopg2 and dialect set to postgresql. Transport is stdio, or sse on port 8000.
Setup effort
One command plus a key — pip install xiyan-mcp-server, then supply credentials
USE CASES
Answering a data question without writing the query
Ask in plain language; the server writes the SQL, runs it against the configured database and returns the rows.
Working out what the database even contains
List the databases and tables as resources, then pull sample rows from one before framing the real question.
Keeping schema and data inside the network
Point the model config at a locally deployed XiYanSQL instance - the key field goes empty and nothing is sent to a provider.
1 tool
Listed in project docs. Your client may show a different list.
BEFORE YOU INSTALL
What to know first
Tools you get
1 tool named in the project's documentation.
Requires
Python 3.11+
INSTALLATION
Connect your client
Server setup
pip install xiyan-mcp-serverCreate the YAML config file that YML points to, starting from the repo's config_demo.yml: an mcp block (transport: "stdio"), a model block (name, key and url of the model that writes the SQL) and a database block (host, port, user, password, database; add dialect: "postgresql" for PostgreSQL)
MCP Clients
Claude Desktop, Cline, Cursor
{
"mcpServers": {
"xiyan-mcp-server": {
"command": "<YOUR_PATH_TO_PYTHON>",
"args": [
"-m",
"xiyan_mcp_server"
],
"env": {
"YML": "<YOUR_YML>"
}
}
}
}Goose
env YML=<YOUR_YML> <YOUR_PATH_TO_PYTHON> -m xiyan_mcp_serverWitsy
In Witsy, add an MCP server and put this in the command field:
<YOUR_PATH_TO_PYTHON> -m xiyan_mcp_serverAdd an env entry with the key YML and the path to your YAML config file as its value