Skip to content
MCP

Chapter 6 Β· Build

Local Development Workflow

Your day-to-day loop: start the server, check health, run the smoke test, explore with MCP Inspector, and run tests and lint before you commit.

🎯 What you'll be able to do

  • Start and validate the server locally
  • Interpret smoke-test results, including the deliberate 401
  • Use MCP Inspector to discover tools over Streamable HTTP
  • Run unit tests and the linter

Start the server

PowerShell
.\scripts\run_local.ps1
Expected output
Starting MCP server on http://localhost:8080/mcp ...

Validate health

In another terminal:

PowerShell
Invoke-RestMethod http://localhost:8080/healthz
Invoke-RestMethod http://localhost:8080/readyz

Expected shapes:

JSON
{ "status": "ok", "version": "1.0.0" }

{ "status": "ready", "server": "microsoft-scout-jira-mcp" }

Run the smoke test

PowerShell
python scripts\smoke.py
StepWhat it confirms
/healthzReturns 200 locally.
/mcpWithout a bearer, returns 401 (correctly rejects anonymous calls).
MCP initializeReturns 200 with a placeholder bearer.
tools/listChecked only when a real token is supplied.
The 401 is expected
A 401 on anonymous /mcp is a pass β€” it proves the server refuses unauthenticated tool calls.

Use MCP Inspector

PowerShell
npx @modelcontextprotocol/inspector
SettingValue
TransportStreamable HTTP
URLhttp://localhost:8080/mcp
Note
Tool calls that hit Jira need a real Atlassian OAuth access token. The Inspector is still useful for verifying MCP transport and tool discovery behavior even without one.

Tests and lint

PowerShell
pytest -q
ruff check .
Tip
Run these before every commit. They're the same checks CI runs, so catching issues locally saves a failed pipeline later (see CI/CD).

πŸ§ͺ Hands-on lab: Your first full local loop

~15 minutes

Goal: Run the complete develop-and-verify cycle once, end to end.

  1. Start the server with the helper script.
  2. Validate /healthz and /readyz in a second terminal.
  3. Run python scripts\\smoke.py and confirm the 401 step passes.
  4. Open MCP Inspector and connect to the local endpoint.
  5. Stop the server, then run pytest -q and ruff check ..

❓ Concept check

The smoke test passes locally, but you want to verify a real tools/list. What do you need, and where does it come from?

πŸ“Œ Chapter summary

  • run_local.ps1 starts the server on port 8080.
  • /healthz and /readyz confirm liveness and readiness.
  • The smoke test verifies the essentials without a real token.
  • pytest -q and ruff check . keep the code healthy.

βœ… End-of-chapter review

0/5 done