MCP.so
Sign In

SQL Server Table Assistant - Modal Context Protocol

@hblaDCOM

About SQL Server Table Assistant - Modal Context Protocol

SQL Server Agent tool (with MCP)

Basic information

Category

AI & Agents

License

MIT

Runtime

python

Transports

stdio

Publisher

hblaDCOM

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "sql-server-table-assistant": {
      "command": "python",
      "args": [
        "mcp-ssms-client.py"
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is SQL Server Table Assistant - Modal Context Protocol?

SQL Server Table Assistant - Modal Context Protocol is an application that lets you interact with a specific SQL Server table using natural language. It uses the Modal Context Protocol as a communication layer between LLMs and your data source, and is based on the original mcp-sql-server-natural-lang repository with modifications for single‑table access.

How to use SQL Server Table Assistant - Modal Context Protocol?

Clone the repository, install dependencies with pip install -r requirements.txt, and create a .env file with Azure OpenAI credentials and SQL Server connection details. Then run python mcp-ssms-client.py and type your requests in plain English. Special commands like /diagnose, /refresh_schema, and /history are available.

Key features of SQL Server Table Assistant - Modal Context Protocol

  • Chat with a SQL Server table using plain English.
  • Iteratively refine SQL queries with user feedback.
  • View results in well‑formatted tables.
  • Automatic query history and logging.
  • Perform no‑code CRUD operations via conversation.
  • Secure single‑table access with token optimization.

Use cases of SQL Server Table Assistant - Modal Context Protocol

  • Non‑technical users querying a database table in natural language.
  • Rapidly prototyping and debugging SQL queries through interactive feedback.
  • Performing data analysis on a specific table without writing SQL.
  • Logging all query interactions for compliance or training purposes.
  • Teaching SQL concepts by reviewing generated queries and explanations.

FAQ from SQL Server Table Assistant - Modal Context Protocol

How is this different from the full MCP SQL Server natural language project?

This version focuses on a single table, enhancing security and simplifying permissions. Access is limited to one table rather than the entire database, reducing risk and simplifying credential setup.

What are the prerequisites to run the assistant?

You need Python 3.12+, a valid Azure OpenAI deployment with API access, a SQL Server instance with a target table, and limited user credentials that only have access to that table.

How does token optimization work?

Smart schema summarization, response caching, minimal prompt design, conversation management, dedicated system prompts, selective result trimming, and conservative max_tokens settings minimize API usage and help avoid rate limits.

What should I do if I have connection issues?

Verify your server name/IP is correct, ensure SQL Server accepts remote connections and firewall rules allow traffic, check that the ODBC driver specified in the .env file is installed, and test connectivity with tools like SSMS or sqlcmd.

Are INSERT/UPDATE/DELETE operations safe?

Yes. All operations are shown for user approval before execution, and write tests use transactions with rollback. Structured query generation also helps prevent SQL injection.

Comments

More AI & Agents MCP servers