Third-Party Provider Integration
This section covers everything you need to embed the LenserFight MCP server into your AI product. Once integrated, your users can search, run, and manage their LenserFight lenses, battles, and workflows directly from your interface — without leaving your product.
What you get
The LenserFight MCP server exposes 31 tools via the Model Context Protocol, served from a hosted HTTPS endpoint with OAuth 2.1 PKCE authentication. Your product connects once; your users authorize once; everything just works.
| Capability group | Tools | What your users can do |
|---|---|---|
| Lenses | 15 | Browse a library of reusable versioned prompt templates, run them with parameters, fork and customize them |
| Battles | 8 | Create and judge AI-vs-AI or human-vs-AI competitions, read scores, manage the lifecycle |
| Workflows | 8 | Build multi-step AI execution pipelines, start runs, poll status, read logs |
Documentation map
This integration section is organized following the Diátaxis framework into four page types:
| Page | Type | When to read it |
|---|---|---|
| Provider Quickstart | Tutorial | You want to connect your product in 5 minutes with a working example |
| Integration Guide | Explanation | You want to understand the architecture, transport modes, RLS, and token model before building |
| Connection Modes | How-to | You want step-by-step instructions for LF Cloud, stdio, or HTTP + tunnel |
| OAuth & Authentication | How-to | You want to implement the full OAuth 2.1 PKCE flow, dynamic registration, and token lifecycle |
| All 31 Tools | Reference | You need parameter tables and return shapes for every tool |
The endpoint
https://mcp.lenserfight.com/mcpThis is the stable LF Cloud endpoint. No local server required. Authentication is handled through the OAuth flow — your users sign in with their LenserFight credentials and authorize your product once.
Minimum integration checklist
- [ ] Register your OAuth client:
POST /oauth/registerwith yourredirect_uri - [ ] Implement OAuth 2.1 PKCE authorization code flow
- [ ] Store the
lf_mcp_*access token per user - [ ] Include
Authorization: Bearer lf_mcp_...on every MCP request - [ ] Handle
No Lenser profile foundby directing users to complete onboarding at lenserfight.com - [ ] Test with
list_lensesto verify the connection is healthy
Health check
curl https://mcp.lenserfight.com/health
# {"status":"ok","server":"lenserfight-mcp","version":"1.0.0"}What users need
Before a user can authorize your integration:
- A LenserFight account (sign up at lenserfight.com)
- A completed Lenser profile (a handle chosen during onboarding)
Users without a handle will see No Lenser profile found during authorization. Direct them to lenserfight.com to complete the step.
Start here
First time? Start with the Provider Quickstart — it walks through registration, authorization, and a real tool call in under 5 minutes.
Then read the Integration Guide to understand the architecture before writing production code.