lenseBLOCK
Lens: intelligence for your agent. Safe, secure and cost-effective. A self-hosted, cited knowledge graph and MCP server for your agents, from a Raspberry Pi to the cloud.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Safe, secure and cost-effective.
Connect your live data streams; Lens turns them into a cited knowledge graph your agent can reason over, through MCP, a REST API or its own assistant. It runs on your hardware with local models or any cloud model, private by default and cost-aware.
Install
curl -fsSL https://raw.githubusercontent.com/adeelahmad/lense/main/install.sh | sh
That one line is all: it opens an installer in your browser that checks the computer, then either installs with the defaults in one click (with a model server it finds on the computer) or asks how Lens should run (in Docker or a microsandbox microVM), the AI model and its key and any extras. Either way it installs what's missing (Docker included), starts Lens and opens its setup page (details). Run it again to update. On Windows, run irm https://raw.githubusercontent.com/adeelahmad/lense/main/install.ps1 | iex in PowerShell; or skip the terminal and double-click the launcher for your system from the latest release. Deployment covers servers and Cloudron; there are also packages for Synology, QNAP and Proxmox.
To work on the code instead, make run builds and runs everything from a checkout, make setup-code prints the first-admin setup code, and make dev runs it with hot reload; see Get started.
Why Lens
AI doesn't lack intelligence. It lacks structure. Lens gives your agent eyes. Without structure, every prompt is a guess about who you are and what happened. Lens sup
a9e4a99cd55aOBSERVED · 2026-10-10Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add lens --env ARCHIVE_SECRET_KEY=${ARCHIVE_SECRET_KEY} --env AUTH_URL=${AUTH_URL} --env GITHUB_TOKEN=${GITHUB_TOKEN} --env HF_TOKEN=${HF_TOKEN} -- npx -y lens{
"mcpServers": {
"lens": {
"command": "npx",
"args": [
"-y",
"lens"
],
"env": {
"ARCHIVE_SECRET_KEY": "${ARCHIVE_SECRET_KEY}",
"AUTH_URL": "${AUTH_URL}",
"GITHUB_TOKEN": "${GITHUB_TOKEN}",
"HF_TOKEN": "${HF_TOKEN}"
}
}
}
}Exposed tools (5)
5 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
Lens | read | Intelligence for your agent. Safe, secure and cost-effective. |
anthropic-agent-skills | read | Anthropic example skills |
document-skills | read | Documents |
document_skills | read | Documents |
pdf | read | PDF files |
Trust audit
BLOCKgrade F · trust 44/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | FAIL |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (4 observation(s))
- Network
- declared (6 observation(s))
- Shell
- declared (1 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
/.env" ... curl
_MARKS = re.compile("[--]")ignore previous instructions)"). `patterns` (the default) is free and kept narrow, so it misses rephrased attacks; `model` also
importlib.import_module(m)
"amber anchor apple arrow aspen basil beacon birch bramble breeze canyon cedar chalk cinder clover comet copper coral crane crystal dahlia delta ember fennel fern fjord flint forest garnet glacier gra
text = text.lstrip("").replace("\r\n", "\n").replace("\r", "\n")raw = (raw or "").lstrip("")text = (text or "").lstrip("")text = text.lstrip("")text = text.lstrip("")const TOKEN = "lih_edge-smoke-token";
TOKEN = "0123456789abcdef0123456789abcdef"
.pre-commit-config.docker.yaml
.pre-commit-config.yaml
.prettierignore
.prettierrc.json
docs/CHANGELOG.md
docs/README.md
key = hashlib.sha1(json.dumps([m.get("gateway"), m.get("channel"), m.get("account"), m.get("username")]).encode()).hexdigest()return hashlib.sha1(key(event).encode("utf-8")).hexdigest()[:16]return hashlib.sha1(path.encode()).hexdigest()
fp = "iiif-" + hashlib.sha1(f"{url}#{c['canvas']}".encode()).hexdigest()[:24]h = hashlib.sha1(str(size).encode())
run: npx --yes "$WEB_EXT" build --source-dir dist/firefox --artifacts-dir ../../dist/firefox --filename lens-clipper-firefox.zip --overwrite-dest
npx --yes "$WEB_EXT" sign --source-dir dist/firefox-selfhosted --artifacts-dir ../../dist/firefox/signed \
Gates applied: instruction_override, no_behavioural_pass.
a9e4a99cd55afull audit observations/trust-audit/mcp-server/adeelahmad__lense.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-10 | a9e4a99cd55a | BLOCK | F | 44 | first audit |
Questions
What is the lense MCP server?
Lens: intelligence for your agent. Safe, secure and cost-effective. A self-hosted, cited knowledge graph and MCP server for your agents, from a Raspberry Pi to the cloud.
What tools does lense expose?
5 in total: 5 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is lense safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (44/100) and found 3 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does lense need?
It reads ARCHIVE_SECRET_KEY, AUTH_URL, GITHUB_TOKEN, HF_TOKEN, LENS_INSTALLER_TOKEN, LENS_TEST_FEDORA_PASSWORD, LLAMA_ARG_API_KEY, NEXTAUTH_URL, SURREAL_PASS and TUNNEL_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does lense run?
It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as lens.
How current is this page?
The grade is for one exact copy of the source (a9e4a99cd55a), read on 2026-10-10. The repository is watched and re-audited when it changes.