40 lines
1.1 KiB
Markdown
40 lines
1.1 KiB
Markdown
# SQL Server MCP Server
|
|
|
|
Project-local MCP server for Codex. It connects to SQL Server using the existing `.cursorrules-mcp.json` configuration at the repository root.
|
|
|
|
## Tools
|
|
|
|
- `sqlserver_list_databases`
|
|
- `sqlserver_list_tables`
|
|
- `sqlserver_describe_table`
|
|
- `sqlserver_read_data`
|
|
- `sqlserver_insert_rows`
|
|
- `sqlserver_update_rows`
|
|
- `sqlserver_delete_rows`
|
|
- `sqlserver_create_table`
|
|
- `sqlserver_drop_table`
|
|
- `sqlserver_list_procedures`
|
|
- `sqlserver_describe_procedure`
|
|
- `sqlserver_create_or_alter_procedure`
|
|
- `sqlserver_drop_procedure`
|
|
- `sqlserver_execute_procedure`
|
|
|
|
## Safety
|
|
|
|
- Connection secrets stay in `.cursorrules-mcp.json`, which is ignored by git.
|
|
- `READONLY=true` blocks writes.
|
|
- `DB_ENCRYPT=true` enables encrypted SQL Server connections when required.
|
|
- Table/procedure DDL requires `ENABLE_DDL=true`.
|
|
- Update/delete require object-based `where` criteria.
|
|
- Destructive tools require `confirm: true`.
|
|
- Database selection is restricted to the configured `DATABASES` allowlist.
|
|
|
|
## Build
|
|
|
|
```powershell
|
|
npm install
|
|
npm run build
|
|
```
|
|
|
|
Codex starts the server through `start.ps1`.
|