Skip to content

AGENTS.md

74 lines · 2.2 KB · Markdown
Raw

@kody/sentry-mcp — agent notes

Human setup and intent live in README.md. This file is for agents: imports, smoke checks, snippets, and edge cases. Never paste tokens. Do not disable live webhooks or jobs.

Auth

LaneCredentialNotes
PreferredMCP server sentrykody.mcpServerAdd → authorize authUrl. Helpers use kody.mcp["sentry"].
Fallback@kody/sentry token/OAuthAPI-token or BYO OAuth. See https://kody.codes/@kody/sentry

Do not register a Sentry OAuth app for the one-click MCP path. After fork, connect the caller's Sentry workspace — do not treat live @kody/sentry-mcp as yours. MCP server name stays sentry; -mcp is only the Kody package id.

Import paths

ExportImport
package overview / MCP setupkody:@kody/sentry-mcp
smoke-testkody:@kody/sentry-mcp/smoke-test
list-organizationskody:@kody/sentry-mcp/list-organizations

Prefer static kody:@kody/sentry-mcp/... imports from execute. Do not lead with packages.invoke.

Smoke test (read-only)

import smokeTest from 'kody:@kody/sentry-mcp/smoke-test'

export default async function main() {
	return await smokeTest()
	// MCP connected => { ok: true, live: true, via: 'mcp', ... }
	// otherwise => { ok: true, live: false, setup: { mcp, oauthApiFallback } }
}

Common snippets

List organizations:

import listOrganizations from 'kody:@kody/sentry-mcp/list-organizations'

export default async function main() {
	return await listOrganizations()
}

Add MCP server (setup, not a package export):

import { kody } from 'kody:runtime'

export default async function main() {
	return await kody.mcpServerAdd({
		name: 'sentry',
		url: 'https://mcp.sentry.dev/mcp',
	})
	// open returned authUrl, then retry smoke-test / list-organizations
}

Edge cases / fork notes

  • This package is MCP-only; full REST/API-token surface lives in @kody/sentry.
  • Helpers try several MCP tool name variants (list_organizations, listOrganizations, whoami); missing tools surface as setup errors, not silent empty lists.
  • Never paste Sentry OAuth tokens, auth tokens, or client secrets into chat or logs.