OpenLens MCP + VS Code: Integration Guide

Wire the OpenLens Model Context Protocol server into VS Code Copilot Chat (agent mode) with a single config file. Once connected, Copilot can run visibility scans, fetch citations, and manage OpenLens projects right next to your code.

TL;DR

Server URLhttps://openlens.com/mcp
TransportStreamable HTTP
AuthOAuth 2.1 (browser flow)
Config file.vscode/mcp.json

Add the server entry

In your project root, create or edit .vscode/mcp.json and paste:

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

For a global setup that follows you across every workspace, put the same block in your user-level MCP config via the command palette: MCP: Open User Configuration.

Reload the window

Open the command palette and run Developer: Reload Window. VS Code reads MCP configuration on startup, so the new server shows up only after reload.

Complete OAuth

Open Copilot Chat, switch to agent mode, and invoke any OpenLens tool. VS Code opens a browser tab for the Clerk OAuth handshake. Sign in with your OpenLens account and approve. The token is cached for future calls.

Verify it works

From Copilot Chat in agent mode, ask:

“List my OpenLens projects.”

The agent should call list_projects and return at least one row. If the call hangs, 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. Useful prompts from VS Code:

  • “Trigger a full multi-platform scan for project Beacon and poll until it finishes. Write the run id to .openlens/last-run.”
  • “Pull citations from the last 30 days for Beacon and generate a markdown table grouped by domain category.”
  • “Audit Beacon's topic coverage. Suggest any obvious buyer questions we don't have a prompt for yet.”
  • “Generate a Markdown brand health report for the current month and save it to reports/beacon-2025-11.md.”

Troubleshooting

  • Server not discovered: confirm .vscode/mcp.json is valid JSON and that you reloaded the window after editing it. VS Code does not hot-reload MCP config.
  • Tools not surfacing: verify you are in agent mode in Copilot Chat. Other modes do not load MCP tools.
  • OAuth error: sign out of VS Code accounts, remove the cached MCP auth with rm -rf ~/.mcp-auth/, and try again.
  • Anything else: email [email protected] with your VS Code and Copilot versions plus the exact error.

Related