Support VS Code's "register Mcp Server Definition Provider" API

Feature request for product/service

Cursor IDE

Describe the request

VS Code has APIs that allow extensions to register MCP servers and tools (lm.registerMcpServerDefinitionProvider and lm.registerTool). These APIs are more flexible than only supporting them in a JSON file because:

  1. The extensions are only activated when certain criteria are met, so an extension like Dart can register the MCP server such that it’s only started when a Dart project is open. With mcp.json you either have to have it global (so it’ll be used even if you open Python projects, for example) or locally (which means duplicating in every project and raises questions about whether to commit)
  2. The servers can be dynamic based on the workspace. For example if you have multiple versions of the Dart/Flutter SDKs (because you may have different apps pinned to different versions), with the APIs the extension can register the MCP server from the correct version of the SDK being used within that workspace
  3. We don’t need to pick between using a command like “dart mcp-server” and hoping the user has dart on PATH, or hard-coding a full path that might change (or be incorrect in the case of multiple versions)

It would be nice if Cursor supported these APIs, so users of extensions that use them just get automatic registration like they do in VS Code.

Related issues:

PS. Your forum is difficult to use. Having registerMcpServerDefinitionProvider in the title caused the post to be rejected, and all of the text I posted except the first line was wiped. I’ve re-typed the above multiple times just while trying to post :pensive_face:

3 Likes

I second this request. The Robot Developer Extensions - ROS 2 & URDF (and new ones) leverage this API to register MCP servers for allowing AI to analyze running ROS graph or provide screenshots for self diagnostics.

The registerTool API is a signficant requirement for developing MCP servers without hosting a listening http server within each extension, or expecting users to install and configure a separate tool. I raised a similar feature request here: In-process MCP support (lm.registerTool)