Getting started with Lenses MCP
Learn how to get started with Lenses MCP server.
Add Context7 MCP, while optional, it works alot better as you give the LLM MCP access to Lenses documentation
Clone the Repository
git clone [email protected]:lensesio/lenses-mcp.gitInstall uv and Python
You can skip this is you already have it.
If you don't have uv installed, follow the official installation guide.
Make sure you have the correct version of Python
uv run python --versionConfigure 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 here. 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 .envConfigure 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"
}
}
}Some clients may require the absolute path to uv in the command.
Context7
Lenses documentation is available on Context7. Use the Context7 MCP Server and adjust your prompts with use context7 to ensure the documentation available to the LLM is up to date.
Last updated
Was this helpful?

