Skip to content

integrations: K-Dense (Kady) MCP server for Dataroom + pi typebox dep fix - #5

Open
soobrosa wants to merge 2 commits into
hanxiao:mainfrom
soobrosa:feat/k-dense-mcp-integration
Open

integrations: K-Dense (Kady) MCP server for Dataroom + pi typebox dep fix#5
soobrosa wants to merge 2 commits into
hanxiao:mainfrom
soobrosa:feat/k-dense-mcp-integration

Conversation

@soobrosa

@soobrosa soobrosa commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a reference MCP integration so K-Dense BYOK's agent (Kady) can delegate long, fully-cited research deep-dives to a self-hosted Dataroom - sitting beside the existing client contract in skills/use-dataroom/SKILL.md.

Also fixes a pre-existing setup gap (separate commit): the Pi dataroom-index extension imports typebox but nothing installed it, so jobs failed at load.

What's in it

integrations/k-dense/

  • dataroom_mcp.py - a stdio MCP server (FastMCP) wrapping the job API (POST /jobs -> GET /jobs/{id}/stats -> GET /jobs/{id}/result|snapshot), the same submit/poll/download flow as the skill. Tools: commission_dataroom, dataroom_status, collect_dataroom, research_with_dataroom. Base URL resolves argv > $DATAROOM_BASE > http://localhost:8000 (points at a local instance, not the hosted demo).
  • custom_mcps.json - ready-to-paste K-Dense registration (uv run --with mcp --with httpx).
  • README.md - install + a routing rule for Kady (delegate "comprehensive, cited research corpus before a long-horizon task"; keep quick lookups on web search).

pi/extensions/package.json + a setup line in docs/MAC.md

  • Declares the extension's typebox dependency and adds (cd pi/extensions && npm install) to the Mac setup, so the agent loads the extension instead of exiting with Cannot find module 'typebox'.

Test

End-to-end on an M3 Pro: brought up the stack (scripts/mac-run.sh), drove the MCP server over stdio with a real mcp ClientSession:

  • list_tools -> all four tools.
  • commission_dataroom -> POST /jobs 200, job id returned.
  • dataroom_status -> polled running -> stopped, budget 0 -> 100%.
  • collect_dataroom -> GET /result 200, downloaded + unzipped a real dataroom (CONTRACT.md, OUTLINE.md, STATUS.md scoped to the query).

Before the typebox fix the job exited instantly with error_pi_exited; after it, the agent loop ran and produced the dataroom above.

soobrosa and others added 2 commits June 5, 2026 19:44
A stdio MCP server that wraps the Dataroom job API (the same submit -> poll ->
download contract as skills/use-dataroom/SKILL.md), so K-Dense BYOK's Kady can
delegate long, fully-cited research deep-dives to a self-hosted Dataroom. Ships
the server, an example custom_mcps.json registration, and a routing rule.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
The Pi dataroom-index extension imports 'typebox' but nothing installed it, so
jobs failed at load with "Cannot find module 'typebox'" (error_pi_exited).
Add pi/extensions/package.json and a (cd pi/extensions && npm install) step to
the Mac setup so the extension loads.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
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