OpenLens MCP + Claude Code: Integration Guide
Wire the OpenLens Model Context Protocol server into Claude Code with a single terminal command. After that, your CLI agent can kick off visibility scans, pull citations, and manage projects without leaving the shell.
TL;DR
| Server URL | https://openlens.com/mcp |
| Transport | Streamable HTTP |
| Auth | OAuth 2.1 (browser flow) |
| Install command | claude mcp add openlens ... |
Install
Run this in any shell where the claude CLI is on your path:
claude mcp add openlens --transport http https://openlens.com/mcpThere is no config file to edit. Claude Code stores the server entry in its own state. To remove later, run claude mcp remove openlens.
Complete OAuth
Inside Claude Code, type:
/mcpPick openlens from the list. Claude Code opens a browser tab for the Clerk OAuth handshake. Sign in and approve. The token is cached and reused on every subsequent tool call.
Verify it works
In any Claude Code session, ask:
“List my OpenLens projects.”
The agent should call list_projects and return at least one row. If nothing comes back, see Troubleshooting below.
What you can do once connected
The OpenLens MCP server exposes ~40 tools across project setup, brands, topics, prompts, runs, visibility analytics, citations, workstreams, and scheduling. From Claude Code you can ask:
- “Kick off a fresh run on every active platform for project Northwind, and tail the status until it finishes.”
- “Pull citations from the last 7 days for Northwind, group by domain, and write the top 20 to
citations.md.” - “Add three new topics under Northwind: pricing comparison, implementation time, security posture. Generate 5 prompts each.”
- “Compare this week's visibility against last week and flag any platform where share of voice dropped more than 5 points.”
Troubleshooting
- OAuth window never opens: close Claude Code, clear cached auth with
rm -rf ~/.mcp-auth/, run/mcpagain, and pick openlens. - Server shows as “disconnected”: confirm the entry is registered with
claude mcp list. Re-add if missing. - Anything else: email [email protected] with your Claude Code version and the exact error.