Labsco
MCP SERVER

MSSQL Query & Insights Server

by daobataotie

SQL Server for an agent: read, write, create tables, and keep a memo of what it found.

Relational SQL Databases
Summary
A full hand on the database, not a reporting window.

The same connection that answers questions can insert, update, delete and create tables, and the agent writes the SQL itself after reading the schema. Which account sits in the config file is therefore the decision that matters.

What it is

A Python MCP server for Microsoft SQL Server, adapted from the reference SQLite server. It reads with SELECT, writes with INSERT, UPDATE and DELETE, creates tables, lists the tables that exist and describes a table's schema — so an agent can explore a database it has never seen and then change it. A sixth tool appends findings to a running business-insight memo, so an analysis session leaves something behind besides the transcript.

What you get
  • SELECT queries run against the connected database and returned to the client
  • INSERT, UPDATE and DELETE over the same connection
  • New tables created from the agent's own DDL
  • A list of every table in the database
  • The schema of any single table, column by column
  • A business-insight memo the agent appends findings to as it works
Requirements

A SQL Server the machine can reach, and the Microsoft ODBC driver for SQL Server installed locally. Connection details sit in a config.json beside the server: driver, host, database, and either a username and password or a trusted connection. The account in that file is the account the agent gets.