Express and Node.js error tracking your coding agent can read
The Runheed Node SDK captures uncaught exceptions and unhandled rejections on its own. In Express, one error-handling middleware adds the request method and URL to each error. Your agent then reads them in Claude Code, Cursor or any MCP client.
Set it up
1.Install the SDK.
terminalbashnpm install https://runheed.com/dl/runheed-0.1.0.tgz2.Initialize it before your app code and add the handler after your routes.
server.tstypescriptimport express from 'express'; import runheed, { expressErrorHandler } from 'runheed'; runheed.init({ dsn: process.env.RUNHEED_DSN!, environment: process.env.NODE_ENV, release: process.env.GIT_SHA }); const app = express(); // ...your routes app.use(expressErrorHandler()); app.listen(3000);3.Connect your agent.
terminalbashclaude mcp add runheed -e RUNHEED_API_KEY=al_... -- npx -y https://runheed.com/dl/runheed-mcp-0.1.0.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.
What it catches
- Errors thrown in routes and middleware, with method and URL (secret headers redacted)
- Uncaught exceptions and unhandled promise rejections in the process
- Errors you report yourself with runheed.captureException(err, { anything: "useful" })
What it does not do
- Workers and queues need captureException in their own catch blocks
- No performance tracing: Runheed tracks errors only
Then ask your agent
> what broke in production since the last deploy? fix the top one and resolve it with the commit hash