While using a certain extension, I noticed it has the ability to register an MCP server directly into Cursor. On top of that, it can copy node UI elements from the extension and paste them straight into the Cursor input box, which then renders them as a “Pill Block.”
After doing some digging and asking an AI, I found out that:
To register the MCP into Cursor, the extension is likely utilizing the docs/extension-api API.
The link-style rendering in the input box relies on the clipboard’s application/x-lexical-editor format, carrying a command like: @Use Pencil mcp tools.Current file file:///c%3A/Users/.......
Honestly, this blew my mind. I have no idea how these extension developers managed to uncover these hidden or unexposed Cursor endpoints/APIs. Or maybe they are public, and I just completely missed the official developer documentation?
This is probably all inherited from the VSCode Extension API, like the ability to [register MCP servers](MCP developer guide | Visual Studio Code Extension API. Not a secret, just something we get “for free” being based on VSCode.
Not sure what this is. Can you share a screenshot?
Hello, thank you for your reply. It’s indeed possible that I saw it in the VS Code documentation.
However, I also noticed that Cursor has similar documentation at Extension API reference | Cursor Docs
but the official site doesn’t provide an entry point for this link. I found it on another website after searching.
Here is a screenshot of the effect for the second question:
After installing the Pencil extension, I can see that its MCP server is already registered in the MCP servers list, but there is no corresponding configuration in mcp.json.
When I select a node on the design mockup it renders and copy it, then paste it into the chat input box, it displays as a link-style element (looks like it’s in Lexical format).
I’m just curious how these developers figured out that they could use these protocols to integrate their own products into Cursor so seamlessly, especially since these protocols aren’t mentioned on the official website.