| name | description | argument-hint | allowed-tools |
|---|---|---|---|
mssql |
Manage MssqlMcp servers - status, rebuild, and upstream updates |
[status] [rebuild] [update] [--node] [--dotnet] [--check] |
Bash, Read, Glob, Grep, Write, AskUserQuestion |
Manage the vendored MssqlMcp servers (Node.js and .NET). The plugin ships with pre-built servers - this skill is for diagnostics, rebuilding, and upstream updates.
Parse the first positional argument from $ARGUMENTS:
| Subcommand | Description |
|---|---|
status |
Check environment, verify artifacts, test connectivity (default if no args) |
rebuild |
Rebuild servers from existing source code |
update |
Pull latest from upstream GitHub and rebuild |
| Flag | Applies to | Description |
|---|---|---|
--node |
status, rebuild |
Only operate on Node.js server |
--dotnet |
status, rebuild |
Only operate on .NET server |
--check |
update |
Show what would change without applying |
Check environment configuration, verify build artifacts exist, and test database connectivity.
echo "MSSQL_AUTH_TYPE: ${MSSQL_AUTH_TYPE:-azure-default (default)}"
echo "MSSQL_SERVER_NAME: ${MSSQL_SERVER_NAME:-localhost (default)}"
echo "MSSQL_DATABASE_NAME: ${MSSQL_DATABASE_NAME:-master (default)}"
echo "MSSQL_USER: ${MSSQL_USER:-(not set)}"
echo "MSSQL_PASSWORD: ${MSSQL_PASSWORD:+(set)}"
echo "MSSQL_ENCRYPT: ${MSSQL_ENCRYPT:-true (default)}"
echo "MSSQL_READONLY: ${MSSQL_READONLY:-true (default)}"
echo "MSSQL_TRUST_CERT: ${MSSQL_TRUST_CERT:-true (default)}"
echo "MSSQL_CONNECTION_STRING: ${MSSQL_CONNECTION_STRING:+(custom - for .NET)}"# Node.js - check bundle exists (single-file, no node_modules needed at runtime)
ls ${CLAUDE_PLUGIN_ROOT}/vendor/MssqlMcp/Node/bundle/index.cjs
# Node.js - check dist exists (used by bundle step)
ls ${CLAUDE_PLUGIN_ROOT}/vendor/MssqlMcp/Node/dist/index.js
# .NET - check published exe exists
ls ${CLAUDE_PLUGIN_ROOT}/vendor/MssqlMcp/dotnet-publish/MssqlMcp.exeReport:
Build Artifacts
Node.js:
bundle/index.cjs: Found (runtime entry point)
dist/index.js: Found (used by bundle step)
.NET:
dotnet-publish/MssqlMcp.exe: Found (pre-built, ready to use)
# For LocalDB
sqlcmd -S "(localdb)\MSSQLLocalDB" -d master -Q "SELECT @@VERSION" -C
# For custom server
sqlcmd -S "${MSSQL_SERVER_NAME}" -d "${MSSQL_DATABASE_NAME}" -Q "SELECT @@VERSION" -CSQL Server MCP Status
Environment:
Server: (localdb)\MSSQLLocalDB
Database: master
Auth: azure-default
Mode: Read-only
Build Status:
mssql-node: Ready (bundle/index.cjs found)
mssql-dotnet: Ready (dotnet-publish/MssqlMcp.exe found)
Connectivity:
sqlcmd test: Success
SQL Version: Microsoft SQL Server 2022 (RTM)
Status: READY
Rebuild servers from existing source code. Use after modifying source or fixing a corrupted build.
- Node.js: Node.js 18+ with npm
- .NET: .NET 8 SDK
node --version
npm --version
dotnet --versioncd ${CLAUDE_PLUGIN_ROOT}/vendor/MssqlMcp/Node
npm install
npm run build
npm run bundleVerify:
ls dist/index.js
ls bundle/index.cjscd ${CLAUDE_PLUGIN_ROOT}/vendor/MssqlMcp/dotnet
dotnet publish MssqlMcp/MssqlMcp.csproj -c Release -o ../dotnet-publishVerify:
ls ${CLAUDE_PLUGIN_ROOT}/vendor/MssqlMcp/dotnet-publish/MssqlMcp.exegit add -f plugins/microsoft/vendor/MssqlMcp/dotnet-publish/
git add -f plugins/microsoft/vendor/MssqlMcp/Node/bundle/
git add -f plugins/microsoft/vendor/MssqlMcp/Node/dist/MssqlMcp Rebuild Complete
Node.js Server:
Output: bundle/index.cjs (single-file bundle with all deps)
.NET Server:
Output: dotnet-publish/MssqlMcp.exe
Artifacts re-tracked in git. Commit when ready.
Pull latest from upstream Azure-Samples/SQL-AI-samples and rebuild.
WARNING: Local Patches Will Be Overwritten
This plugin includes local patches (documented in
vendor/MssqlMcp/PATCHES.md). After updating, you MUST re-apply these patches.
TEMP_DIR=$(mktemp -d)
cd "$TEMP_DIR"
git clone --depth 1 --filter=blob:none --sparse \
https://github.com/Azure-Samples/SQL-AI-samples.git
cd SQL-AI-samples
git sparse-checkout set MssqlMcp
LATEST_COMMIT=$(git rev-parse --short HEAD)
LATEST_MESSAGE=$(git log -1 --format=%s)cd "${CLAUDE_PLUGIN_ROOT}"
CURRENT_COMMIT=$(cat plugins/microsoft/vendor/MssqlMcp/VERSION 2>/dev/null || echo "unknown")Report:
MssqlMcp Update Check
Current: ${CURRENT_COMMIT}
Upstream: ${LATEST_COMMIT} - ${LATEST_MESSAGE}
If --check, stop here.
# Backup current
mv plugins/microsoft/vendor/MssqlMcp plugins/microsoft/vendor/MssqlMcp.bak
# Copy new files (preserving build artifacts and parent .gitignore from backup)
cp -r "$TEMP_DIR/SQL-AI-samples/MssqlMcp" plugins/microsoft/vendor/
cp -r plugins/microsoft/vendor/MssqlMcp.bak/Node/dist plugins/microsoft/vendor/MssqlMcp/Node/ 2>/dev/null || true
cp -r plugins/microsoft/vendor/MssqlMcp.bak/Node/bundle plugins/microsoft/vendor/MssqlMcp/Node/ 2>/dev/null || true
cp -r plugins/microsoft/vendor/MssqlMcp.bak/Node/node_modules plugins/microsoft/vendor/MssqlMcp/Node/ 2>/dev/null || true
cp -r plugins/microsoft/vendor/MssqlMcp.bak/dotnet-publish plugins/microsoft/vendor/MssqlMcp/ 2>/dev/null || true
cp plugins/microsoft/vendor/MssqlMcp.bak/.gitignore plugins/microsoft/vendor/MssqlMcp/ 2>/dev/null || true
# Write version file
echo "${LATEST_COMMIT}" > plugins/microsoft/vendor/MssqlMcp/VERSION
# Cleanup
rm -rf plugins/microsoft/vendor/MssqlMcp.bak
rm -rf "$TEMP_DIR"cd plugins/microsoft/vendor/MssqlMcp/Node
npm install
npm run build
npm run bundlecd plugins/microsoft/vendor/MssqlMcp/dotnet
dotnet publish MssqlMcp/MssqlMcp.csproj -c Release -o ../dotnet-publishIMPORTANT: Read and re-apply patches from PATCHES.md:
cat plugins/microsoft/vendor/MssqlMcp/PATCHES.mdCurrent patches to re-apply:
- Multi-auth support in
Node/src/index.ts:- Add
AuthTypetype - Replace
createSqlConfig()with multi-auth factory - Update
ensureSqlConnection()for SQL auth
- Add
After re-applying, rebuild:
cd plugins/microsoft/vendor/MssqlMcp/Node
npm run build && npm run bundlegit add -f plugins/microsoft/vendor/MssqlMcp/dotnet-publish/
git add -f plugins/microsoft/vendor/MssqlMcp/Node/bundle/
git add -f plugins/microsoft/vendor/MssqlMcp/Node/dist/
git status --short plugins/microsoft/vendor/MssqlMcp/# Check status (default)
/microsoft:mssql
# Check status of Node.js server only
/microsoft:mssql status --node
# Rebuild both servers
/microsoft:mssql rebuild
# Rebuild only .NET server
/microsoft:mssql rebuild --dotnet
# Check for upstream updates (dry run)
/microsoft:mssql update --check
# Pull upstream and rebuild
/microsoft:mssql updateNode.js build fails:
Common issues:
1. Old Node.js version - upgrade to 18+
2. Corrupted node_modules - delete and retry
3. npm cache issues - npm cache clean --force
4. zod/TypeScript incompatibility - pin @modelcontextprotocol/sdk to 1.x
.NET build fails:
Common issues:
1. Wrong SDK version - install .NET 8
2. Missing workloads - dotnet workload restore
3. NuGet cache issues - dotnet nuget locals all --clear
- Repository: https://github.com/Azure-Samples/SQL-AI-samples
- Path: MssqlMcp/
- License: MIT
/microsoft:setup-dab- Install and configure Data API Builder