Home
MCP Server

Connect OpenLens to your AI agent.

OpenLens exposes a remote MCP server so agents can onboard clients, run visibility scans, read every metric the dashboard shows, and manage projects on your behalf. One OAuth sign-in, no API keys to copy.

Quick reference

Server URLhttps://openlens.com/mcp
TransportStreamable HTTP
AuthOAuth 2.1 (browser flow)
stdio fallbacknpx -y mcp-remote https://openlens.com/mcp

Install in your client

Let your agent install itself.
Paste this prompt into Claude Code, Codex, Cursor, or any other agent that can run shell commands or edit files.

Claude.ai (Team or Enterprise)

Open claude.ai/customize/connectors and add OpenLens. It then appears in Claude.ai web, Claude Desktop, and Claude Code automatically.

Claude Desktop (Free or Pro)

From Claude Settings, Connectors, Add custom connector, enter https://openlens.com/mcp and connect.

Claude Code (API-key sign-in)

In your terminal, run:

bash
claude mcp add openlens --transport http https://openlens.com/mcp

Open Claude Code, run /mcp, pick openlens, and finish the browser sign-in.

ChatGPT (Developer Mode)

Turn on Settings, Connectors, Advanced, Developer Mode, then Add custom connector with URL https://openlens.com/mcp and Auth set to OAuth.

Cursor

One-click install: add OpenLens to Cursor. Or add it manually to ~/.cursor/mcp.json:

json
{
  "mcpServers": {
    "openlens": { "url": "https://openlens.com/mcp" }
  }
}

VS Code (Copilot Chat, agent mode)

Add to .vscode/mcp.json:

json
{
  "servers": {
    "openlens": { "type": "http", "url": "https://openlens.com/mcp" }
  }
}

Codex CLI

In your terminal, run:

bash
codex mcp add openlens --url https://openlens.com/mcp

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{
  "mcpServers": {
    "openlens": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://openlens.com/mcp"]
    }
  }
}

Zed

Add to ~/.config/zed/settings.json:

json
{
  "context_servers": {
    "openlens": {
      "source": "custom",
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://openlens.com/mcp"]
    }
  }
}

Any other MCP client

Point it at https://openlens.com/mcp if it supports streamable HTTP. Otherwise wrap it with the stdio shim:

bash
npx -y mcp-remote https://openlens.com/mcp

Verify it works

From any client:

“List my OpenLens projects.”

The agent should call list_projects and return at least one row.

Troubleshooting

  • Auth error or “needs client registration”: sign out of your client and reconnect. The OAuth handshake has to complete on first install.
  • Stale token: clear the mcp-remote cache with rm -rf ~/.mcp-auth/ and retry.
  • VS Code: “server failed to start”: Node 18+ has to be on PATH so the editor can spawn npx.
  • Anything else: email [email protected] with the client, version, and the exact error.