How to connect Runheed to Lovable
Lovable connects any remote MCP server by URL on all plans. Add Runheed and Lovable can read your production errors, then one prompt adds error reporting to your Supabase Edge Functions.
Runheed is an error tracker with an MCP server: your app reports exceptions through a small SDK, and Lovable reads them through the server below.
Steps
- Open Connectors in Lovable, select Add custom in the top right and choose MCP server.
- Name it Runheed, enter the server URL below, keep OAuth and click Add & authorize.
- The first time it connects, a runheed.com sign-in page opens. Sign in with your email link, check the workspace and click Allow. The app then shows up in Settings > Agent keys under Connected apps, where Disconnect removes it.
- Create a project in Runheed and add the pk_... part of its DSN to your Supabase project as the secret RUNHEED_KEY. Then paste the prompt below into the Lovable chat so your app starts reporting errors.
Where the config lives: Connectors > Add custom > MCP server. Chat connectors are personal to you and are never part of your published app.
https://runheed.com/api/mcpAdd Runheed error reporting to every Supabase Edge Function, and use the Runheed MCP server (https://runheed.com/api/mcp) to check it worked.
Create supabase/functions/_shared/runheed.ts exporting withRunheed(handler). It wraps a Deno.serve handler in try/catch. When the handler throws, it POSTs JSON to https://runheed.com/api/ingest with the headers Content-Type: application/json and X-Runheed-Key set to Deno.env.get('RUNHEED_KEY'), and the body { errorType: err.name, errorMessage: err.message, platform: 'deno', environment: 'production', request: { method: req.method, url: req.url }, timestamp: new Date().toISOString() }, awaits that request inside its own try/catch so reporting can never break the function, and returns a JSON 500 response.
Wrap every function's handler with withRunheed. Do not hardcode the key. Then make one function throw once, confirm the error with runheed_get_recent, and remove the test code.The npm and PyPI releases are not out yet, so these commands install the same package files straight from runheed.com. Nothing else changes when the registry versions ship.
The reporting code is explained line by line at https://runheed.com/for/supabase-edge-functions.
Errors in the browser part of the app are not captured; there is no browser SDK yet.
Check that it works
In the Lovable chat: "Using the Runheed connector, list my newest unresolved errors and fix the top one."
If the agent reports a problem
Every Runheed tool error says what went wrong and where to fix it. The common ones:
- "Start a plan to connect" on the sign-in page
- Connecting needs an active plan. Pick one on that page, pay in Stripe Checkout, then connect again from the app.
- The app keeps asking you to sign in
- The app was disconnected in Settings (its key was revoked). Sign in again and click Allow.
- "RUNHEED_API_KEY is not set"
- The key is missing from the server env. Add it and restart the client.
- "That is a project key (pk_...)"
- You pasted the DSN key. The MCP server needs an agent key that starts with al_.
- "This agent key is not recognised"
- Typo, or the key was revoked. Create a new one in Settings; keys are shown once.
- "The workspace has no active plan"
- Choose a plan or fix the card in Settings > Billing. The key works again as soon as the plan is active.
- "No errors have been reported yet"
- The agent side works. Check that the app has RUNHEED_DSN set and calls runheed.init() at startup.
Questions
- Can Lovable read my production errors?
- Yes, once Runheed is connected. Lovable calls the MCP tools to list recent errors, search them, and read one in full with its stack trace, breadcrumbs, request and release, then answers in the chat.
- Do I need an API key to connect Lovable?
- No. Lovable connects to the remote server URL and you sign in to Runheed once (OAuth). An agent key is only needed if you use the local server instead.
- What can Lovable change in Runheed?
- Only an error's status: resolve (with a note such as the commit hash), ignore or unignore, and each can be flipped back. It cannot change projects, billing or keys, and Runheed has no access to your code or servers.
- Do I need a plan to connect?
- Yes, connecting needs an active plan. Plans start at $29/month for 50,000 events a month.
Next: the find, fix and resolve loop, and what Lovable can see.
Still need the SDK side? See the setup docs or setup by framework, or tell Lovable: Read https://runheed.com/SETUP.txt and set up error tracking. Official reference: Lovable custom MCP docs.
Other clients: claude.ai · ChatGPT · Claude Code · Cursor · Claude Desktop · VS Code · Windsurf · Codex CLI · Gemini CLI · Replit · Bolt · Antigravity · Zed · Cline