AppSumoAppSumo Lifetime Deal starting at $39
Get the Deal Now!

Connecting AI Agents with MCP

Let an AI agent read submissions, inspect forms, and create leads through the LeadToSheet MCP server.

What the MCP server does

The Model Context Protocol endpoint gives agent clients a tool-based layer over the LeadToSheet REST API. It uses the same site-scoped bearer token, the same scopes, and the same validation rules as /api/v1.

Use it when an internal AI agent needs to answer questions like which leads came in today, inspect a form's sheet tab, or create a submission from another workflow.

Endpoint and authentication

Connect your MCP client to https://www.leadtosheet.com/api/mcp and send Authorization: Bearer lts_your_key_here. Create the key under Settings -> API for the site the agent should access.

Note

LeadToSheet publishes OAuth protected resource metadata at /.well-known/oauth-protected-resource/api/mcp. Invalid or missing tokens receive a WWW-Authenticate challenge that points clients to that metadata URL.

Choose the right scopes

  • submissions:read - list submissions and fetch one submission by ID
  • submissions:write - create submissions through the API ingestion path
  • forms:read - list forms and fetch one form by ID
  • forms:write - rename a form, update its sheet tab, or change ignored state

Tip

Start read-only for analysis agents. Add write scopes only when the agent is supposed to create leads or update form metadata.

Available tools

  • get_site - read site identity and usage
  • list_submissions - search and page through captured leads
  • get_submission - fetch one submission by ID
  • create_submission - create a lead with fields, attribution, and browser metadata
  • list_forms - list discovered forms for the site
  • get_form - fetch one form by ID
  • update_form - update a form name, sheet tab, or ignored state

Troubleshooting

  • 401 invalid_token usually means the bearer token is missing, malformed, revoked, or not an lts_ API key.
  • 403 insufficient_scope means the key is valid but does not include the scope required by the tool.
  • 406 from /api/mcp usually means the client did not send Accept: application/json, text/event-stream.