circle-playInstall

This pages describes how to install the Lenses DevEx MCP Server.

circle-check
1

Get Lenses Community Edition

circle-check

To install follow the instructions herearrow-up-right.

2

Clone the Repository

git clone [email protected]:lensesio/lenses-mcp.git
3

Install uv and Python

You can skip this is you already have it.

If you don't have uv installed, follow the official installation guidearrow-up-right.

Make sure you have the correct version of Python

uv run python --version
circle-info

Requires Python 3.12

4

Configure access to Lenses

The MCP server uses a Lenses Service Account in the form of an environment variables. Login into Lenses and create a service account. Follow the instructions herearrow-up-right. Make sure you assign the service account to a group that has access.

The repo contains a sample .env , copy it and add an entry for LENSES_API_KEY with the value of your service account token.

cp .env.example .env
5

Install Dependencies & Run

Use uv to create a virtual environment, install the project dependencies in it and then run the MCP server with the FastMCP CLI using the default stdio transport.

uv sync
uv run src/lenses_mcp/server.py
6

Configure in your IDE

To run in Claude Desktop, Gemini CLI, Cursor, etc. use the following JSON configuration.

{
  "mcpServers": {
    "Lenses.io": {
      "command": "uv",
      "args": [
        "run",
        "--project", "<ABSOLUTE_PATH_TO_THIS_REPO>",
        "--with", "fastmcp",
        "fastmcp",
        "run",
        "<ABSOLUTE_PATH_TO_THIS_REPO>/src/lenses_mcp/server.py"
      ],
      "env": {
        "LENSES_API_KEY": "<YOUR_LENSES_API_KEY>"
      },
      "transport": "stdio"
    }
  }
}
circle-exclamation

7

Context7

Lenses documentation is available on Context7arrow-up-right. Use the Context7 MCP Serverarrow-up-right and adjust your prompts with use context7 to ensure the documentation available to the LLM is up to date.

Last updated

Was this helpful?