feat: add MCP server for AI agent integration#1866
Open
basgcorp wants to merge 1 commit intosession-foundation:devfrom
Open
feat: add MCP server for AI agent integration#1866basgcorp wants to merge 1 commit intosession-foundation:devfrom
basgcorp wants to merge 1 commit intosession-foundation:devfrom
Conversation
- Add @modelcontextprotocol/sdk and human-signals dependencies - Create ts/mcp/ module with server, types, webhooks, renderer handlers - Add background mode support via --background flag and SESSION_MCP_BACKGROUND env - Hook message receive pipeline for webhook event notifications - Initialize MCP renderer handlers in preload.js - Add MCP IPC handler setup and server startup in main_node.ts - Add test files for MCP server, integration, and webhooks - Update version to 1.17.12-mcp
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.
Summary
ts/mcp/module with SSE-based MCP server, webhook manager, IPC handlers, and renderer bridge--background/SESSION_MCP_BACKGROUND=1) for headless operation@modelcontextprotocol/sdkdependencyDetails
New module
ts/mcp/:server.ts— HTTP+SSE MCP server with optional token auth, configurable viaSESSION_MCP_PORT,SESSION_MCP_HOST,SESSION_MCP_TOKENwebhookManager.ts— manages webhook subscriptions and dispatches message eventsmessageEventHook.ts— bridges message pipeline to MCP event systemrendererHandlers.ts— IPC handler initialization for renderer processtypes.ts— shared MCP types and IPC channel definitionsModified files:
ts/mains/main_node.ts— MCP server lifecycle, background mode, IPC setupts/receiver/queuedJob.ts— new message event hook for webhook dispatchpreload.js— MCP renderer handler initializationTest plan
test-mcp.mjs,test-mcp-integration.mjs,test-webhook.mjs