Skip to content

Phase 2 Slice 2: MCP Consume#6

Merged
SarkarShubhdeep merged 4 commits into
developmentfrom
phase2/mcp-consume
Jul 13, 2026
Merged

Phase 2 Slice 2: MCP Consume#6
SarkarShubhdeep merged 4 commits into
developmentfrom
phase2/mcp-consume

Conversation

@SarkarShubhdeep

@SarkarShubhdeep SarkarShubhdeep commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Phase 2 Slice 2: MCP Consume

Summary

Consume external MCP servers, starting with footnote's hybrid search via
stdio transport (docidx mcp). MCP tools merge into Jerry's ToolSet with
graceful fallback to in-process search_memory when unavailable.

Changes

  • @modelcontextprotocol/sdk dependency
  • McpClient stdio wrapper (packages/tools/src/mcp/client.ts)
  • Footnote MCP tool adapter (packages/tools/src/mcp/footnote-adapter.ts)
  • mcp.servers[] config in privacy profile (packages/agent-runtime/src/types.ts)
  • MCP config resolver (packages/jerry-app/src/mcp-config.ts)
  • Worker/CLI wiring for MCP tool provider via createJerryTools options
  • Agent instructions updated with MCP tool descriptions

New Tools (via footnote MCP)

  • search_hybrid — Combined vector + full-text search for richer results
  • search_fts — Full-text keyword search with BM25 ranking
  • search_literal — Exact string grep for finding specific phrases
  • read_document — Fetch complete document content by path

Acceptance Criteria

  • jerry search my notes about kubernetes invokes footnote search_hybrid via MCP
  • MCP unavailable → falls back to in-process search_memory
  • Mock MCP tests pass
  • Footnote integration test documented (opt-in)

Dependencies

Testing

  • Unit tests: MCP client, footnote adapter, profile MCP config
  • Integration: opt-in footnote MCP test (JERRY_INTEGRATION=mcp pnpm test)
  • Manual: acceptance scenario above

Notes

  • Does not replace direct Ollama embeddings in Slice 1
  • Footnote accessed via MCP boundary, not direct embedder import
  • MCP requires stdio transport (local/CLI); Cloudflare Workers can't spawn child processes
  • Awaiting review — do not merge without approval

Made with Cursor

Adds MCP client infrastructure and footnote adapter for consuming
external MCP servers via stdio transport. Jerry can now leverage
footnote's hybrid search (vector + FTS) when available.

Changes:
- Add @modelcontextprotocol/sdk dependency
- McpClient wrapper for stdio transport (connect, listTools, callTool)
- Footnote adapter: search_hybrid, search_fts, search_literal, read_document
- McpServerConfig type in privacy profile
- mcp-config.ts for resolving MCP servers from profile/env
- createJerryTools accepts optional mcpTools for merging
- Agent instructions updated with MCP tool descriptions
- Unit tests for MCP client and footnote adapter

Gracefully falls back to in-process search_memory when MCP unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
SarkarShubhdeep and others added 3 commits July 9, 2026 12:56
Export McpServerConfig, fix MCP test strictness and type errors so CI
passes. Bump vendor/cloud for SSE tool streaming and --verbose CLI.
Update phase-2.md Slice 2 checklist to reflect PR #6 and remaining gaps.

Co-authored-by: Cursor <cursoragent@cursor.com>
Spawn footnote MCP on session requests, merge search tools with
search_memory fallback, and record manual acceptance on PR #6.

Co-authored-by: Cursor <cursoragent@cursor.com>
PR #6 pointed vendor/cloud at local-only commit 63e0642, which GitHub
Actions cannot fetch. Revert to ecb8aa7 (development / cloud PR #1 tip
used by Jerry) so submodule checkout succeeds.

Co-authored-by: Cursor <cursoragent@cursor.com>
@SarkarShubhdeep
SarkarShubhdeep merged commit 30854ed into development Jul 13, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Review to Done in Scrum Team Jerry Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant