- Home
- MCP servers
- Lenses
Lenses
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"stereosky-lenses-mcp": {
"command": "uv",
"args": [
"run",
"fastmcp",
"run",
"src/lenses_mcp/server.py"
],
"env": {
"LENSES_API_KEY": "YOUR_API_KEY"
}
}
}
}You run an MCP server that connects to your Lenses instance to query and transform data from multiple Kafka clusters using SQL. This server lets you manage context, security, and access to Lenses APIs in a lightweight, self-contained way so your tools and assistants can fetch live data operations without a separate database.
How to use
You interact with the Lenses MCP server using an MCP client. Start the server locally, then point your MCP client at the local runtime or a remote MCP endpoint if you deploy it elsewhere. Use your client to explore, transform, and join topics from different clusters. The server uses your Lenses API key to access data and execute SQL-like queries against your Kafka topics.
How to install
Prerequisites you need before installation include Python 3.12 and the uv tool for dependency management and project setup.
Step by step commands you run to set up and start the MCP server are shown below in the exact sequence you should follow.
# 1) Verify Python version via uv
uv run python --version
# 2) Copy and configure environment variables
cp .env.example .env
# Edit the .env file to include your Lenses details and API key
# 3) Add your Lenses API key by creating an IAM Service Account and storing the key
# Open the .env file and set LENSES_API_KEY to your API key
# 4) Install dependencies and prepare the server
uv sync
# 5) Run the MCP server
uv run fastmcp run src/lenses_mcp/server.py
Additional sections
Configuration notes: set your Lenses instance details and API key in the environment file. The key is accessed by the MCP server to authorize requests to Lenses.
Security notes: treat your Lenses API key as a secret. Do not commit the .env file to version control and use appropriate access controls for the server process.
Troubleshooting tips: if the server fails to start, verify that uv is installed, the environment file is correctly populated, and the script path src/lenses_mcp/server.py exists. Ensure the Lenses API key is valid and has the necessary permissions.