XiYan MCP Server

XiYan MCP Server is an MCP server that enables natural language database querying using the XiYan-SQL model and general large language models. It connects client applications such as Claude Desktop, Cline, Goose, and Cursor directly to relational databases, specifically MySQL and PostgreSQL. Developers, data analysts, and software engineers use this server to inspect database schemas, retrieve table records, and fetch data using plain natural language questions without manually drafting SQL syntax. The server translates conversational input into SQL queries via local or remote model endpoints, executes the statements against the connected database, and returns the query outputs directly to the MCP client. XiYan MCP Server supports both stdio and SSE transport protocols, and it can operate using hosted inference APIs like ModelScope and DashScope, general LLMs like GPT or Qwen, or completely local models for enhanced data isolation and privacy.

Category: Data & Analytics

Tags: database-query, natural-language-query, SQL, xiyansql

Visit XiYan MCP Server

How to install and configure XiYan MCP Server

  1. Ensure Python 3.11+ is installed on your machine. 2. Install the server using pip: shell pip install xiyan-mcp-server Or install from source: shell pip install git+https://github.com/XGenerationLab/xiyan_mcp_server.git 3. Create a YAML configuration file (e.g., config.yml) defining the transport, model, and database parameters: yaml mcp: transport: "stdio" model: name: "XGenerationLab/XiYanSQL-QwenCoder-32B-2412" key: "YOUR_KEY" url: "https://api-inference.modelscope.cn/v1/" database: host: "localhost" port: 3306 user: "root" password: "" database: "" 4. Configure your MCP client (such as Claude Desktop or Cursor) to launch the server pointing to your configuration file, as instructed in the repository documentation at https://github.com/XGenerationLab/xiyan_mcp_server.

What you can do with XiYan MCP Server

  • Running natural language queries using the get_data tool to automatically translate questions into SQL and fetch database records. - Inspecting relational schemas by browsing database names and listing available tables as MCP resources. - Sampling table records using custom URI schemes to provide schema and context references for AI models. - Running offline Text-to-SQL tasks by configuring local model weights to maintain database privacy without external API calls. - Connecting MySQL or PostgreSQL instances to development assistants like Claude Desktop, Cline, and Cursor.

Key facts

  • https://github.com/XGenerationLab/xiyan_mcp_server
  • Data & Analytics, Databases & Data Stores
  • database-query, natural-language-query, SQL, xiyansql

Part of MCP Servers

Related MCP servers

  • MCP KQL Server — MCP KQL Server is an MCP server that connects AI assistants to Azure Data Explorer clusters using Azure CLI authentication.…
  • MCP Jupyter Complete — MCP Jupyter Complete is an MCP server that provides tools for manipulating Jupyter notebook files through position-based cell operations and…
  • MCP Memory Keeper — MCP Memory Keeper is an MCP server that provides persistent context management and memory storage for Claude AI coding assistants.…
  • MCP Notes — MCP Notes is an MCP server that provides note-taking and note-management capabilities to AI models using Amazon Web Services DynamoDB…
  • MCP Neo4j Server — MCP Neo4j Server is an MCP server that provides an integration between the Neo4j graph database and Model Context Protocol…
  • MCP Mempool — MCP Mempool is an MCP server that exposes the mempool.space WebSocket and REST APIs to AI agents, LLM assistants, and…

How do I install XiYan MCP Server?

XiYan MCP Server requires Python 3.11 or higher. You can install it directly from PyPI by running pip install xiyan-mcp-server in your terminal. Alternatively, you can install the latest development build from the source repository using pip install git+https://github.com/XGenerationLab/xiyan_mcp_server.git. It can also be added through Smithery.

What can XiYan MCP Server do?

The server provides tools to convert plain text prompts into structured database queries using XiYanSQL. It executes these queries against connected MySQL or PostgreSQL databases, inspects available tables, retrieves sample records, and returns the resulting data back to your AI client environment.

Which MCP clients work with XiYan MCP Server?

XiYan MCP Server works with any standard Model Context Protocol client. Supported and documented clients include Claude Desktop, Cline, Goose, and Cursor, communicating through either standard input and output (stdio) or Server-Sent Events (SSE).

What database engines are supported by XiYan MCP Server?

The server supports MySQL and PostgreSQL databases. You can configure the database target by providing the host, port, username, password, and database name inside the server's YAML configuration file.

Is XiYan MCP Server open source?

Yes, XiYan MCP Server is open source and licensed under the Apache 2.0 License. Its source code and release information are publicly accessible on GitHub.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories