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.ps1Expected 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/readyzExpected shapes:
JSON
{ "status": "ok", "version": "1.0.0" }
{ "status": "ready", "server": "microsoft-scout-jira-mcp" }Run the smoke test
PowerShell
python scripts\smoke.py| Step | What it confirms |
|---|---|
/healthz | Returns 200 locally. |
/mcp | Without a bearer, returns 401 (correctly rejects anonymous calls). |
| MCP initialize | Returns 200 with a placeholder bearer. |
| tools/list | Checked 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| Setting | Value |
|---|---|
| Transport | Streamable HTTP |
| URL | http://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 minutesGoal: Run the complete develop-and-verify cycle once, end to end.
- Start the server with the helper script.
- Validate
/healthzand/readyzin a second terminal. - Run
python scripts\\smoke.pyand confirm the 401 step passes. - Open MCP Inspector and connect to the local endpoint.
- Stop the server, then run
pytest -qandruff 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.ps1starts the server on port 8080./healthzand/readyzconfirm liveness and readiness.- The smoke test verifies the essentials without a real token.
pytest -qandruff check .keep the code healthy.