feat: add MCP server for AI agent integration#443
Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add MCP server functionality to the application
feat: add MCP server for AI agent integration
Jan 26, 2026
Owner
|
@copilot 实现方式可以进一步简化,前端无需注册,可以直接在electron中调用前端方法,可以参考 app.ts 里面的代码 |
Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Contributor
Author
Owner
|
@copilot 1. mcp部分实现太复杂,没有用到 modelcontextprotocol 的sdk |
…forMcp field Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Contributor
Author
已简化 MCP 实现并正确使用 SDK:
Changes in commit 8106b99 |
Copilot stopped work on behalf of
purocean due to an error
January 26, 2026 05:02
Copilot stopped work on behalf of
purocean due to an error
February 2, 2026 11:20
… descriptions Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Copilot
AI
changed the title
feat: add MCP server for AI agent integration
fix: MCP server RPC communication and type serialization
Feb 2, 2026
Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Copilot
AI
changed the title
fix: MCP server RPC communication and type serialization
fix: MCP server RPC communication and serialization
Feb 3, 2026
Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Co-authored-by: purocean <7115690+purocean@users.noreply.github.com>
Copilot
AI
changed the title
fix: MCP server RPC communication and serialization
feat: add MCP server for AI agent integration
Feb 3, 2026
Co-authored-by: purocean <7115690+purocean@users.noreply.github.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.
Implements Model Context Protocol (MCP) server to expose YankNote actions to AI agents like Claude Desktop via JSON-RPC over HTTP.
Configuration
mcp.enabled(dot notation for future extensibility:mcp.port,mcp.timeout, etc.)mcp-enabled(flat structure to avoid nesting issues)Backend
/api/mcp/messageusing@modelcontextprotocol/sdk@1.25.3withStreamableHTTPServerTransporthandleRequest(req, res, parsedBody)yn_list_actions: Returns actions whereforMcp: trueyn_execute_action: Executes action by name with argsFrontend
Actiontype:mcpDescription: AI-friendly parameter docs with inline TypeScript typesforMcp: Flag for MCP-specific actions (allows future MCP-only tools)executeAction(name, ...args)method that delegates togetActionHandler()internallyJSON.parse(JSON.stringify())to strip non-serializable propertiesRPC Architecture
Type Description Format
mcpDescription: 'Find text in repository. Args: [query?:{pattern?:string, caseSensitive?:boolean, wholeWord?:boolean, regExp?:boolean, include?:string, exclude?:string}]. No return.'Requires Node.js 22+ for MCP SDK compatibility.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.