agentleFS
MicrosoftKnown publishermicrosoft/bobsql/.github/skills/build-sqlmcpserver-demo/SKILL.md

build-sqlmcpserver-demo

Skill324 starsChanged 3 months agoMITView on GitHub

Build / provision the LOCAL demo environment for the "SQL MCP Server: Bringing AI Agents to Your SQL Data" (Adventure Works scenario) on this machine, so the demos will run. USE WHEN the presenter says any of: "build the sqlmcpserver demo environment on this machine", "set up the SQL MCP Server demo kit", "build the SQL MCP Server demo environment", "provision the AdventureWorks demo on this laptop", "get the SQL MCP demo ready on this box", or moves the talk to a new machine and needs AdventureWorks + the view + a validated DAB config in place. Scope is DOWNLOAD + RESTORE + SCHEMA/VIEW + VALIDATE CONFIG + VERIFY + check MCP registration ONLY. Do NOT use to run/rehearse the demos (that's run-sqlmcpserver-demos) or to author slides.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    All paths are workspace-relative to the bobsql root.

    line 23
  2. Very specific:

    Read-only. Asserts: DB up, Production.Product = 504, mcp.vProductComponents for Touring-1000 = 14, dab --version ≥ 2.0.9, dab validate …

    line 61

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Build the SQL MCP Server demo environment

Stand up everything the SQL MCP Server demos need on this machine, then verify. Everything is local — a SQL Server 2025 instance on localhost with Windows integrated auth, the stock AdventureWorks database, and Data API builder (DAB) as the SQL MCP Server. No cloud egress.

All paths are workspace-relative to the bobsql root. Kit: sqlmcpserver/build/. Run .ps1 scripts synchronously (isBackground:false, timeout:0); check exit codes; one command per call.

Prereqs to check first (do NOT try to install these — stop and tell the presenter if missing)

  • SQL Server 2025 local instance reachable on localhost via Windows auth (current login = sysadmin). No container, no sa.
  • sqlcmd on PATH (SqlServer command-line tools).
  • .NET SDK (for the DAB global tool).
  • PowerShell 7+ (scripts are #requires -Version 7.0).

Quick gate:

sqlcmd -S localhost -E -C -Q "SELECT @@VERSION;"     # instance reachable via Windows auth?
Get-Command sqlcmd, dotnet, pwsh -ErrorAction SilentlyContinue

Build procedure — one command

& sqlmcpserver/build/setup.ps1

setup.ps1 is the one-shot build. It:

  1. Checks host prereqs (sqlcmd, dotnet, pwsh; SQL reachable via Windows auth) and aborts if missing.
  2. Downloads AdventureWorks2022.bak (git-ignored; skipped if already present).
  3. Restores it as [AdventureWorks] (Windows auth).
  4. Deploys the mcp schema + mcp.vProductComponents view.
  5. Ensures the DAB CLI and runs dab validate on build/dab/dab-config.json.

(The individual scripts — download-adventureworks.ps1, restore-adventureworks.ps1, sql/01-mcp-views.sql, build.ps1 -NoStart — still exist if you need to run a single step.)

Verify — one command

& sqlmcpserver/build/verify-preflight.ps1

Read-only. Asserts: DB up, Production.Product = 504, mcp.vProductComponents for Touring-1000 = 14, dab --version ≥ 2.0.9, dab validate passes, ≤ 1 DAB process. Exit 0 = all green — that is the definition of "built."

MCP surface + registration (HTTP)

The MCP server is now HTTP on :5001, not stdio. .vscode/mcp.json (workspace root) registers Adventure Works (SQL MCP) → http://localhost:5001/mcp. The kit is location-independent (scripts resolve paths via $PSScriptRoot; the config uses localhost) — nothing to edit when the repo path changes. REST (/api), GraphQL (/graphql), and MCP (/mcp) all come from the one :5001 process.

Going live is the run skill's job, not this one; for reference the go-live command is:

& sqlmcpserver/build/start-mcp-http.ps1   # starts DAB HTTP :5001, proves the MCP handshake → GREEN

Optional (only if the demo has been built)

  • Demo 4 (add-a-tool) proc: if build/sql/ gains the BOM proc (uspGetProductBOM), deploy it with sqlcmd ... -i the same way as the view, then re-run verify-preflight.ps1. As of last edit this is pending a design decision — skip unless present.

Do NOT

  • Install SQL Server, .NET, or sqlcmd — setup.ps1 checks and reports; it does not provision the host.
  • Go live (start-mcp-http.ps1) or drive the demos here — that's run-sqlmcpserver-demos. This skill leaves a validated, verified environment.
  • Author slides.

Done =

setup.ps1 completed and verify-preflight.ps1 is all green (504 products, view = 14 for Touring-1000, dab validate passes, DAB ≥ 2.0.9). Hand off to run-sqlmcpserver-demos (which runs start-mcp-http.ps1 and drives the beats).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.