How do ApiKeys work with Cursor plugins (context7, exa, etc)

For some of the plugins available, I used to use the mcp servers which accepted an apikey e.g. context7 and exa

When installing these via plugins, they add their own new set of skills/mcp. Yet there seems to be no method to add the api/mcp key to these? This seems like it should be something within the UI

At ~/.<username>/.cursor/plugins/cache/<plugin_name>/<hash> we can find the mcp files and update them, but I assume that is not going to be stable (updates, etc)

Hey, you’re totally right. There’s no built-in UI right now to set env or API keys for MCP servers from marketplace plugins, and edits in ~/.cursor/plugins/cache/... will get overwritten when the plugin updates.

A stable workaround is to add the same MCP server manually in the global ~/.cursor/mcp.json and set the keys via env:

{
  "mcpServers": {
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"],
      "env": {
        "CONTEXT7_API_KEY": "your-key-here"
      }
    }
  }
}

Also disable the MCP server from the plugin in Settings > MCP so you don’t end up running two copies at the same time. Same idea for exa and others.

This was discussed here: Settings for plugins from cursor marketplace?

Proper secret support for plugin MCP is already on the radar as a feature request, but there’s no ETA yet. Let me know if the workaround doesn’t work for you.

1 Like