Support for Language Model Tools?

Does cursor currently support language model tools? Or the MCP API as they’ve built it?

I have an extension that I’d like to expose tools for.

Hey, thanks for the question.

Cursor doesn’t currently support the VS Code language model tools API vscode.lm.registerTool and related APIs. This has already been requested. See this thread for a detailed comparison: Missing MCP Extension API

There are two workarounds to expose tools from your extension:

  1. cursor.mcp.registerServer: a Cursor-specific extension API that lets you programmatically register an MCP server from your extension. It’s more complex than vscode.lm.registerTool since you’ll need to set up a local MCP server, but it works.

  2. Standard MCP config: you can package your tools as an MCP server that users configure via mcp.json or Cursor settings. Docs: Model Context Protocol (MCP) | Cursor Docs

I’ll pass this along to the team.

@deanrie does the first approach work if the MCP needs to access/share the process instance/memory of the extension? Also kinda a PITA for extension developers to have to manage two different implementations for exactly the same thing. This harms the ecosystem IMO.

If the MCP server is running as an in-process SSE server (Express inside the extension host), then yes, it will share memory with the extension because it’s running in the same Node.js process. But if you’re using the stdio transport, it’s a separate process, so you can’t have shared state.

About having two implementations, I totally agree, it’s inconvenient. The Radon IDE team already described this issue in detail here: Missing MCP Extension API. It’s basically the same feedback. vscode.lm.registerTool is way simpler and cleaner than the Express plus MCP workaround.

Hi, is there documentation for cursor.mcp.registerServer?