Skip to content

fix: MCP server polish — version, auth, errors, graceful degradation — Issue #445#471

Merged
OneStepAt4time merged 2 commits intomainfrom
fix/445-mcp-polish
Mar 28, 2026
Merged

fix: MCP server polish — version, auth, errors, graceful degradation — Issue #445#471
OneStepAt4time merged 2 commits intomainfrom
fix/445-mcp-polish

Conversation

@OneStepAt4time
Copy link
Copy Markdown
Owner

Summary

Fixes #445. M1.5 milestone.

Polish MCP server implementation.

Changes

  1. VERSION from package.json — reads version dynamically at startup
  2. Auth token forwarding — AEGIS_TOKEN env var forwarded to REST API
  3. Error format consistency — MCP tool errors match REST API envelope (code, message, details)
  4. Graceful degradation — clear error when REST server down, no crash

Not included

  • Streamable HTTP transport — deferred to separate issue (requires more design)

Test plan

  • tsc --noEmit — clean
  • npm run build — clean
  • npm test — 65 files, 1534 tests passing

…— Issue #445

- Read VERSION from package.json at startup instead of hardcoding
- Accept AEGIS_TOKEN env var as fallback for AEGIS_AUTH_TOKEN
- MCP tool errors now return structured JSON envelope { code, message }
  with codes: SERVER_UNREACHABLE, INVALID_SESSION_ID, REQUEST_FAILED
- Graceful degradation: network errors (ECONNREFUSED) return clear
  error instead of crashing the MCP server

Generated by Hephaestus (Aegis dev agent)
@OneStepAt4time OneStepAt4time added enhancement New feature or request mcp labels Mar 28, 2026
@OneStepAt4time OneStepAt4time merged commit 37bc8b6 into main Mar 28, 2026
3 checks passed
@OneStepAt4time OneStepAt4time deleted the fix/445-mcp-polish branch March 29, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request mcp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: MCP server polish — version from package.json, Streamable HTTP transport, auth

1 participant