Skip to content

feat: run the MCP Inspector in Docker Compose - #16

Merged
stphnwlsh merged 3 commits into
mainfrom
feature/docker-mcp-inspector
Oct 28, 2026
Merged

stphnwlsh merged 3 commits into
mainfrom
feature/docker-mcp-inspector

Conversation

@stphnwlsh

@stphnwlsh stphnwlsh commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

docker compose up now also starts the official MCP Inspector, already pointed at the server. This is the closest thing MCP has to Scalar: you can browse every tool with its description and input schema and run it, without installing Node or anything else.

  • Adds an inspector service using ghcr.io/modelcontextprotocol/inspector:2.12.0, started with --transport http --server-url http://api:8080 so it opens with this server preloaded.
  • The Inspector is published on 127.0.0.1:6274 only, as its docs recommend, because its backend can spawn processes. The page carries its own auth token, so there's nothing to paste.
  • Open http://localhost:6274, flip the switch on the server card to connect, then open Tools.
  • README and docs/RUN.md point at the Inspector instead of the bare endpoint.

Related issues

None.

Type of change

  • Bug fix
  • New feature
  • Breaking change (the generated solution or template parameters change in a way existing users will notice)
  • Refactoring or clean-up
  • Documentation
  • Build, pipeline or dependency update

Shared layers

  • This only touches the Presentation layer of this template.
  • This touches the Application or Infrastructure layers, tests, pipeline or repository setup, so it needs to be carried across all five templates.

Checklist

  • dotnet build and dotnet test pass locally with no warnings.
  • I added or updated tests, and coverage stays at or above 95%.
  • I updated the README or docs where behaviour changed.
  • I checked the template still installs and creates a working solution (see CONTRIBUTING.md).

docker compose up now also starts the official MCP Inspector on
localhost:6274, already configured for the server over Streamable HTTP, so
the tools, their descriptions and input schemas can be browsed and run
without installing anything.
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.72%. Comparing base (1a60256) to head (d302c02).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #16   +/-   ##
=======================================
  Coverage   99.72%   99.72%           
=======================================
  Files          42       42           
  Lines         364      364           
  Branches       13       13           
=======================================
  Hits          363      363           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

stphnwlsh added a commit that referenced this pull request Oct 28, 2026
## Summary

This is the first step in moving the server from "REST endpoints as
tools" towards how well-designed MCP servers expose an application. What
the tools do is unchanged. What changes is how they're named and how
they describe themselves to clients and agents.

- Tools are renamed by resource in snake_case: `authors_list`,
`authors_get`, `movies_list`, `movies_get`, `reviews_list`,
`reviews_get`, `reviews_create`, `reviews_update`, `reviews_delete` and
`server_get_version`. Parameters are named `authorId`, `movieId` and
`reviewId` instead of a bare `id`.
- Every tool now has a title and all four hints. The reads are read-only
and idempotent. Delete and update are destructive and idempotent, and
create is neither. All of them are closed-world. The stray
`[DisplayName("GetReviewById2")]` is gone.
- Descriptions are written for an agent. They say what comes back, which
list tool finds an id, and that delete can't be undone.
- The server instructions describe the domain and the workflow (look up
ids first, update overwrites every field, confirm before deleting)
instead of telling the model how to format output. The server info gets
a proper title, a `clean-model-context-protocol` name and an absolute
icon URL.
- Not-found and validation errors now tell the agent how to recover, for
example "Check the ids, using movies_list or the other list tools to
find valid ones."
- The server runs stateless and is mapped at `/mcp` instead of `/`.
Docker Compose, the README and docs/RUN.md point there, and
`launchSettings.json` no longer opens a `swagger` page that doesn't
exist.
- A new `tools/list` integration test pins every tool's name, title and
hints, and checks that every parameter has a description.

This branch is built on #16, so its Inspector change will drop out of
the diff once that merges.

## Related issues

None.

## Type of change

- [ ] Bug fix
- [x] New feature
- [x] Breaking change (the generated solution or template parameters
change in a way existing users will notice)
- [ ] Refactoring or clean-up
- [x] Documentation
- [ ] Build, pipeline or dependency update

Clients configured against the old tool names or the `/` endpoint need
updating.

## Shared layers

- [x] This only touches the Presentation layer of this template.
- [ ] This touches the Application or Infrastructure layers, tests,
pipeline or repository setup, so it needs to be carried across all five
templates.

## Checklist

- [x] `dotnet build` and `dotnet test` pass locally with no warnings.
- [x] I added or updated tests, and coverage stays at or above 95%.
- [x] I updated the README or docs where behaviour changed.
- [ ] I checked the template still installs and creates a working
solution (see CONTRIBUTING.md).
…spector

# Conflicts:
#	README.md
#	docker-compose.yml
#	docs/RUN.md
@stphnwlsh
stphnwlsh merged commit 1eaf5b5 into main Oct 28, 2026
12 checks passed
@stphnwlsh
stphnwlsh deleted the feature/docker-mcp-inspector branch October 28, 2026 16:44
stphnwlsh added a commit that referenced this pull request Oct 28, 2026
## Summary

Every tool now returns a typed result, so clients get an output schema
and structured content instead of an opaque JSON string.

- The tools return the Application entities (`Author`, `Movie`,
`Review`, `Version`) rather than `JsonSerializer.Serialize(...)`
strings, with `UseStructuredContent = true`. The SDK publishes an
`outputSchema` for each tool and returns `structuredContent` next to the
JSON text for older clients.
- The tool serializer now uses camelCase and the source-generated
`AppJsonSerializerContext`. That context was registered on the HTTP JSON
options, which the MCP server never used, so results were going out in
PascalCase.
- `reviews_update` returns the updated review instead of "Review updated
successfully", so the agent sees the result without another call.
- `reviews_delete` returns `{ reviewId, deleted }` instead of a
sentence.
- `server_get_version` returns `{ fileVersion, informationalVersion }`
instead of a markdown table.
- The tools/list test now also checks that every tool has an output
schema.

This is stacked on #17 (and #16), so their commits will drop out of the
diff once they merge.

## Related issues

None.

## Type of change

- [ ] Bug fix
- [x] New feature
- [x] Breaking change (the generated solution or template parameters
change in a way existing users will notice)
- [ ] Refactoring or clean-up
- [x] Documentation
- [ ] Build, pipeline or dependency update

The update, delete and version tools return objects instead of text.

## Shared layers

- [x] This only touches the Presentation layer of this template.
- [ ] This touches the Application or Infrastructure layers, tests,
pipeline or repository setup, so it needs to be carried across all five
templates.

## Checklist

- [x] `dotnet build` and `dotnet test` pass locally with no warnings.
- [x] I added or updated tests, and coverage stays at or above 95%.
- [x] I updated the README or docs where behaviour changed.
- [ ] I checked the template still installs and creates a working
solution (see CONTRIBUTING.md).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant