Phase 2 Slice 2: MCP Consume#6
Merged
Merged
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 withgraceful fallback to in-process search_memory when unavailable.
Changes
@modelcontextprotocol/sdkdependencyMcpClientstdio wrapper (packages/tools/src/mcp/client.ts)packages/tools/src/mcp/footnote-adapter.ts)mcp.servers[]config in privacy profile (packages/agent-runtime/src/types.ts)packages/jerry-app/src/mcp-config.ts)createJerryToolsoptionsNew Tools (via footnote MCP)
search_hybrid— Combined vector + full-text search for richer resultssearch_fts— Full-text keyword search with BM25 rankingsearch_literal— Exact string grep for finding specific phrasesread_document— Fetch complete document content by pathAcceptance Criteria
jerry search my notes about kubernetesinvokes footnotesearch_hybridvia MCPsearch_memoryDependencies
Testing
JERRY_INTEGRATION=mcp pnpm test)Notes
Made with Cursor