- Home
- MCP servers
- Jewei MSSQL
Jewei MSSQL
- python
5
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can run a specialized MCP server that connects to Microsoft SQL Server to perform SQL data queries and fetch table structures. It exposes a standardized MCP interface so clients can execute queries and retrieve schema information efficiently and reliably.
How to use
To interact with this MCP server, connect using an MCP client and invoke available endpoints such as querying data or retrieving table structures. The server supports standard data operations and returns results in a structured format suitable for tooling and IDE integrations. Typical usage patterns include sending a SQL query to fetch data and requesting the structure of a specific table to understand its columns and types.
How to install
Prerequisites: You need Python 3.7 or newer, access to Microsoft SQL Server, and the FastMCP library.
pip install jewei-mssql-mcp-server
Alternative: install from source to run the MCP server locally.
git clone [仓库URL]
cd jewei-mssql-mcp-server
pip install -r requirements.txt
Configure database connection via a configuration file or environment variables (see configuration details in the Additional sections). Then start the server using Python.
python server.py
Additional sections
Configuration options include environment variables, configuration files, or programmatic setup. The MCP server can be integrated with Windsurf-based clients or Cline, as shown in the examples below.
Configuration examples for MCP clients
Windsurf / Cursor / Claude clients use a local MCP configuration file to connect to the server. A representative configuration maps an MCP server name to a command, arguments, and environment variables for database connectivity.
{
"mcpServers": {
"jewei-mssql": {
"disabled": false,
"command": "uvx",
"args": [
"jewei-mssql-mcp-server"
],
"env": {
"DB_HOST": "your_db_host",
"DB_USER": "your_db_user",
"DB_PASSWORD": "your_db_password",
"DB_NAME": "your_db_name",
"DB_PORT": "your_db_port"
}
}
}
}
For Cline clients, add a similar MCP server entry in the Cline configuration, aligning with the Cline configuration format.
// Cline configuration example (format may vary; adapt to your version)
{
"mcpServers": {
"jewei-mssql": {
"command": "uvx",
"args": [
"jewei-mssql-mcp-server"
],
"env": {
"DB_HOST": "your_db_host",
"DB_USER": "your_db_user",
"DB_PASSWORD": "your_db_password",
"DB_NAME": "your_db_name",
"DB_PORT": "your_db_port"
}
}
}
}
Operational details and endpoints
The server exposes endpoints to run SQL queries and to fetch table structures. Typical usage involves connecting with an MCP client, then invoking actions such as querying data or retrieving metadata for a specific table.
Security and best practices
Use strong credentials for the database connection, limit user permissions to the minimum necessary, and consider network ACLs or firewall rules to prevent unauthorized access. Rotate database passwords periodically and store credentials securely in environment variables or configuration files with restricted access.
Troubleshooting notes
If the server fails to start, verify Python 3.7+ is being used, check that all dependencies are installed, and confirm database connectivity details are correct. Review startup logs for errors related to environment variables or DB connection strings.
Notes
The MCP server is designed to run with a focus on compatibility and ease of integration with common MCP clients. You can choose between STDIO-based local execution (via uvx or similar commands) or an HTTP transport if your setup supports it.
Available tools
query_sql
Execute a SQL query against the connected SQL Server and return the result set.
get_table_structure
Retrieve the structure of a specified database table, including columns and data types.