Natural Language MCP-MSSQL Client logo

Natural Language MCP-MSSQL Client

by david-ruffin

A natural language interface for SQL databases using the Model Context Protocol (MCP). This client allows users to query Microsoft SQL Server databases using plain English questions through Claude AI.

View on GitHub

Last updated: N/A

What is Natural Language MCP-MSSQL Client?

This is a client that allows users to query Microsoft SQL Server databases using plain English questions. It leverages the Model Context Protocol (MCP) and Anthropic's Claude AI to translate natural language queries into SQL commands.

How to use Natural Language MCP-MSSQL Client?

  1. Clone the repository. 2. Set up a virtual environment and install dependencies. 3. Configure the environment variables with your database and API credentials. 4. Run the interactive client (interactive_client.py) to ask your own questions or run the demo client (demo_nl_client.py) to see predefined questions.

Key features of Natural Language MCP-MSSQL Client

  • Natural Language Querying

  • MCP Integration

  • Claude AI

  • Interactive Mode

  • Demo Mode

Use cases of Natural Language MCP-MSSQL Client

  • Quickly querying databases without writing SQL

  • Exploring data with natural language

  • Creating reports using natural language queries

  • Simplifying database access for non-technical users

FAQ from Natural Language MCP-MSSQL Client

What is MCP?

MCP stands for Model Context Protocol. It provides access to MS SQL Server databases.

What is Claude AI?

Claude AI is Anthropic's API used to translate natural language to SQL.

What are the prerequisites for running this client?

You need Python 3.8+, the ODBC Driver for SQL Server, an Anthropic API key, and the required Python packages (fastmcp, anthropic, python-dotenv, etc.).

How do I configure the database connection?

You need to fill in your database credentials in the .env file (MSSQL_SERVER, MSSQL_DATABASE, MSSQL_USER, MSSQL_PASSWORD, MSSQL_DRIVER).

Where can I find the ODBC Driver for SQL Server?

You can download it from the official Microsoft website for Windows, macOS, or Linux.