py-mcp-mssql
The Python MSSQL MCP Server is a Model Context Protocol server that facilitates access to Microsoft SQL Server databases. It supports asynchronous operations and integrates with FastAPI for creating API endpoints, allowing language models to query databases through a standardized interface.
What Python version is required for the Python MSSQL MCP Server?
The server requires Python 3.8 or higher.
How do I configure the server to connect to my SQL Server database?
You need to create a .env file in the project root with your database connection details, including server, database, user, password, and driver.
What is the purpose of the MCP in this server?
The Model Context Protocol (MCP) provides a standardized interface for language models to interact with SQL databases, allowing them to inspect schemas and execute queries.
How does the server handle errors?
The server implements comprehensive error handling for database connection failures, invalid SQL queries, resource access errors, and more, with all errors logged and returned with appropriate messages.
What are the main dependencies of the server?
The main dependencies include FastAPI, pyodbc, pydantic, python-dotenv, and mcp-server.