SQL Server MCP server

Prebuilt SnapLogic agentic-tool pipelines that let an LLM read from and act on SQL Server, callable as MCP tools via Pipeline Execute. Published in the SnapLogic pattern catalog.

Overview

This pack gives an agent full access to a Microsoft SQL Server database, covering read queries, data-changing statements and stored-procedure calls, and structured row inserts and updates. The table, schema, and SQL are all supplied at call time, so one connected account covers every table the database user can reach.

For setup instructions, see SnapLogic MCP Server quickstart.

Example Prompts

  • What tables and views exist in the dbo schema?
  • Show me the columns and data types on the customers table
  • List the top 10 customers by balance
  • How many orders were placed in the last 30 days, grouped by status?
  • Find every customer whose email domain is acme.com
  • Run dbo.update_customer_status for customer 42 with the new status premium
  • Delete the orders that were cancelled more than a year ago
  • Set every customer with no orders to status inactive
  • Add a nonclustered index on the email column of dbo.customers
  • Copy last month's rows from dbo.orders into dbo.orders_archive

Tools

Tool Name Functions
SQLServerExecuteRead Run an arbitrary read-only T-SQL query and return the result rows.
SQLServerExecuteWrite Run an arbitrary data-changing T-SQL statement or stored-procedure call.
SQLServerInsertRows Insert a row into a named table from a record object.
SQLServerInsertRowsChild SQL Server Insert Rows Child
SQLServerUpdateRows Update rows in a named table from a record object and a WHERE condition.
SQLServerUpdateRowsChild SQL Server Update Rows Child

Set up the MCP Server tools

  1. Download sqlserver_tools.zip.
  2. In SnapLogic Designer, open the target project space (or create one), then choose Import Project / Import Pipelines and select the downloaded sqlserver_tools.zip. Designer unpacks each pipeline into the project.
  3. Attach the required account to the connectivity snaps (see Connection Setup).
  4. Expose the project as an MCP server — each pipeline becomes a tool named after its label. New to this? Start with the MCP quickstart, then use the MCP Server Pipeline Builder to generate the server from the imported pipelines.

Configure account

Attach a SQL Server account to the SQL Server snaps in Designer after import.

These pipelines ship without credentials by design — attach a valid account in Designer before the tools will execute.

See the SnapLogic account documentation for this connector: Sql Server Account.

Important: These pipelines ship without credentials by design — attach a valid account in Designer before the tools will execute. Credentials live in the SnapLogic account store, never in the pipeline JSON.

SQLServerExecuteRead

Runs an arbitrary read-only T-SQL statement against the database and returns the result rows. Use this for any SELECT query, including schema discovery against INFORMATION_SCHEMA; for statements that modify data, use SQLServerExecuteWrite.

Parameter Type Default Description
sql_statement* string

The full read-only T-SQL statement to execute, e.g. SELECT TABLE_NAME, TABLE_TYPE FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbo'.

* Required parameter.

Try asking:

  • What tables and views exist in the dbo schema?
  • Show me the columns and data types on the customers table
  • List the top 10 customers by balance
  • How many orders were placed in the last 30 days, grouped by status?
  • Find every customer whose email domain is acme.com

SQLServerExecuteWrite

Runs a data-changing T-SQL statement against the database, including inserts, updates, deletes, DDL, and stored procedure calls. For straightforward single-row work, use SQLServerInsertRows or SQLServerUpdateRows instead.

Parameter Type Default Description
sql_statement* string

The full data-changing T-SQL statement to execute, e.g. EXEC dbo.update_customer_status @customer_id = 42, @new_status = 'premium'.

* Required parameter.

Try asking:

  • Run dbo.update_customer_status for customer 42 with the new status premium
  • Delete the orders that were cancelled more than a year ago
  • Set every customer with no orders to status inactive
  • Add a nonclustered index on the email column of dbo.customers
  • Copy last month's rows from dbo.orders into dbo.orders_archive

SQLServerInsertRows

Inserts a single row into a named SQL Server table from a field map, without writing SQL. Use this for straightforward single-row inserts; for inserts that need custom SQL or multi-row logic, use SQLServerExecuteWrite.

Parameter Type Default Description
table_name* string

Name of the table to insert into, e.g. customers.

schema_name string

Schema containing the table, e.g. dbo. Omit or leave empty to use the account's default schema.

record* object

The row to insert as a field map of column name to value, e.g. {name: 'Acme Corp', email: '[email protected]', balance: 5000}.

* Required parameter.

Try asking:

  • Add a new customer called Acme Corp with email [email protected] and a balance of 5000
  • Insert a row into dbo.products for SKU A-1099, price 249
  • Create a customer record in the sales schema for Northwind Ltd
  • Log a new entry in the audit_events table for this run

SQLServerInsertRowsChild

Lets the LLM sql server insert rows child, exposed as an MCP tool callable via Pipeline Execute.

Parameter Type Default Description
table_name string customers

schema_name string dbo

SQLServerUpdateRows

Updates rows in a named SQL Server table that match a WHERE condition, using a field map of new values. Every row matching the condition is updated, so use a narrow predicate to limit the scope of the change.

Parameter Type Default Description
table_name* string

Name of the table to update, e.g. customers.

schema_name string

Schema containing the table, e.g. dbo. Omit or leave empty to use the account's default schema.

update_condition* string

T-SQL WHERE predicate identifying the rows to update, e.g. id = 42. All matching rows are changed.

record* object

Columns to change as a field map of column name to new value, e.g. {balance: 7500, status: 'premium'}.

* Required parameter.

Try asking:

  • Set customer 42's balance to 7500 and status to premium
  • Mark every order with status pending as processing
  • Update the email on the dbo.customers row where id = 108
  • In the sales schema, set discount_rate to 0.15 for all customers on the enterprise tier

SQLServerUpdateRowsChild

Lets the LLM sql server update rows child, exposed as an MCP tool callable via Pipeline Execute.

Parameter Type Default Description
table_name string customers

schema_name string dbo

update_condition string id = 1