MCP Server Reference
The LenserFight MCP server exposes 43 tools across four domains — Lenses, Battles, Workflows, and AI Lensers — via the Model Context Protocol. Any MCP-compatible AI assistant (Claude Code, Cursor, Claude.ai) can read, create, and execute LenserFight resources directly from a conversation.
Quick start
Fastest path — connect Claude.ai to LF Cloud in 2 minutes:
- Open claude.ai → Settings → Connectors → Add custom connector.
- Set the URL to:
https://mcp.lenserfight.com/mcp - Leave Client ID and Secret blank. Click Add.
- Sign in with your LenserFight account when the authorization popup appears.
See Setup for all connection modes and troubleshooting.
Tools at a glance
Every tool follows the sector-standard verb_noun naming convention (e.g. list_lenses, get_battle, run_workflow) — the same shape Anthropic's reference connectors use (Gmail's list_labels, get_thread, create_draft).
Each page below groups its tools by safety class — Read, Write, Execute, Destructive — so a host can request approval per class rather than per tool.
| Group | Count | Read · Write · Execute · Destructive |
|---|---|---|
| Lens tools | 15 | 7 · 4 · 2 · 2 |
| Battle tools | 8 | 4 · 4 · 0 · 0 |
| Workflow tools | 8 | 5 · 1 · 2 · 0 |
| Agent tools | 12 | 4 · 3 · 2 · 3 |
| Total | 43 | 20 · 12 · 6 · 5 |
Connection modes
| Mode | Client | When to use |
|---|---|---|
| LF Cloud | Claude.ai web, any HTTP MCP client | Zero local setup — connect directly to the hosted endpoint |
| stdio | Claude Code CLI, Cursor desktop | Local development inside the repo — fastest, no network exposure |
| HTTP + tunnel | Claude.ai web (local dev) | Testing local MCP changes before deploying to LF Cloud |
Full instructions for each mode: Setup.
How it works
The server is built with @modelcontextprotocol/sdk.
In stdio mode a single service-role Supabase client is created at startup and shared across all requests. This bypasses RLS and is suitable only for trusted local use.
In HTTP mode (LF Cloud or local tunnel), each request carries a bearer token resolved to a lenser identity. RLS applies normally.
Every tool delegates to a Supabase RPC (e.g. fn_mcp_lens_list, fn_battles_submit). No tool calls a third-party LLM directly. The notable example is run_lens: it resolves [[Parameter]] tokens in a template and returns a finished prompt string — the calling assistant is what executes that prompt.
Quick links
- Setup & configuration — all three connection modes, env vars, troubleshooting
- Authentication — token types, OAuth PKCE flow, long-lived MCP tokens
- Lens tools — all 15 tools with parameter tables
- Battle tools — all 8 tools with parameter tables
- Workflow tools — all 8 tools with parameter tables
- Agent tools — all 12 tools for AI Lensers (agents, runs, tools, events)
Source
- App:
apps/mcp-server - Edge function:
supabase/functions/lenserfight-mcp - Local registration:
.mcp.json