Run with Docker
You can run Lenses MCP Server by cloning the source code, building a Docker image and running it as a remote MCP server (using the HTTP transport).
Run using Docker
Run using Docker by passing in configuration as environment variables for the default setup that uses OAuth for authentication and authorization. This example runs the MCP server using HTTP transport, available on port 8000 on the local machine. Set this in the MCP_ADVERTISED_URL variable:
docker run --rm -it --name lenses-mcp \
-p 8000:8000 \
-e TRANSPORT=http \
-e HOST=0.0.0.0 \
-e PORT=8000 \
-e OAUTH_ENABLED=True \
-e LENSES_URL=https://your-lenses.io \
-e LENSES_ADVERTISED_URL=https://your-publicly-available-lenses.io \
-e MCP_ADVERTISED_URL=http://localhost:8000 \
lenses-mcp:localAuthenticate with OAuth
Navigate to your AI tool's MCP server settings and connect to authenticate with the Lenses OAuth authorization server (visible to your AI tool's client and configured with LENSES_ADVERTISED_URL). Here is an example using Cursor.

This opens a web browser at LENSES_ADVERTISED_URL/oauth2/authorize and passes OAuth parameters. Log in with your username/password or SSO (example shown is the Community Edition screen).

The authorization server displays an OAuth consent screen. Set the read, write, and delete scopes.

After you complete this flow, your AI tool authenticates with Lenses MCP Server using the granted scopes.

Last updated
Was this helpful?

