Setup

Two parts: the SDK sends errors from your app, and the MCP server lets your coding agent read and resolve them. Prefer to delegate? Tell your agent: Read https://runheed.com/SETUP.txt and set up error tracking.

1. Create a project

Quickest: tell your coding agent to read https://runheed.com/SETUP.txt; it connects, creates the project itself and puts the DSN in your app. By hand: sign in, choose a plan, then create a project under Projects. Copy its DSN. It looks like runheed://pk_...@runheed.com/<project-id>. Store it as the RUNHEED_DSN environment variable.

2. Add the SDK

Node.js and TypeScript

terminalbash
npm install https://runheed.com/dl/runheed-0.1.7.tgz

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.

Next.js uses instrumentation.ts instead: setup for Next.js. Serverless functions need await runheed.flush() before they return: setup by stack.

instrument.tstypescript
import runheed, { expressErrorHandler } from 'runheed';

runheed.init({
  dsn: process.env.RUNHEED_DSN,
  environment: process.env.NODE_ENV,
  release: process.env.GIT_SHA,
});

// Optional: which agent wrote and deployed this code
runheed.setAgent({ name: 'claude-code', sessionId: process.env.AGENT_SESSION_ID });

// Express: add after your routes
app.use(expressErrorHandler());

// Anywhere else
try {
  await chargeCard(order);
} catch (err) {
  runheed.captureException(err as Error, { orderId: order.id });
  throw err;
}

Python

terminalbash
pip install https://runheed.com/dl/runheed-0.1.7-py3-none-any.whl
app.pypython
import os, runheed

runheed.init(dsn=os.environ["RUNHEED_DSN"])
runheed.set_agent(name="claude-code", session_id=os.environ.get("AGENT_SESSION_ID"))

try:
    process(order)
except Exception as e:
    runheed.capture_exception(e)
    raise

Errors inside request handlers need your framework's hook too: FastAPI, Django or Flask. Django, Flask and FastAPI don't read .env on their own, so set RUNHEED_DSN in the environment or load the file.

Any language: HTTP

terminalbash
curl -X POST https://runheed.com/api/ingest \
  -H "X-Runheed-Key: pk_..." -H "Content-Type: application/json" \
  -d '{"errorType":"TimeoutError","errorMessage":"payment API timed out","environment":"production"}'

Responses: 200 stored, 401 bad key, 402 no active plan, 429 monthly limit reached or more than 300 events a minute for the project.

3. Connect your agent

The MCP server runs at one URL. Add it to your client and sign in when it asks: no key to copy, and the app shows up under Connected apps in Settings, where you can disconnect it.

Remote MCP server URLtext
https://runheed.com/api/mcp

claude.ai and Claude Desktop: Connect from Claude's connector directory (or Customize > Connectors > Add custom connector). ChatGPT: install it from ChatGPT's plugin directory (or Plugins > + > Add custom MCP server, with OAuth). Cursor: {"mcpServers": {"runheed": {"url": "https://runheed.com/api/mcp"}}}. Claude Code:

terminalbash
claude mcp add --transport http runheed https://runheed.com/api/mcp

Or install the Claude Code plugin, which adds the server and the Runheed skill and signs you in on first use. The plugin, the skill and the MCP config for Cursor, Codex and Antigravity are public on GitHub: getrunheed/runheed-plugin.

Claude Codetext
/plugin marketplace add getrunheed/runheed-plugin
/plugin install runheed@runheed

Or run it locally with an agent key

For clients without remote servers, or when you would rather paste a key: create an agent key in Settings (it is shown once), then add the local server.

terminalbash
claude mcp add runheed --env RUNHEED_API_KEY=al_... -- npx -y https://runheed.com/dl/runheed-mcp-0.1.7.tgz
mcp.jsonjson
{
  "mcpServers": {
    "runheed": {
      "command": "npx",
      "args": [
        "-y",
        "https://runheed.com/dl/runheed-mcp-0.1.7.tgz"
      ],
      "env": {
        "RUNHEED_API_KEY": "al_..."
      }
    }
  }
}

Step-by-step pages for each client: every supported client. What each tool does: the MCP server.

Then ask your agent "what should I fix first?" It checks project health, which names the error with the most events and any error that came back after a fix. Or ask "fix the top unresolved error and resolve it with the commit hash".

MCP tools

