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.
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.
- 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
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.
One command plus a key — pip install xiyan-mcp-server, then supply credentials
