Skip to content

Add read-only Forge session MCP server#87

Open
eshulman2 wants to merge 1 commit into
forge-sdlc:mainfrom
eshulman2:feature/session-mcp-data-layer
Open

Add read-only Forge session MCP server#87
eshulman2 wants to merge 1 commit into
forge-sdlc:mainfrom
eshulman2:feature/session-mcp-data-layer

Conversation

@eshulman2

@eshulman2 eshulman2 commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a read-only Forge session summary service backed by checkpoint state
  • expose production HTTP endpoint: GET /api/v1/sessions/{ticket_key}/summary
  • expose an optional user-facing stdio MCP server with get_session_summary and forge://sessions/{ticket_key}
  • keep forge-session-mcp out of the checked-in mcp-servers.json so Forge agents do not load session-inspection tools themselves
  • add GRAFANA_BASE_URL config so summaries can include dashboard links
  • add user docs for the HTTP endpoint and optional Claude/MCP setup

Safety

  • users can query Forge API or their own assistant MCP client instead of needing Redis, Langfuse, or Grafana credentials
  • responses intentionally omit raw prompts, model messages, generated artifacts, tool inputs, and raw trace context
  • HTTP and MCP defaults expose checkpoint-derived summary only; Redis logs are opt-in on the HTTP endpoint and bounded by logs_limit <= 50
  • the MCP server is configured by users in their assistant client, not by Forge's agent MCP configuration

Docs

  • document /api/v1/sessions/{ticket_key}/summary in the API reference
  • add docs/reference/session-inspection.md with HTTP and Claude MCP setup instructions
  • link session inspection from README, docs index, and configuration reference

Tests

  • jq empty mcp-servers.json
  • uv run ruff check src/forge/mcp src/forge/api/routes/sessions.py src/forge/sessions tests/unit/mcp tests/unit/api/routes/test_sessions.py tests/unit/sessions/test_summary.py
  • uv run pytest tests/unit/mcp/test_session_server.py tests/unit/api/routes/test_sessions.py tests/unit/sessions/test_summary.py

@eshulman2 eshulman2 requested a review from danchild June 18, 2026 14:07
@eshulman2 eshulman2 force-pushed the feature/session-mcp-data-layer branch from f92c796 to b3de7fb Compare June 18, 2026 14:22
@eshulman2 eshulman2 force-pushed the feature/session-mcp-data-layer branch from b3de7fb to f8c4ab3 Compare June 18, 2026 15:17
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