runheed_search_errorsSearch errors by text, status, project or release (including only what a release introduced)
runheed_get_recentMost recent errors
runheed_get_errorFull details: stack trace (with links to your repo), breadcrumbs, agent context
runheed_get_error_contextEnvironment, user, agent, request and extra data
runheed_get_trendsCounts and top errors for 24h, 7d or 30d
runheed_get_project_health0 to 100 health score with recommendations
runheed_resolve_errorMark resolved with a comment, e.g. the fixing commit
runheed_ignore_error / runheed_unignore_errorSilence or restore an error (one, or up to 100 with errorIds)
runheed_list_projectsProjects in the workspace with their DSNs
runheed_create_projectCreate a project and get its DSN, so the agent can set up the SDK
runheed_send_test_eventSend one test error to a project to check events arrive
runheed_merge_errorsMerge duplicate errors into one, optionally grouping future variants by a message prefix

Command line

The runheed CLI gives you, and agents that can't use MCP (cloud coding tasks, CI jobs), the same tools in a terminal. It installs from Runheed itself as a single binary for macOS, Linux and Windows; nothing comes from a package registry.

terminalbash
curl -fsSL https://runheed.com/install.sh | sh
# Windows (PowerShell): irm https://runheed.com/install.ps1 | iex

runheed login                 # paste an agent key from Settings
runheed health                # what to fix first, likely noise, refused events
runheed recent
runheed error <id>
runheed resolve <id> <id> --note "fixed in 4c1e9a2"
runheed merge <target-id> <id...> --prefix "order "
runheed sourcemaps upload --project shop --release $GIT_SHA dist/assets/*.map

The installer checks each binary against https://runheed.com/cli/SHA256SUMS. The macOS builds are signed and notarized. runheed help lists every command.

Already using a Sentry SDK?

Keep it. Every project also has a Sentry SDK DSN (under Projects, and from runheed_list_projects), shaped https://<key>@runheed.com/<number>. Set it as the DSN in your existing Sentry.init() and errors go to Runheed instead, from any language Sentry has an SDK for (JavaScript, Python, Go, Ruby, PHP, Java, .NET, Rust and the rest). Tested with @sentry/node 11, sentry-sdk 2 (Python), sentry-go 0.50, sentry-ruby 7, sentry/sentry 4 (PHP), Sentry 7 for .NET, sentry-java 8 and @sentry/browser 11 in Chrome. Setup for Go, Ruby and Rails , PHP and Laravel , .NET , Java and Spring Boot and React and the browser.

  • Exceptions (with their chain), messages, stack frames with source context, breadcrumbs, user, request, tags, release and environment are kept.
  • Performance transactions, sessions, replays, profiles and attachments are accepted and dropped, so leave tracing off or at 0 to save bandwidth.
  • Events count against your plan like any other, and a custom fingerprint sets the grouping.
  • Browser errors from a minified bundle are mapped back to your source files, lines and functions when the bundle's sourceMappingURL (or a data: URI) is publicly reachable, so grouping also holds across deploys. Maps are fetched once per bundle and cached. If your maps aren't public, upload them from your build instead: curl -H "Authorization: Bearer al_..." -F project=<slug> -F release=$GIT_SHA -F file=@dist/assets/index-abc123.js.map https://runheed.com/api/sourcemaps (repeat -F file=@... per map; the release should match the one your SDK sends). To check a map by hand, paste a trace into the source map stack trace decoder.

Alerts, webhooks and source links

Each project sends an alert when an error is new or comes back after it was resolved: by email, to a Slack or Discord channel (paste an incoming webhook URL under Projects), and to your own URL as a signed webhook. Projects > Source code links each stack frame to its line on GitHub, GitLab or Bitbucket. A walkthrough: how to get an alert when your app throws an error.

A webhook is a POST with a JSON body (type is error.new, error.reopened or test) and a Runheed-Signature: t=<unix seconds>,v1=<hex> header. Check it with the project's signing secret:

import crypto from 'crypto';

// body: the raw request body as a string
function verify(body, header, secret) {
  const { t, v1 } = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const want = crypto.createHmac('sha256', secret).update(`${t}.${body}`).digest('hex');
  return v1?.length === want.length && crypto.timingSafeEqual(Buffer.from(v1), Buffer.from(want));
}

Limits and data

  • Events count per workspace per calendar month (UTC). You get an email at 80% and 100%.
  • Each project accepts up to 300 events a minute; extra events get a 429 with Retry-After.
  • History follows your plan (30, 90 or 180 days). The 100 newest full events are kept per grouped error; counts stay exact.
  • Authorization, cookie and API-key request headers are redacted on arrival.