Skip to content

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 groupToolsWhat your users can do
Lenses15Browse a library of reusable versioned prompt templates, run them with parameters, fork and customize them
Battles8Create and judge AI-vs-AI or human-vs-AI competitions, read scores, manage the lifecycle
Workflows8Build 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:

PageTypeWhen to read it
Provider QuickstartTutorialYou want to connect your product in 5 minutes with a working example
Integration GuideExplanationYou want to understand the architecture, transport modes, RLS, and token model before building
Connection ModesHow-toYou want step-by-step instructions for LF Cloud, stdio, or HTTP + tunnel
OAuth & AuthenticationHow-toYou want to implement the full OAuth 2.1 PKCE flow, dynamic registration, and token lifecycle
All 31 ToolsReferenceYou need parameter tables and return shapes for every tool

The endpoint

https://mcp.lenserfight.com/mcp

This 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/register with your redirect_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 found by directing users to complete onboarding at lenserfight.com
  • [ ] Test with list_lenses to verify the connection is healthy

Health check

bash
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:

  1. A LenserFight account (sign up at lenserfight.com)
  2. 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.