XiYan MCP Server
@XGenerationLab
About XiYan MCP Server
A Model Context Protocol (MCP) server that enables natural language queries to databases
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"xiyan-mcp-server": {
"command": "python",
"args": [
"-m",
"xiyan_mcp_server"
],
"env": {
"YML": "PATH/TO/YML"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is XiYan MCP Server?
A Model Context Protocol (MCP) server that enables natural language queries to databases. It is powered by XiYan-SQL, the state-of-the-art text-to-SQL system on open benchmarks, and is intended for developers and data analysts who want to query databases using natural language through MCP-compatible clients (e.g., Claude Desktop, Cursor).
How to use XiYan MCP Server?
Install the server with pip install xiyan-mcp-server, then provide a YAML configuration file specifying the LLM model, API key, database credentials, and transport protocol (stdio or sse). Launch the server with YML=path/to/yml python -m xiyan_mcp_server and connect it to a supported MCP client.
Key features of XiYan MCP Server
- Query databases using natural language via XiYanSQL
- Supports general LLMs (GPT, Qwen-max) and a SOTA text-to-SQL model
- Runs in pure local mode for high security
- Works with MySQL and PostgreSQL databases
- Lists available tables and reads table contents as resources
Use cases of XiYan MCP Server
- Build a local data assistant that answers questions from a database
- Enable non-technical users to explore data via chat interfaces
- Integrate natural-language database access into MCP-compatible IDEs or tools
FAQ from XiYan MCP Server
What databases does XiYan MCP Server support?
MySQL and PostgreSQL are currently supported. More dialects are planned.
Do I need an API key to use the server?
It depends on the model. General LLMs require an API key from the provider (e.g., OpenAI, Alibaba Cloud). The SOTA model can be used via Modelscope (requires a free API-inference key) or via Dashscope (key provided by email for trial). Local mode requires no API key.
Can I run the server entirely offline?
Yes. You can deploy the XiYanSQL-QwenCoder model locally and set the configuration to point to your local endpoint, achieving a fully local and high-security setup.
What transport protocols are supported?
The server supports both stdio (default) and sse transport protocols, making it compatible with a variety of MCP clients.
How do I get a trial key for the Dashscope‑hosted SOTA model?
Send an email to [email protected] with your name, email, and organization to request a key. The key expires after one month or 200 queries.
Frequently asked questions
What databases does XiYan MCP Server support?
MySQL and PostgreSQL are currently supported. More dialects are planned.
Do I need an API key to use the server?
It depends on the model. General LLMs require an API key from the provider (e.g., OpenAI, Alibaba Cloud). The SOTA model can be used via Modelscope (requires a free API-inference key) or via Dashscope (key provided by email for trial). Local mode requires no API key.
Can I run the server entirely offline?
Yes. You can deploy the XiYanSQL-QwenCoder model locally and set the configuration to point to your local endpoint, achieving a fully local and high-security setup.
What transport protocols are supported?
The server supports both `stdio` (default) and `sse` transport protocols, making it compatible with a variety of MCP clients.
How do I get a trial key for the Dashscope‑hosted SOTA model?
Send an email to [email protected] with your name, email, and organization to request a key. The key expires after one month or 200 queries.
Basic information
More Other MCP servers
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
ICSS
chokcoco不止于 CSS
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

Glasswarp
GlasswarpSee and control a real Windows PC you own — from any MCP client, locally or remotely. Observe (UIA + screenshots), click/type/drag/scroll, launch apps, owner Live View. BYOH: your machine, your key.
Comments