Xiyan MCP Server logo

Xiyan MCP Server

by XGenerationLab

Query MySQL or PostgreSQL databases with natural-language requests through an XiYanSQL-powered MCP server.

Install Xiyan MCP Server

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "xgenerationlab-xiyan-mcp-server": {
      "command": "uvx",
      "args": [
        "xiyan-mcp-server"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx xiyan-mcp-server

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

XGenerationLab/xiyan_mcp_server MCP server turns natural-language requests into SQL and returns results from MySQL or PostgreSQL databases. It exposes the get_data tool and database resources for listing databases and previewing table rows. Configure it with a YAML file to use a hosted LLM, a general model, or a local model. Reach for it when an MCP client needs conversational access to relational data.

Use cases

  • Ask questions about MySQL data in natural language
  • Retrieve PostgreSQL query results through an MCP client
  • Preview table samples for text-to-SQL context
  • Run database queries with a local XiYanSQL model

Key features

  • Natural-language database queries
  • MySQL and PostgreSQL support
  • Table and database MCP resources
  • Hosted or local text-to-SQL models
  • stdio and SSE transports

Tools1

What Xiyan MCP Server lets your agent do. Expand a tool for its parameters.

Self-reported~2 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

33/34 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · xiyan-mcp-server (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars239Stargazers on the source repository.
Last commit9mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed1Callable tools this server registers over MCP.
Directory activity10 viewsConfig copies, upvotes, and views on AllMCPs.

How Xiyan MCP Server works

What XGenerationLab/xiyan_mcp_server does

XGenerationLab/xiyan_mcp_server provides a natural-language interface for querying MySQL and PostgreSQL databases through MCP. Its main tool, get_data, accepts a user request, generates SQL with the configured language model, executes that query against the configured database, and returns the results.

The server also exposes database information as MCP resources. A dialect resource lists the names of available databases, while a resource addressing a specific table can provide sample rows for model reference. These resources help the model understand the available schema and data before producing a query.

This places XGenerationLab/xiyan_mcp_server in the 🗄️ Databases category: it is intended for retrieving and inspecting relational data rather than modifying database records.

How it works

The server supports two transport choices: stdio for local MCP client processes and sse for a network-accessible server. The default configuration uses stdio. SSE mode includes configurable port and logging settings, with port 8000 documented as the default.

For each natural-language request, the configured model generates text-to-SQL output. The server then uses the database connection settings to run the query and return the result. The model can be a general API-compatible LLM, the XiYanSQL-QwenCoder model through ModelScope or DashScope, or a local XiYanSQL model. Remote model configurations require an API key; the documented local mode does not.

Setup and configuration

Python 3.11 or newer is required. Install the published package with:

Terminal
pip install xiyan-mcp-server

A source installation is also documented through the GitHub repository. After installation, create a YAML configuration file with mcp, model, and database sections. The database section accepts host, port, user, password, and database values. The model section specifies its name, API key, and endpoint URL.

Database examples cover MySQL and PostgreSQL configuration. Client launch examples are provided for Claude Desktop, Cline, and Cursor; the README also includes a Goose example, which is not represented in this directory's client list.

Tools and capabilities

  • get_data: translate a natural-language request into SQL and retrieve database results.
  • {dialect}://: list database names for the configured database system.
  • {dialect}://{table_name}: expose sample data from a selected table.
  • Use hosted general-purpose LLMs, XiYanSQL text-to-SQL models, or a local model.
  • Run over stdio or SSE transport.

Limitations and notes

XGenerationLab/xiyan_mcp_server documents support for MySQL and PostgreSQL only. It requires a YAML configuration file, and remote model use depends on the selected provider's endpoint and API key. Local mode avoids the API key requirement but uses a local model service. The Smithery installation path is marked as not fully tested in the project documentation. Query behavior depends on the generated SQL and the database schema supplied through configuration and resources.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Xiyan MCP Server

XGenerationLab/xiyan_mcp_server is an MCP server that connects AI clients to MySQL and PostgreSQL databases. Its main get_data tool converts natural-language requests into SQL with a configured XiYanSQL or compatible language model, executes the query, and returns results; MCP resources list databases and provide table samples.

Install it with Python 3.11 or newer using `pip install xiyan-mcp-server`.

Configure it with a YAML file containing `mcp`, `model`, and `database` sections. Set the transport, model name, model endpoint, optional API key, and database connection details such as host, port, user, password, and database name.

Yes, Cursor is one of the clients named in the README's launch configuration examples. The server can use stdio transport for local client integration or SSE when configured as a network service.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewXiyan MCP Server AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/xgenerationlab-xiyan-mcp-server?style=directory)](https://allmcps.com/mcp/xgenerationlab-xiyan-mcp-server)
HTML Embed
<a href="https://allmcps.com/mcp/xgenerationlab-xiyan-mcp-server"><img src="https://allmcps.com/api/badge/xgenerationlab-xiyan-mcp-server?style=directory" alt="Xiyan MCP Server on AllMCPs" /></a>