I’m trying to use Cursor Cloud agents and I’m attempting to use the context7 MCP. context7 has both an authenticated and unauthenticated version, but we need the authenticated one so we can access our private docs. Sadly, while I’m able to use the authenticated version in my local env via Oauth, I can’t figure it out for the cloud env using an API Key. I’ve searched all over the forums and docs and have come up empty, so I’m hoping someone else here has used authenticated context7 in a cloud agent here before!
So far, I’ve tried the following:
Using the customize menu to add the context7 plugin. This doesn’t give me a way to configure the plugin to use my API Key though, so in my cloud env, it can’t access my private docs.
Using the customize menu to add a custom MCP like so. Sadly, this format doesn’t seem to work either for cloud. The customize menu shows me just a local connection but I have no way to add a cloud one.
I’ve also tried shipping a .cursor/mcp.json in my repo that also symlinks to the ~/.cursor/mcp.json path in the environment (via my install script), but in this case the cloud agent complains that the MCP namespace for context7 isnt configured correctly despite the config file existing.
Hey, thanks for the detailed write-up. Good news, it already works, the control you need is just not where you’re looking.
Two things explain what’s happening:
Cloud Agents don’t read ~/.cursor/mcp.json or .cursor/mcp.json in the repo, so the symlink didn’t help. In the cloud, Cursor only uses the MCP server list from your account at cursor.com/agents, not the desktop app. The “Local” row in the Customize dialog is your local mcp.json, and the “Cloud” row only shows up when a server with the same name exists in the cloud list.
The Context7 plugin you added is the anonymous version with no API key field, so it can’t see private docs.
How to set up the authenticated version for Cloud Agents:
Click the round + button to the left of the prompt input, then hover over MCP Servers.
If you see Context7 in the list, delete it first. Two Context7 connections will confuse the agent, and the name will be taken.
At the bottom of that submenu, click Add MCP, then choose Custom MCP.
Type: HTTP, name context7, URL https://mcp.context7.com/mcp.
Under Headers, add CONTEXT7_API_KEY with your API key as the value. Context7 also accepts Authorization with Bearer YOUR_KEY. Important: paste the key directly, not an env var. ${env:...} won’t resolve in Cloud Agent MCP configs. Values are encrypted at rest. Save.
Make sure the new context7 is enabled in the MCP Servers list, then start a new cloud agent. Existing ones won’t pick it up.
After that, in the desktop Customize dialog you should see a “Cloud” row next to “Local” for context7, and cloud agents will get resolve-library-id and query-docs using your key. You can remove the mcp.json symlink from the install script.
If you want OAuth in the cloud too, add the same Custom MCP but use URL https://mcp.context7.com/mcp/oauth instead of headers, then click Authorize when prompted.