feat: implement protocol extensions and observability features #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why?
Addresses #5 - adds MCP protocol capabilities (tools, notifications, sampling) and operational observability to the SDD server.
What Changed?
New modules:
mcp_server/tools.py- Helper tools for workspace operations:list-artifacts- enumerate specs/taskscreate-spec-stub- generate spec files with auto-numberingsummarize-diff- text comparison summariesmcp_server/notifications.py- broadcasts workspace file events viasend_resource_list_changed()mcp_server/sampling.py- requests client-generated summaries/analysis via MCP sampling protocolmcp_server/logging.py- structured JSON/text logging + health checksHealth endpoints:
GET /health- simple liveness checkGET /mcp/health- detailed readiness with workspace/prompts status, returns 503 on degradedIntegration:
mcp_server/__init__.pyvia FastMCP decoratorsTest coverage:
tests/test_tools_protocol.pycovering tools, notifications, sampling, loggingDocumentation:
docs/operations.mdwith observability section including health endpoint examples, structured logging config, and helper tool referenceAdditional Notes
Environment variables for logging control:
SDD_LOG_LEVEL- DEBUG/INFO/WARNING/ERROR (default: INFO)SDD_LOG_FORMAT- json/text (default: json)Example structured log output:
{ "timestamp": "2025-11-11T18:24:24.112289+00:00", "level": "INFO", "logger": "sdd-mcp", "message": "MCP server initialized successfully", "module": "__init__", "function": "create_app", "line": 95 }tasks/0002-spec-open-source-ready.md)uv run pytestuv run pre-commit run --all-filesWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
astral.shcurl -LsSf REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.