The Cursor AI documentation at https://cursor.com/docs/extension-api#plugin-paths mentions two Cursor API calls for managing custom agent plugin search paths, namely vscode.cursor.plugins.registerPath and vscode.cursor.plugins.unregisterPath. Neither exist.
Steps to Reproduce
Scaffold a basic vscode extension and inspect the vscode API handle while attached to it in the debugger in Cursor AI.
Expected Behavior
The path into the vscode API handle at vscode.cursor.plugins is expected to have two functions named registerPath and unregisterPath, as per the Cursor AI documentation. Neither exist.
I’m running Cursor AI on my Windows desktop but I’m intending to use the extension in a remote Linux dev environment. I’ve tried running an extension in both the Windows and Linux workspace and the problem exists in both.
Hey, thanks for the report and for digging into the real API via the debugger. This is a docs bug. The extension-api page really describes methods that don’t exist. The actual API is addPlugin / removePlugin, and it takes an object, not a string:
The type-stub block on the page is outdated too, it uses the same wrong names. So if you copied it into your project, replace it with the snippet above.
Thanks for that information. I did see those functions but didn’t mention them because I don’t want to add/remove specific plugins, which brings me to this statement in the same documentation:
Register additional plugin directories at runtime. Extensions can use this API to tell Cursor about plugin locations without requiring users to manually copy files to ~/.cursor/plugins/local/ .
I took this as meaning that an extension can add additional plugin search paths beyond Cursor’s ~/.cursor/plugins/local path. But maybe my interpretation is wrong.
For testing purposes I have this plugin directory structure:
The doc wording is genuinely confusing, and there are two separate things here.
addPlugin semantics. It’s for one plugin, not a source directory.
Even though the docs say things like register additional plugin directories and discovers and loads any valid plugins in this directory, the API actually expects the path to the root of a single plugin folder, meaning the folder that contains .cursor-plugin/plugin.json, not a parent folder that contains multiple plugins. You can see that in the signature too, PluginConfig { path: string }, and the name addPlugin is singular. So your second option, /home/node/my-plugins/my-plugin, is the correct usage. The first one, /home/node/my-plugins, won’t work and isn’t supposed to.
Skill discovery inside a plugin is the usual setup: .cursor-plugin/plugin.json plus skills/<name>/SKILL.md, like you have.
The skill not showing up in the UI is a known bug.
Skills added via addPlugin don’t show up in Rules, Skills, Subagents or in the / slash menu, even though the agent can still use them. You can verify this by asking the agent to explicitly use my-skill, it should pick up the SKILL.md file if the frontmatter is correct. MCP servers show up fine because they use a separate pipeline. This issue is being tracked, but I can’t share an ETA for the fix.
We’ll update the docs along with the naming fix, including the addPlugin description and the type stub block.