# MCP Is Not Good Yet — David Cramer, Sentry

David Cramer, Sentry

AI Engineer World's Fair 2025

[Talk page](https://ai.engineer/talks/FCi4jT86gSw-mcp-is-not-good-yet) · [Video](https://www.youtube.com/watch?v=FCi4jT86gSw)

## MCP Is Not Good Yet

Connecting an agent to an API is only the beginning. Sentry’s MCP implementation shows why useful integrations depend on curated context, reliable clients, and control over domain workflows.

Familiarity with APIs, OAuth, and agents that call tools will help; no prior MCP implementation experience is required.

### What does an MCP server actually provide?

[1:06](https://www.youtube.com/watch?v=FCi4jT86gSw&t=66s)

What is MCP supposed to give an agent? For David Cramer, who built [Sentry’s MCP server](https://mcp.sentry.dev/), the useful answer is a **pluggable architecture for agents**. Sentry collects application-monitoring data, including the bugs developers need to investigate. MCP provides a way to make that context available to agents outside Sentry. This is a B2B cloud-service perspective: local toolchains can have different requirements.

![Slide titled “MCP (n): Not an OpenAPI Server” defines MCP as a purpose-built adapter for known and unknown workflows inside agents, beside a welcome-desk illustration.](https://ai.engineer/api/talk-essay-media/9011d2a00a30efebca650018e61d6a2918a91a07367b2454f87fdbc5588859b6)

MCP as a purpose-built adapter for agent workflows.

### Bring the bugs into the editor

[2:25](https://www.youtube.com/watch?v=FCi4jT86gSw&t=145s)

Sentry knows what is broken; developers use editors such as Cursor to fix it. Connecting those two environments gives MCP a concrete job: bring bug context into the place where the repair happens. The pressure to become an AI company becomes a more useful product question when phrased this way: can the developer access Sentry’s evidence without leaving the editor?

![Diagram links a user to MCP and Sentry, with a Cursor window asking “What’s this error?” and a response saying “Here’s how to fix the issue.”](https://ai.engineer/api/talk-essay-media/c2fe3035a5f8d2c9a38471d7e334b8c4acd217fa956c1cbe2ee52daf6967812d)

An illustrated workflow connects the user, Cursor, MCP, and Sentry.

Cramer focused on the remote interface rather than a local process communicating over standard input and output, or `stdio`. In the trial he describes, VS Code Insiders provided usable OAuth support: connect Sentry’s MCP server, retrieve data through curated workflows, and let the editor’s agent use it. The client-support comparisons throughout this account describe his experience at the time of the recording, not a current compatibility matrix.

Preparing a screenshot the night before the talk, he connected the server in VS Code and asked it to fix all his bugs. Cramer reports roughly 20 Sentry API queries and an offhand estimated cost of $5 for that trial. The agent began attempting fixes, but he had not evaluated their quality. What the trial established for him was narrower and still useful: an outside service had supplied context inside the editor, where an agent could act on it.

### An existing API is a starting point

[5:00](https://www.youtube.com/watch?v=FCi4jT86gSw&t=300s)

At first, the integration looked straightforward. Sentry already had an API and its own OAuth provider, so much of the machinery appeared to exist. The friction came from adapting that implementation to the OAuth 2.1 and client-registration requirements of the protected remote flow. The historical [MCP authorization specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) made authorization optional at the protocol level; for a service exposing protected Sentry data, authentication was nevertheless essential.

Sentry used a Cloudflare Workers shim to put an MCP-facing OAuth and client-registration layer in front of its existing OAuth 2 API. That let Cramer reuse the service’s authentication infrastructure instead of replacing it. He recalls getting the initial implementation built in a couple of days, despite the compatibility work.

Authentication only gets the agent through the door. Behind it are API responses designed for other consumers: potentially enormous JSON payloads whose useful information is buried among unrelated fields. Mechanically turning every OpenAPI endpoint into a tool leaves the agent to discover the workflow and interpret all that data itself.

**An MCP tool interface needs its own design.** Start with how an agent will use the service, observe how it responds to the context supplied, and shape the interface around that behavior. The implementation can call an existing API underneath, but the agent-facing tools need not mirror its endpoints or return its responses unchanged.

### The host client remains part of the system

[7:02](https://www.youtube.com/watch?v=FCi4jT86gSw&t=422s)

Even a carefully designed server depends on its consuming clients. Cramer encountered uneven native authentication and frequent breakage: VS Code had become relatively stable in his use, while Cursor had broken more often. Claude had support, but Claude Code’s support was uncertain in his experience. Developer tools seemed further along than other enterprise agents, yet the underlying constraint remained: a plugin is only useful when its host can load and operate it reliably.

For a B2B SaaS integration, his recommendation is to prioritize a **remote MCP server with OAuth**. The reasons are familiar cloud-service reasons: the provider can deploy improvements, iterate quickly, and adjust security centrally. A product tied to a local device is a meaningful exception; a hosted service bringing bugs into Cursor usually is not.

Remote hosting does not remove the need to trust the tools an organization installs. Cramer warns about prompt injection and the risks of downloading arbitrary MCP packages, particularly in local environments. His practical boundary is to use providers that have earned trust, rather than treating the existence of an MCP integration as a security endorsement.

Native OAuth also changes setup from a package-installation exercise into a URL-based connection. Cramer reported Claude Desktop and VS Code Insiders support, expected Cursor support shortly, and remained unsure about Claude Code. Sentry initially used [`mcp-remote`](https://github.com/punkpeye/mcp-remote), a bridge between local clients and remote servers. It helped ship the integration, but he found the experience rough compared with a client that accepts an MCP URL and handles authentication itself.

![Slide recommends OAuth, contrasts stdio with cloud-based APIs, lists client support and mcp-remote, and shows an MCP Inspector access request with Cancel and Approve buttons.](https://ai.engineer/api/talk-essay-media/fc2cc10037f200bbfdfe75aa7397a451d622a8a73fa7b4be101d19fea6ec4445)

“OAuth, only OAuth” pairs security guidance with a Sentry MCP authorization screen.

### Design results, descriptions, and errors as context

[9:47](https://www.youtube.com/watch?v=FCi4jT86gSw&t=587s)

Sentry’s response to the payload problem was to translate selected API responses into Markdown. For a bug lookup, that meant selecting the bare essentials and arranging them in a structure a human could follow. The selection matters as much as the format: converting an indiscriminate JSON dump into an equally indiscriminate Markdown document would not accomplish the same thing.

Cramer explicitly calls the Markdown preference unscientific. It is a practical choice from his implementation, not evidence that Markdown universally outperforms JSON. The broader constraint is that a third-party server does not choose the consuming model, control its task, or know what else occupies its context. Its responses need to remain useful under those unknown conditions.

Context begins before a tool returns anything. A tool description helps the agent decide whether to call it, when to call it, and why to choose it over a neighboring tool. Those descriptions also consume tokens, so adding more explanation creates its own limits. Errors belong to the same interface: they are information the agent must use to decide what happens next.

The bug-fixing trial shows the limits of descriptions alone. The agent queried every Sentry organization Cramer could access. He reports approximately 20 calls where he expected one. Even with contextual guidance, it did not infer the intended scope of the task.

When an argument is invalid, return an explanation a human could use to correct it. A conventional API client may contain explicit recovery logic for known error codes; an unknown agent is reasoning from the response it receives. An error that explains what was invalid gives it a better basis for recovery than an opaque failure.

### The consumer pays for unnecessary context

[12:06](https://www.youtube.com/watch?v=FCi4jT86gSw&t=726s)

A server that returns everything also passes the cost of interpreting everything to the consumer. Cramer illustrates the risk with a hypothetical tool call whose token burden raises its cost from $1 to $10; this is an example, not a measured result. Payload design therefore affects both whether the agent can use a response and what the user pays for that attempt.

Size can cause outright failure as well. Cramer encountered limits involving tool tokens or description length, although he could not identify whether VS Code or OpenAI imposed them, or whether they still applied. This makes an MCP server an ongoing product responsibility: Sentry was still adjusting its implementation weekly, observing behavior and revising it rather than treating the first working connection as completion.

### Own the workflow behind the tool

[12:57](https://www.youtube.com/watch?v=FCi4jT86gSw&t=777s)

These constraints lead to Cramer’s larger recommendation: **build agents and expose them through MCP**. MCP supplies the plugin interface; a provider-owned agent supplies the service behavior. That architecture lets the company with domain knowledge perform the work instead of asking an unfamiliar client agent to reconstruct the entire workflow.

Sentry had begun doing this, but long-running work exposed another limitation: its integration could not stream partial tool results back as the work progressed. Cramer uses agent-to-agent here in the general sense of one agent invoking another service’s agent, not Google’s named protocol.

Owning the inner agent changes who can influence the outcome:

| Decision | Independent tools consumed by an outside agent | Provider-owned agent exposed through MCP |
|---|---|---|
| Prompt and model | Chosen by the consumer | Chosen by the provider |
| Call sequence | Orchestrated outside the service | Coordinated inside the service |
| Returned result | Individual tool outputs | Consolidated workflow result |
| Inner agent cost | Borne by the consumer | Assumed by the provider |

The provider can make several internal calls, control their prompts, and package the results into one response. In exchange for paying for that agent, it gains greater responsibility for success and failure. That is Cramer’s bet for where B2B services can add value through MCP.

![Slide titled “4. Build the Agent” recommends exposing agents instead of dumb tools, asks “Who controls your uptime?”, and describes Sentry’s bet on MCP for B2B.](https://ai.engineer/api/talk-essay-media/5a445db89573c818ebe7eab05202ba27b62038552b3f2d962fba9cb25634f875)

“Build the Agent”: expose agents instead of dumb tools.

### Seer makes the asynchronous problem concrete

[13:59](https://www.youtube.com/watch?v=FCi4jT86gSw&t=839s)

Sentry’s example is **Seer**, an agent that uses application-failure data to perform root-cause analysis. Cramer describes its analysis as high quality, without supplying a benchmark. The results were exposed primarily through Sentry’s UI and also through MCP. The MCP path required the consuming agent to manage a sequence:

1. Start the analysis job.
2. Check whether the job has finished.
3. Continue checking until a result becomes available.

The failure was not necessarily inside the analysis itself: the consuming agent could give up while waiting. Starting useful work and successfully delivering its result are separate obligations.

This is a limitation of the described tool-result workflow, not a claim that MCP lacked streaming transport. The historical [transport specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports) already supported HTTP with optional SSE; transport streaming does not itself provide incremental analysis results. It also did not require WebSockets, a distinction relevant to Cramer’s deployment account below.

The promise is that a client can request domain work without implementing the domain agent itself. Cramer also points to the [Sentry MCP repository](https://github.com/getsentry/sentry-mcp), correcting his initial description of its availability from open source to **Fair Source**. That qualification matters: access to the code should not be read as an unrestricted open-source license.

### Build the integration, then keep improving the workflow

[15:02](https://www.youtube.com/watch?v=FCi4jT86gSw&t=902s)

Cramer recalls building the initial integration in two days; that was a starting point, not a claim of production maturity. His closing analogies make the work approachable: MCP resembles a plugin architecture, agents resemble services, and many tools are API calls with adapted response formats. Familiar software-engineering responsibilities remain beneath the new vocabulary.

Cloudflare reduced the infrastructure work. Sentry had not used it before this project, according to Cramer, but Workers and its OAuth proxy let the team put the necessary layer in place quickly. He also notes that Sentry did not operate WebSocket infrastructure; adopting hosted connection-handling infrastructure helped them avoid building that operational capability themselves.

An accessible first implementation can still be buggy and require sustained iteration. The useful direction is to keep building through those integration problems while concentrating on workflows the provider understands: use the service’s data, own the agent behavior where it matters, and supply the context that lets the surrounding system accomplish the user’s task.

## Resources

- [Sentry MCP source](https://github.com/getsentry/sentry-mcp) — Source and setup instructions for Sentry's MCP integration with coding assistants.
- [Connect to Sentry MCP](https://mcp.sentry.dev/) — Public entry point for connecting an AI assistant to Sentry's application context.
- [Cloudflare's remote MCP architecture](https://blog.cloudflare.com/remote-model-context-protocol-servers-mcp/) — Explains the Workers authorization provider and remote MCP infrastructure.
- [mcp-remote](https://github.com/punkpeye/mcp-remote) — A bridge connecting local stdio MCP clients to remote servers with authorization.
- [MCP transports: March 2025 specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports) — Historical definitions of stdio, Streamable HTTP and SSE transport behavior.
- [MCP authorization: March 2025 specification](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) — The historical OAuth requirements underlying early remote MCP integrations.
- [MCP tool definitions and errors](https://modelcontextprotocol.io/specification/2025-03-26/server/tools) — Defines tool descriptions, input schemas, result content and error reporting.
- [VS Code's June 2025 MCP update](https://code.visualstudio.com/blogs/2025/06/12/full-mcp-spec-support) — Microsoft's dated account of authorization and broader MCP support in VS Code.
- [Experimental MCP tasks in the November 2025 specification](https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks) — A later protocol mechanism for long-running operations, status polling and deferred results.

## Slides

### MCP is not good (yet)

Sentry founder David Cramer introduces his take on MCP, alongside an illustration of a fly swatter over warning symbols.

[0:27](https://www.youtube.com/watch?v=FCi4jT86gSw&t=27s) [Title slide for David Cramer's Sentry talk, with a colorful illustration of a fly swatter.](https://assets.ai.engineer/sites/aiecode2025/sha256/f3857075f1ec616213fd0c46d7eeb6182acfe6c7af6adc514e366f2661c6d092.webp)

MCP is not good
(yet)

David Cramer
Founder, Sentry
@zeeg

SENTRY

### Disclaimer: This is all common sense

Cramer calls the subject uncomplicated despite the “big scary words” and expects some listeners may already understand it.

[0:30](https://www.youtube.com/watch?v=FCi4jT86gSw&t=30s) [White disclaimer text centered on a purple patterned background.](https://assets.ai.engineer/sites/aiecode2025/sha256/f08cbfa9008a0e66af3dc0e69ddd4416385f7d5c70a383dc3551c115a1f28f3c.webp)

Disclaimer:
This is all common sense

### MCP: Not an OpenAPI Server

Cramer frames MCP as a purpose-built adapter for known and unknown agent workflows, drawing on his experience building Sentry’s MCP server for an enterprise cloud service.

[1:05](https://www.youtube.com/watch?v=FCi4jT86gSw&t=65s) [Slide describes MCP as a purpose-built adapter for known and unknown workflows inside agents, alongside an illustration.](https://assets.ai.engineer/sites/aiecode2025/sha256/13b96454ddbefb55b2665fb66d9e95e6d50126a8ce0e306ab264f904ff3eb6c4.webp)

MCP (n): Not an OpenAPI Server

What MCP means to us:

A purpose-built adapter. Primarily designed to enable known and unknown workflows inside of agents.

WELCOME

Graphite

### Sentry and Cursor workflow

Cramer imagines bringing Sentry bugs into Cursor through MCP, so a user can ask about an error and get guidance in their editor.

[2:23](https://www.youtube.com/watch?v=FCi4jT86gSw&t=143s) [Diagram connects a user, MCP, Sentry and Cursor to illustrate asking about an error and receiving a fix.](https://assets.ai.engineer/sites/aiecode2025/sha256/cd2b7dfe946782e2a9f8d7b03aa28a658dbba5e8d5eaff674980ba33dc56e856.webp)

USER
MCP
Sentry
Cursor
What’s this error?
Here’s how to fix the issue

Interface text:
Graphite

[2:27](https://www.youtube.com/watch?v=FCi4jT86gSw&t=147s) [Diagram showing a user asking about an error in Cursor and receiving a suggested fix using Sentry through MCP.](https://assets.ai.engineer/sites/aiecode2025/sha256/dd7172837af0978a15615b366532d44e0a36118bba243af586cda6120fb8e2da.webp)

USER
MCP
Sentry
Cursor
What’s this error?
Here’s how to fix the issue

### The AI Mandate

Cramer frames interest in MCP around an AI mandate and the question of how to get involved.

[3:08](https://www.youtube.com/watch?v=FCi4jT86gSw&t=188s) [Slide titled The AI Mandate, with the question: Why do you even care about MCP?](https://assets.ai.engineer/sites/aiecode2025/sha256/5341c95efb8c8c51c124a8523c0d072cc33917a33623dd3d7a39d64388b86a1d.webp)

The AI Mandate
Why do you even care about MCP?

Interface text:
AIE
AI Engineer World’s Fair
vellum
PRESENTED BY
Microsoft
aws
smol ai

### Querying Sentry from VS Code

Copilot uses Sentry’s MCP server to find the project, search its issues and inspect details before reading the code, bringing Sentry context into the editor.

[3:20](https://www.youtube.com/watch?v=FCi4jT86gSw&t=200s) [VS Code Insiders shows Copilot querying Sentry for project issues and inspecting issue details.](https://assets.ai.engineer/sites/aiecode2025/sha256/da174f149f0c5e8bf7fdc810fe74ba2d773401127beeb51fa13342126aaf845c.webp)

Can you fix all my bugs for me?

Query sentry for the sentry/mcp-server project and find the bugs that you can fix, and get to work!

GitHub Copilot

I'll help you find and fix bugs in your Sentry MCP server project! Let me start by querying Sentry to find issues in your project.

Ran find_organizations – sentry (MCP Server)

Now let me check the sentry organization for projects related to MCP server:

Ran find_projects – sentry (MCP Server)

Perfect! I found the mcp-server project. Now let me search for issues in this project:

Ran find_issues – sentry (MCP Server)

Great! I found many issues in your MCP server project. Let me examine some of the most critical and frequent ones to understand what can be fixed. I'll start by looking at the details of a few key issues:

Ran get_issue_details – sentry (MCP Server)
Ran get_issue_details – sentry (MCP Server)
Ran get_issue_details – sentry (MCP Server)

Now let me examine the codebase to understand the structure and identify the problematic code:

Read src

Let me check the main entry point and the issue-related code:

Read index.ts, lines 1 to 50

Interface text:
Visual Studio Code - Insiders
Editing evolved

Start
New File...
Open File...
Open Folder...
Clone Git Repository...
Connect to...
New Workspace with Copilot...

Recent
sentry-mcp  \\wsl.localhost\Ubuntu\home\dcra...

Walkthroughs
Get started with VS Code
Customize your editor, learn the basics, and start coding
Get Started with WSL  New
GitHub Copilot  New
Learn the Fundamentals

AIE
AI Engineer World's Fair
PRESENTED BY
vellum
Microsoft
aws
smol ai

### Reviewing proposed fixes

Copilot proposes URL validation and other fixes using Sentry context in VS Code. Cramer says he does not know whether the fixes are good.

[4:27](https://www.youtube.com/watch?v=FCi4jT86gSw&t=267s) [VS Code shows a code diff for URL validation alongside Copilot's discussion of several issues.](https://assets.ai.engineer/sites/aiecode2025/sha256/7ad2c162e23694fda27dbe23a84df12db6d6f1c38a6cb6de759764547fd9809b.webp)

/**
 * Extracts the Sentry issue ID and organization slug from a full URL
 *
 * @param url - A full Sentry issue URL
 * @returns Object containing the numeric issue ID and organization slug (if fo[illegible]
 * @throws Error if the input is invalid
 */
export function extractIssueId(url: string): {
  issueId: string;
  organizationSlug: string;
} {
  if (!url || typeof url !== 'string') {
    throw new Error(
      "Invalid Sentry issue URL. URL must be a non-empty string.",
    );
  }

  if (!url.startsWith("http://") && !url.startsWith("https://")) {
    throw new Error(
      "Invalid Sentry issue URL. Must start with http:// or https://",
    );
  }

  const parsedUrl = new URL(url); [deleted]
  let parsedUrl: URL;
  try {
    parsedUrl = new URL(url);
  } catch (error) {
    throw new Error(
      `Invalid Sentry issue URL. Unable to parse URL: ${url}`,
    );
  }

  const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
  if (pathParts.length < 2 || !pathParts.includes("issues")) {
    throw new Error(
      "Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'",
    );
  }

  const issueId = pathParts[pathParts.indexOf("issues") + 1];
  if (!issueId) {
    throw new Error("Unable to determine issue ID from URL.");
  }

  // Extract organization slug from either the path or subdomain

Chat:
client.ts +0 -20
Let me fix this by updating the fetch call:
client.ts +8 -1

3. Fix: Invalid URL string errors (Issue: MCP-SERVER-E1S, MCP-SERVER-E3G)
Let me check where URL constructors are being used that might fail:
Searched text for new URL (**/packages/mcp-server/src/**/*.ts), 10 results
Let me fix the issue in the tools.ts where regionUrl might be invalid:
tools.ts +11 -1
Also, let me improve the URL validation in the issue helpers:
issue-helpers.ts +14 -1

4. Fix: OAuth token exchange issues (Issues: MCP-SERVER-DR8, MCP-SERVER-DZJ)
Let me check the OAuth implementation more carefully:
Read oauth.ts, lines 80 to 143
The OAuth error shows {"error":"invalid_grant"} which suggests the authorization code might be expired or invalid. Let me check where the OAuth callback is handled:
Searched text for oauth/callback (**/packages/mcp-cloudflare/src/**/*.ts), 1 result
Read sentry-oauth.ts, lines 1 to 100
Read sentry-oauth.ts, lines 100 to 163
The OAuth code looks correct, but let me add better error handling and validation. The issue might be with expired authorization codes or timing issues. Let me improve the error handling in the OAuth flow:
oauth.ts +41 -8

5. Fix: Zod validation errors (Issue: MCP-SERVER-E[illegible]Y, MCP-SERVER-E3H)
Let me check if there's an issue with the Zod toString property assignment:
Searched text for toString (**/packages/mcp-server/src/**/*.ts), 6 results
The Zod toString error might be related to how Zod error handling is configured. Let me check if there are any Zod configurations:

Interface text:
File Edit Selection View Go Run Terminal Help
sentry-mcp [WSL: Ubuntu]
Explorer (Ctrl+Shift+E)
SENTRY-MCP [WSL: UBUNTU]
.github, .turbo, .vscode, .wrangler, bin, node_modules, packages, mcp-cloudflare, mcp-server, coverage, dist, src, api-client, internal, formatting.ts, issue-helpers.test.ts, issue-helpers.ts, transports, index.ts, logging.ts, promptDefinitions.ts, prompts.ts, resources.ts, schema.ts, server.ts, test-setup.ts, toolDefinitions.test.ts, toolDefinitions.ts, tools.test.ts, tools.ts
Welcome, tools.ts, issue-helpers.ts, index.ts, oauth.ts
packages > mcp-server > src > internal > issue-helpers.ts > extractIssueId
AIE; AI Engineer World's Fair; vellum; Microsoft; aws; smol ai; PRESENTED BY

[4:30](https://www.youtube.com/watch?v=FCi4jT86gSw&t=270s) [VS Code shows URL validation changes alongside an assistant's discussion of several errors.](https://assets.ai.engineer/sites/aiecode2025/sha256/6c2da7015b7d6b1d0b8324f9e7df46a3153878fdff6f5317357915c0dcc2e236.webp)

/**
 * Extracts the Sentry issue ID and organization slug from a full URL
 *
 * @param url - A full Sentry issue URL
 * @returns Object containing the numeric issue ID and organization slug (if fo[illegible]
 * @throws Error if the input is invalid
 */
export function extractIssueId(url: string): {
  issueId: string;
  organizationSlug: string;
} {
  if (!url || typeof url !== 'string') {
    throw new Error(
      "Invalid Sentry issue URL. URL must be a non-empty string.",
    );
  }

  if (!url.startsWith("http://") && !url.startsWith("https://")) {
    throw new Error(
      "Invalid Sentry issue URL. Must start with http:// or https://",
    );
  }

  const parsedUrl = new URL(url); [deleted]
  let parsedUrl: URL;
  try {
    parsedUrl = new URL(url);
  } catch (error) {
    throw new Error(
      `Invalid Sentry issue URL. Unable to parse URL: ${url}`,
    );
  }

  const pathParts = parsedUrl.pathname.split("/").filter(Boolean);
  if (pathParts.length < 2 || !pathParts.includes("issues")) {
    throw new Error(
      "Invalid Sentry issue URL. Path must contain '/issues/{issue_id}'",
    );
  }

  const issueId = pathParts[pathParts.indexOf("issues") + 1];
  if (!issueId) {
    throw new Error("Unable to determine issue ID from URL.");
  }

  // Extract organization slug from either the path or subdomain

Chat:
client.ts +0 -20
Let me fix this by updating the fetch call:
client.ts +8 -1

3. Fix: Invalid URL string errors (Issue: MCP-SERVER-E1S, MCP-SERVER-E3G)
Let me check where URL constructors are being used that might fail:
Searched text for new URL (**/packages/mcp-server/src/**/*.ts), 10 results
Let me fix the issue in the tools.ts where regionUrl might be invalid:
tools.ts +11 -1
Also, let me improve the URL validation in the issue helpers:
issue-helpers.ts +14 -1

4. Fix: OAuth token exchange issues (Issues: MCP-SERVER-DR8, MCP-SERVER-DZJ)
Let me check the OAuth implementation more carefully:
Read oauth.ts, lines 80 to 143
The OAuth error shows {"error":"invalid_grant"} which suggests the authorization code might be expired or invalid. Let me check where the OAuth callback is handled:
Searched text for oauth/callback (**/packages/mcp-cloudflare/src/**/*.ts), 1 result
Read sentry-oauth.ts, lines 1 to 100
Read sentry-oauth.ts, lines 100 to 163
The OAuth code looks correct, but let me add better error handling and validation. The issue might be with expired authorization codes or timing issues. Let me improve the error handling in the OAuth flow:
oauth.ts +41 -8

5. Fix: Zod validation errors (Issue: MCP-SERVER-E[illegible]Y, MCP-SERVER-E3H)
Let me check if there's an issue with the Zod toString property assignment:
Searched text for toString (**/packages/mcp-server/src/**/*.ts), 6 results
The Zod toString error might be related to how Zod error handling is configured. Let me check if there are any Zod configurations:

Interface text:
File Edit Selection View Go Run Terminal Help
sentry-mcp [WSL: Ubuntu]
Explorer (Ctrl+Shift+E)
SENTRY-MCP [WSL: UBUNTU]
.github, .turbo, .vscode, .wrangler, bin, node_modules, packages, mcp-cloudflare, mcp-server, coverage, dist, src, api-client, internal, formatting.ts, issue-helpers.test.ts, issue-helpers.ts, transports, index.ts, logging.ts, promptDefinitions.ts, prompts.ts, resources.ts, schema.ts, server.ts, test-setup.ts, toolDefinitions.test.ts, toolDefinitions.ts, tools.test.ts, tools.ts, types.ts, version.ts, package.json, README.md, tests.junit.xml, tsconfig.json, tsconfig.tsbuildinfo, tsdown.config.ts
Welcome, tools.ts, issue-helpers.ts, index.ts, oauth.ts
packages > mcp-server > src > internal > issue-helpers.ts > extractIssueId

### This will be easy

Cramer expected his existing API and OAuth setup to make MCP easy. The implementation has little boilerplate, but he quickly found it harder than expected.

[4:58](https://www.youtube.com/watch?v=FCi4jT86gSw&t=298s) [Orange slide reads, “This will be easy!” and “I already have an API!”](https://assets.ai.engineer/sites/aiecode2025/sha256/76dd26d7ce95982c8c2d5979b1c2e062984b72168b857fffac5ed28c7b5d3892.webp)

“This will be easy!”
“I already have an API!”

### A confusing API

The puzzled robot faces a tangled API. Cramer says agents struggle with large JSON payloads built for other uses, so MCP tools need design around how agents use context.

[6:09](https://www.youtube.com/watch?v=FCi4jT86gSw&t=369s) [A puzzled robot looks at a tangled API diagram.](https://assets.ai.engineer/sites/aiecode2025/sha256/f7cce21f80dee293b65be6371737fc634ad4a3f5e4f423344bac3c71da4be506.webp)

API
?

daily

### Code editors

A burning dumpster illustrates Cramer’s frustration with editor integrations. He says Cursor has broken frequently for him, while VS Code has been more stable recently.

[6:55](https://www.youtube.com/watch?v=FCi4jT86gSw&t=415s) [Illustration of code editor windows in a burning dumpster labeled “Code Editors.”](https://assets.ai.engineer/sites/aiecode2025/sha256/383b34f38d88516dc9d7076780f33abeeaaa47c74b276129d4c4c1f199d2b22a.webp)

CODE EDITORS

Interface text:
daily

### /Rant

Cramer shifts from critiquing agent integrations to offering practical advice, against an illustration of a burning computer.

[7:53](https://www.youtube.com/watch?v=FCi4jT86gSw&t=473s) [Section slide introducing actionable advice, with an illustration of a burning computer.](https://assets.ai.engineer/sites/aiecode2025/sha256/99dd9d5452c4ce661c5e99b25d10aa3446fa4c2f8036fc0e61ea18d6d9b6bc00.webp)

/Rant

Here’s some actionable advice.

Interface text:
daily

### OAuth, only OAuth

Cramer recommends OAuth for remote MCP servers and mcp-remote as a stopgap for clients without support. The screenshot shows MCP Inspector requesting authorization to Sentry MCP.

[8:28](https://www.youtube.com/watch?v=FCi4jT86gSw&t=508s) [OAuth advice for cloud-based APIs, with an example authorization request.](https://assets.ai.engineer/sites/aiecode2025/sha256/742d7b007305479c5fc6875d6736fbd4a095ba9714827af58302f07c67d861ae.webp)

1. OAuth, only OAuth

There are few places more important to focus on security given the scope of agents.

stdio may be useful for some applications, but not for cloud-based APIs.

Claude (Desktop) and VSCode (Insiders) have support today. Cursor is soon™.

Use mcp-remote until then.

Interface text:
Sentry MCP

MCP Inspector is requesting access

Name: MCP Inspector
Website: https://github.com/modelcontextprotocol/inspector
Redirect URIs: http://localhost:6274/oauth/callback

This MCP Client is requesting authorization to Sentry MCP. If you approve, you will be redirected to complete authentication.

Cancel
Approve

### Design the API

Cramer recommends designing responses as context for models. Sentry translates some API responses into Markdown, keeping the essentials in a structure a human can reason about.

[9:49](https://www.youtube.com/watch?v=FCi4jT86gSw&t=589s) [Advice to design API responses as context for language models, including considering Markdown.](https://assets.ai.engineer/sites/aiecode2025/sha256/245e0a37bb8b7f1b756795732fb2b11855cbcc9a2c762632524c2ac8f45dc541.webp)

2. Design the API

You’re designing for a language model, you’re designing for language.

Your API needs to respond with context, in ways the expected models can consume.

Instead of JSON, consider something like markdown.

Interface text:
AIE
AI Engineer World’s Fair
Graphite
Microsoft
aws
smol ai

### Tool description example

The find_organizations tool describes when to list accessible Sentry organizations or find a slug. Cramer gives clients this context to help them choose and call the right tool.

[11:02](https://www.youtube.com/watch?v=FCi4jT86gSw&t=662s) [Code example defining an organization-finding tool, its usage description, and an optional parameter.](https://assets.ai.engineer/sites/aiecode2025/sha256/e9f498b0dd625641169164d85426cc983e412bc314f348ab2ba1a68740f78cb9.webp)

{
  name: "find_organizations" as const,
  description: [
    "Find organizations that the user has access to in Sentry.",
    "",
    "Use this tool when you need to:",
    "- View all organizations in Sentry",
    "- Find an organization's slug to aid other tool requests",
  ].join("\n"),
  paramsSchema: {
    regionUrl: ParamRegionUrl.optional(),
  },
}

### Design Errors, Too

Errors become context for the LLM, so they need to help it figure out how to call the API. A vague request to try harder gives it little direction.

[11:23](https://www.youtube.com/watch?v=FCi4jT86gSw&t=683s) [Slide explains that errors returned to an LLM become context and gives an unhelpful error-message example.](https://assets.ai.engineer/sites/aiecode2025/sha256/c38a03c238d41398c6f3e54d06bdbab201e63cb8de504e05072fb92952c86f8d.webp)

2b. Design Errors, too

Errors matter too. Every piece of information you return to the LLM is context.

“Have you thought about trying harder, please?”

### Tool Input Error Example

The find_organizations tool rejects “usa” as a regionUrl and explains that the value must be a valid URL. Cramer recommends giving the model a human-readable response when an input is invalid.

[11:48](https://www.youtube.com/watch?v=FCi4jT86gSw&t=708s) [A tool interface shows a validation error explaining that the supplied region URL is invalid.](https://assets.ai.engineer/sites/aiecode2025/sha256/d82d3f032453db705386bfb41769d956ed42672a4299c9d2f26c6f5f991f9140.webp)

find_organizations

Find organizations that the user has access to in Sentry. Use this tool when you need to:
- View all organizations in Sentry
- Find an organization's slug to aid other tool requests

regionUrl
usa

Tool Result: Error

"**Input Error**

It looks like there was a problem with the input you provided.

Invalid regionUrl provided: usa. Must be a valid URL.

You may be able to resolve the issue by addressing the concern and trying again."

Interface text:
Run Tool

### Mind Your Tokens

Consolidate API responses and keep inputs and outputs small. Cramer warns that returning everything can increase token costs and may run into tool description limits.

[12:05](https://www.youtube.com/watch?v=FCi4jT86gSw&t=725s) [Slide recommends consolidating API responses and reducing input and output surfaces.](https://assets.ai.engineer/sites/aiecode2025/sha256/8c0c30ef47ccd79d0126508db1a023829705c95fb8dff00ed9eed5887554da21.webp)

3. Mind Your Tokens

You don’t have a lot of control, but you can be thoughtful about consolidating API responses, creating smaller surfaces for inputs and outputs.

Everything is out of your control, because you didn’t build the agent...

Interface text:
vellum

### Build the Agent

Cramer argues that exposing an agent through MCP lets its provider control the model, prompts and tool calls while bearing the cost. He says missing streaming responses for tools complicate agent-to-agent use.

[13:00](https://www.youtube.com/watch?v=FCi4jT86gSw&t=780s) [Slide advocates exposing agents through MCP and asks who controls uptime.](https://assets.ai.engineer/sites/aiecode2025/sha256/7ecb941f9f17fbdb3c73b645d11cfd4f91701bdb1c44f7dad1a6e9feef576f90.webp)

4. Build the Agent

You can resolve many problems by exposing agents instead of dumb tools.

“Who controls your uptime?”

This is the bet Sentry is making, and where we expect MCP to shine for b2b (in time).

Other visible text:
AIE
AI Engineer World's Fair
vellum
PRESENTED BY
Microsoft
aws
smol ai

### Build Something

Cramer says he built it in two days and encourages others to build, experiment, and learn, even though things often break.

[14:56](https://www.youtube.com/watch?v=FCi4jT86gSw&t=896s) [Slide reading “Build Something” and “You, too, can have opinions,” with a speaker inset.](https://assets.ai.engineer/sites/aiecode2025/sha256/9c503cf5945344709eee054ac1b87fb398470f6cfccdd0a093223ed05ee15b85.webp)

Build Something
You, too, can have opinions.

Interface text:
AIE
AI Engineer World’s Fair
daily
SEN [illegible]
PRESENTED BY
Microsoft
aws
smol ai

## Full transcript

[0:00](https://www.youtube.com/watch?v=FCi4jT86gSw&t=0s) [upbeat music] Um, welcome everybody.

[0:17](https://www.youtube.com/watch?v=FCi4jT86gSw&t=17s) It's a little bit last minute, so bear with me. If you don't know me, uh, I started Sentry a long time ago, David Cramer. I'm sort of an engineer, sort of an executive, sort of a founder.

[0:26](https://www.youtube.com/watch?v=FCi4jT86gSw&t=26s) Uh, I would like to think I have rational opinions, so that's mostly what this is. Um,

[0:33](https://www.youtube.com/watch?v=FCi4jT86gSw&t=33s) I don't think you're gonna learn anything here. Maybe you will, I don't know. I personally think this is not that complicated, it's just big scary words. So, if you do, great.

[0:44](https://www.youtube.com/watch?v=FCi4jT86gSw&t=44s) If you don't, maybe you walk away and you're like, "Yeah, I thought that's what it was." We've done it.

[0:50](https://www.youtube.com/watch?v=FCi4jT86gSw&t=50s) Mostly, uh, I was asked a couple days ago while I snuck my way into this conference if I could fill a slot, and so filling a slot was like, "Oh, come give some hot takes, maybe spice it up a little bit," so that's what we're gonna do.

[1:01](https://www.youtube.com/watch?v=FCi4jT86gSw&t=61s) It's not gonna be too much of a rant. If you know me, I like to rant, but, you know, we'll, we'll dial back for this one a little bit.

[1:06](https://www.youtube.com/watch?v=FCi4jT86gSw&t=66s) So, what is an MCP? Uh, you know, I, I gotta say, this is like one of the wildest phenomenons I've... It's like the new crypto wave or something. Everybody's like, "Yeah, MCP, we don't know what it is, but we're here for it."

[1:18](https://www.youtube.com/watch?v=FCi4jT86gSw&t=78s) And you find a lot of these sort of like opinions around, you know, how it should be, how it shouldn't be, and, uh, you know, what I often find is people who have these opinions have not built anything, or at least not built the thing they're talking about.

[1:29](https://www.youtube.com/watch?v=FCi4jT86gSw&t=89s) I built Sentry's MCP server mostly as a fun project, um, so take this for what it is. Um, it's also Sentry's MCP server. These are biased opinions towards what Sentry is.

[1:38](https://www.youtube.com/watch?v=FCi4jT86gSw&t=98s) If you're not familiar with Sentry, you probably should be, but we do application monitoring. We do a bunch of stuff. Um, if you have bugs on the internet, they probably go to us.

[1:48](https://www.youtube.com/watch?v=FCi4jT86gSw&t=108s) Uh, and so it's in context of a B2B, a SaaS business. A lot of you probably work at enterprise companies, if you will, so think about it that way.

[1:55](https://www.youtube.com/watch?v=FCi4jT86gSw&t=115s) But the way we think about MCP is it is a pluggable architecture for agents. Full stop. That's it. It's pretty simple to reason about.

[2:03](https://www.youtube.com/watch?v=FCi4jT86gSw&t=123s) And again, all of this is contextualized in an enterprise cloud service kind of way. There's a lot of other variations of how you might adapt MCP. There's tool chains that make sense locally.

[2:14](https://www.youtube.com/watch?v=FCi4jT86gSw&t=134s) We're talking about we run cloud services. That's most of the industry. We're B2B, we're enterprise. I think a lot of this actually still applies, um, but take that with a grain of salt.

[2:25](https://www.youtube.com/watch?v=FCi4jT86gSw&t=145s) So, how we think about MCP with Sentry, particularly because this, again, relevant here, we fix bugs. There are things like Cursor, where you also fix bugs. What if we could all fix bugs together?

[2:37](https://www.youtube.com/watch?v=FCi4jT86gSw&t=157s) And so everything's contextualized in that, and I think

[2:40](https://www.youtube.com/watch?v=FCi4jT86gSw&t=160s) there's this whole thing of like, how do we be relevant? That's like the, the name of the game for every single company in the world right now. Um, it's like, "Oh, how, how do we become an AI company?"

[2:49](https://www.youtube.com/watch?v=FCi4jT86gSw&t=169s) We too are now an AI company. Um, but Sentry has a lot of bugs. I fix those in my editor. Wouldn't it be cool if the bugs could be inside my editor sometimes?

[2:59](https://www.youtube.com/watch?v=FCi4jT86gSw&t=179s) That's a great example of where maybe an MCP is useful, but at the very least we're gonna pretend it's useful. So, that's the context here. Um, but it all comes back to like probably the reason everybody's here is like, "How do I become relevant?

[3:10](https://www.youtube.com/watch?v=FCi4jT86gSw&t=190s) I've got an AI mandate. I've got infinite money to spend all of a sudden for some reason that didn't exist yesterday. How do we get involved?" Okay? So everybody, probably same stage.

[3:18](https://www.youtube.com/watch?v=FCi4jT86gSw&t=198s) I know how this works, so. All right. Um, we built this a few months ago. We are not first to market with an MCP,

[3:28](https://www.youtube.com/watch?v=FCi4jT86gSw&t=208s) and the reason why is because the- there's two interfaces for MCPs. I'm gonna focus on a remote interface, but there's also the standard I/O. You probably learned about that or know something about that.

[3:36](https://www.youtube.com/watch?v=FCi4jT86gSw&t=216s) I don't think standard I/O is super useful for businesses like ours. I'll talk about that. But, but sort of the analogy of why MCP is useful, and this is VS Code Insiders, which you just, uh, heard from Harold, but like they do a pretty good job.

[3:48](https://www.youtube.com/watch?v=FCi4jT86gSw&t=228s) They're the only ones with OAuth support that's like useful today. Cursor promised me end of week, and I'll hold them to that. Um, but it works pretty well. You plug in Sentry's MCP, you can look up data from Sentry in a bunch of curated workflows.

[4:00](https://www.youtube.com/watch?v=FCi4jT86gSw&t=240s) You can maybe fix some bugs. Maybe easier than it was before, or at least more fun than it was before. Um, and for the sake of this, I- I needed a screen grab, so last night I'm like, literally last night I'm working on these slides and I go into VS Code.

[4:11](https://www.youtube.com/watch?v=FCi4jT86gSw&t=251s) I'm like, "I'm just gonna plug it in. I don't have time to futz around if the thing's gonna break," and so I use the VS Code. And I'm like, "Okay, I'll just do a thing where it's like fix all my bugs for me." [laughs]

[4:20](https://www.youtube.com/watch?v=FCi4jT86gSw&t=260s) And then immediately it does like 20 API queries to Sentry. Probably cost me like five bucks to run this thing. Um,

[4:27](https://www.youtube.com/watch?v=FCi4jT86gSw&t=267s) but it did start fixing some bugs. Uh, I don't know if the fixes were good, mind you. They're, they're probably garbage. Um, but it, it does a thing, right?

[4:34](https://www.youtube.com/watch?v=FCi4jT86gSw&t=274s) It's like it brought context into the editor, which is what we want, and that context was provided by somebody else, Sentry in this case. So that is like one of the interesting things.

[4:43](https://www.youtube.com/watch?v=FCi4jT86gSw&t=283s) It's one of the interesting things we think about and why MCP is like in- like valuable to sort of a traditional, uh, I don't know, we're kind of an enterprise company, but like, uh, like every company in the world.

[4:53](https://www.youtube.com/watch?v=FCi4jT86gSw&t=293s) And that's part of why we're all hopping on it. It's pretty accessible, and then that's what I'm gonna talk about. It is actually super accessible. So,

[5:00](https://www.youtube.com/watch?v=FCi4jT86gSw&t=300s) this is you. This was me. Um, and this is why I have opinions about it now. It's like, oh, it's just an API, it plugs in. We've got an API, we've got some OAuth going on.

[5:11](https://www.youtube.com/watch?v=FCi4jT86gSw&t=311s) You know, we had our own OAuth provider. You know, a lot of you might use something like a WorkOS or, I don't know, pick one of these authentication services that just gives you it out of the box.

[5:18](https://www.youtube.com/watch?v=FCi4jT86gSw&t=318s) If you have that, you're pretty much ready to go, which is pretty cool. It's actually like a pretty low boilerplate, uh, implementation. Um, but then you quickly learn that it's actually not that easy.

[5:28](https://www.youtube.com/watch?v=FCi4jT86gSw&t=328s) And so first you kinda go into this OAuth like dance and you're like, "Oh, okay, like, uh, yeah, we're gonna do this," but it needs OAuth 2.1 and nobody in the world supports this thing.

[5:36](https://www.youtube.com/watch?v=FCi4jT86gSw&t=336s) Like, it's like, I don't know how old it is, but I had never heard of it before MCP. Um, and so there's a little bit of complexity there. But you're like, "Okay, it's almost there.

[5:43](https://www.youtube.com/watch?v=FCi4jT86gSw&t=343s) It's OAuth. We've got that. We can plug it into our API." You kinda get it working. In our case, we use Cloudflare shim, which basically lets us proxy our OAuth 2 API on top of Cloudflare Workers, which has a 2.1 client registration thing.

[5:56](https://www.youtube.com/watch?v=FCi4jT86gSw&t=356s) I don't know if anybody's talked about that. TLDR, it's complicated. Um- But it's not that complicated. This was built in a couple days, mind you, and I'm also an executive at the company, so it's like, uh, if I can do it, everybody can do it.

[6:08](https://www.youtube.com/watch?v=FCi4jT86gSw&t=368s) Um, but you go through the OAuth flow, and then you're like, [claps] "Cool," but the, the robots don't know actually how to reason about giant JSON payloads that were not built for them.

[6:17](https://www.youtube.com/watch?v=FCi4jT86gSw&t=377s) And this is actually where I think a lot of people break down. There was like a big conversation. This is sort of one of my first opinions, if you will, what I might call common sense, is that MCP is not a thing that just sits on top of OpenAPI.

[6:30](https://www.youtube.com/watch?v=FCi4jT86gSw&t=390s) Like, you cannot just be like, "I got an API. I'm gonna expose all those endpoints as tools." You're gonna get the worst results you can possibly imagine. You're gonna be like, "Oh, this doesn't make any sense."

[6:38](https://www.youtube.com/watch?v=FCi4jT86gSw&t=398s) You have to massage everything. You have to design around the system. But, like, generally speaking, and I'll talk a little bit about this, like y- you need to really think about how would you use an agent today?

[6:46](https://www.youtube.com/watch?v=FCi4jT86gSw&t=406s) How do the models react to what you do when you provide them context, which is what this really is for, and design a system around that. So might leverage your API.

[6:54](https://www.youtube.com/watch?v=FCi4jT86gSw&t=414s) It is not your API. And then you get past that, and you wire it up to things like Cursor and VS Code, and you're like, "Why is this breaking all the time?"

[7:02](https://www.youtube.com/watch?v=FCi4jT86gSw&t=422s) You can't, you can't, uh, solve for that one. It's just... You gotta wait for everybody to catch up. Um, they're almost there. Uh, you know, handful of clients support native authentication now.

[7:11](https://www.youtube.com/watch?v=FCi4jT86gSw&t=431s) They're kind of stable. Um, to VS Code's credit, it hasn't broken much recently. Cursor's broken quite a lot on me, but they're both great. Don't get me wrong. Claude has support.

[7:20](https://www.youtube.com/watch?v=FCi4jT86gSw&t=440s) Claude Code has sort of support, but not really. Um, so I guess it might work, it might not. I think particularly in the developer ecosystem, we're much more ahead of the curve.

[7:31](https://www.youtube.com/watch?v=FCi4jT86gSw&t=451s) And so if you're trying to adapt your services to third-party agents that are in our ecosystem, like these editors, you've probably got a good shot of it working tomorrow.

[7:41](https://www.youtube.com/watch?v=FCi4jT86gSw&t=461s) If, I don't know, it's Salesforce or something, I have no idea. So, so you're, you're kind of beholden to, like, the clients and the implementation because again, it's a plug-in architecture for agents.

[7:50](https://www.youtube.com/watch?v=FCi4jT86gSw&t=470s) Um, there's a lot of other use cases that are not just third parties, but that's kind of the focus. And so I'm gonna try to be constructive from here.

[7:57](https://www.youtube.com/watch?v=FCi4jT86gSw&t=477s) Let's see. We got nine minutes. Um, just a few learnings, and I'm happy to talk more about this later. I'll be around. Um,

[8:05](https://www.youtube.com/watch?v=FCi4jT86gSw&t=485s) you'll probably... Somebody in this room is gonna disagree with this, but you should only care about OAuth if you're a B2B SaaS company like me. Um,

[8:13](https://www.youtube.com/watch?v=FCi4jT86gSw&t=493s) and particularly you care about OAuth with remote environments for the most part. If you're like, how do I integrate my services into various agents?

[8:22](https://www.youtube.com/watch?v=FCi4jT86gSw&t=502s) I want bugs to exist in Cursor. I wanna run a cloud service, and I wanna run a cloud service for the exact same reason I've always wanted to run a cloud service.

[8:29](https://www.youtube.com/watch?v=FCi4jT86gSw&t=509s) Because I can iterate on it. I can ship fast. I can dial in security. All of the advantages, it turns out, are exactly the same because technology has not changed.

[8:37](https://www.youtube.com/watch?v=FCi4jT86gSw&t=517s) And so if I were you, and you're not building something hyper-specific that is like a local device-centric thing, just focus on the remote MCP server, focus on the OAuth specification, and just, like, don't worry about it.

[8:49](https://www.youtube.com/watch?v=FCi4jT86gSw&t=529s) The, the problems will solve themselves. Security will solve itself 'cause there's a whole world of security problems, and the standard I/O interface is filled with most of them. Um, I'm not gonna talk about that.

[8:58](https://www.youtube.com/watch?v=FCi4jT86gSw&t=538s) I'm sure there's some other talks here about prompt injection, but it is like very, very, very scary. Do not allow random MCP tools in your organization. Um, trust people that have earned trust.

[9:09](https://www.youtube.com/watch?v=FCi4jT86gSw&t=549s) Don't download random packages off the internet. Uh, it will be a very bad time for your organization. Um, I did mention this. Claude Desktop has, I think, full OAuth support right now in production, in GA.

[9:19](https://www.youtube.com/watch?v=FCi4jT86gSw&t=559s) VS Code Insiders has it. Um, these are great because you just drop in the MCP URL, and it handles everything from there. Cursor, like I said, I think this week.

[9:26](https://www.youtube.com/watch?v=FCi4jT86gSw&t=566s) Um, I don't know about anybody else. I don't pay attention much beyond anybody else, and I think Claude Code has not... At least I've not seen anything. Um, and then there's a bunch, like a long tail, right?

[9:35](https://www.youtube.com/watch?v=FCi4jT86gSw&t=575s) So works pretty well. There is this mcp-remote package, which is how we shipped all this stuff. It works okay. I applaud early adopters for getting this out. It's not a great experience, and you'll find a lot of this is not a great user experience.

[9:47](https://www.youtube.com/watch?v=FCi4jT86gSw&t=587s) It's rough. It's beta. That's fine. Um, this is the biggest thing, going back to OpenAPI then. You actually have to spend the, the calories. You can't just be like, "Ha ha, we proxied OpenAPI and exposed it as tools."

[9:57](https://www.youtube.com/watch?v=FCi4jT86gSw&t=597s) It's gonna do nothing. And so what the right answer here is, who knows? Um, our version of this, and I'll talk a little bit about why, is like

[10:06](https://www.youtube.com/watch?v=FCi4jT86gSw&t=606s) we return Markdown. We've, we've taken some API endpoints, and we've directly translated some of the response to Markdown. But it's intentional. It's like, I wanna get a bug out of Sentry.

[10:16](https://www.youtube.com/watch?v=FCi4jT86gSw&t=616s) I'm just gonna give you the bare essentials. I'm gonna give it in a structured way that a human can reason about because generally speaking, if a human can reason about it, the language model can reason about it because it's effectively pattern matching on language.

[10:27](https://www.youtube.com/watch?v=FCi4jT86gSw&t=627s) Um, it can kind of figure out JSON here and there, but if, if you actually push it, you're gonna find it breaks all the time. So just use something like Markdown.

[10:34](https://www.youtube.com/watch?v=FCi4jT86gSw&t=634s) Um, it's not scientific. I think there's a lack of science in a lot of this. It's hard. Just go with whatever works. But you, you have to really think about, you don't control the, the consumer.

[10:42](https://www.youtube.com/watch?v=FCi4jT86gSw&t=642s) You don't control the model, and so you're kind of like this least common denominator thing. And so think about that, but you need to design the system, and you need to treat it as like you are providing context to an agent that you don't know what the agent is doing, right?

[10:54](https://www.youtube.com/watch?v=FCi4jT86gSw&t=654s) And so that's the name of the game is context. That same thing, uh, sorry, here's an example of that. Forgot what my slides were. Uh, we just, like, give kind of a reasonable description of tools as the first version of context, um, which sometimes you hit token limits with all this, so there's some other challenges.

[11:09](https://www.youtube.com/watch?v=FCi4jT86gSw&t=669s) We give a reasonable description of a tool with the hopes that clients figure out how to make use of this context. So it can call the right tool. It can call it when it needs to.

[11:18](https://www.youtube.com/watch?v=FCi4jT86gSw&t=678s) It can choose one tool over the other tool, which is a really, unfortunately, hard problem for it to figure out. Um, mostly straightforward. Errors, same thing. You gotta design the errors.

[11:27](https://www.youtube.com/watch?v=FCi4jT86gSw&t=687s) They are still context because just like a human can't figure out how to call your API, the machine also can't figure out how to call your API. In my example, I'm like, "Fix all my bugs for me," and it, it queries like every organization in Sentry that I have access to.

[11:40](https://www.youtube.com/watch?v=FCi4jT86gSw&t=700s) It queries all... It's like, like 20 API calls when it should've been one, even with all this context. So the... We are a long ways from this being great, but it's like a glimmer, right?

[11:48](https://www.youtube.com/watch?v=FCi4jT86gSw&t=708s) So, you know, in this case, it's like, oh, you didn't pass the, the thing, or rather you passed an invalid value for the thing. Give it a real human response.

[11:56](https://www.youtube.com/watch?v=FCi4jT86gSw&t=716s) This is now more important than ever because again, it's not just a sort of machine reasoning about it where you can hard code all this stuff. It's abstract. You don't know who's reasoning about it.

[12:06](https://www.youtube.com/watch?v=FCi4jT86gSw&t=726s) The biggest thing, and this is sort of leading to like the, my overarching view of the world, is like you don't, you have no control, which already is a problem.

[12:13](https://www.youtube.com/watch?v=FCi4jT86gSw&t=733s) You are also passing the cost on in a lot of these cases. So you actually kinda need to be mindful. So another reason to not just be like, "Here's my API, I'm just gonna return everything to you."

[12:21](https://www.youtube.com/watch?v=FCi4jT86gSw&t=741s) Because all of a sudden, you know, that, that call, if you will, that tool call that could've been a dollar might be $10 now because of the amount of tokens you needed.

[12:28](https://www.youtube.com/watch?v=FCi4jT86gSw&t=748s) And more importantly, it might just not work. Like early on in, and I don't know if VS Code and/or OpenAI, I don't know who's to blame, fixed this, but like there was, and may still be, a limit to the amount of tokens or description lengths of tools.

[12:42](https://www.youtube.com/watch?v=FCi4jT86gSw&t=762s) Makes sense, right? You wanna constrain the cost of every API call, but all of a sudden now you have problems again. So you gotta be really thoughtful about this.

[12:48](https://www.youtube.com/watch?v=FCi4jT86gSw&t=768s) This is gonna be evolved. And I think the big thing is like if you build one of these, it's not set and forget. Like I- we're still updating this thing every week, tweaking it here and there, trying to look at like what's happening and evolving it, right?

[12:57](https://www.youtube.com/watch?v=FCi4jT86gSw&t=777s) But the biggest thing, and this is sort of my, my takeaway, my, my very, very strong belief is like you just need to really focus on building agents. MCP is a plugin architecture.

[13:05](https://www.youtube.com/watch?v=FCi4jT86gSw&t=785s) There's a lot of value behind it, but the like the inherent value of a lot of what LLMs are bringing is this sort of agent architecture, which by the way, is just a service architecture with a fancy new word on it.

[13:14](https://www.youtube.com/watch?v=FCi4jT86gSw&t=794s) Common sense kinda stuff, right? Um, and so we've done this in Sentry. It does not work well with MCP yet for, for what it's worth. There is no streaming responses for tools yet, and that's a big problem when you think about sort of this agent to agent, and I don't mean this in like the Google way.

[13:27](https://www.youtube.com/watch?v=FCi4jT86gSw&t=807s) I mean in like the generalized point of view of agent to agent. Um, but it gives you control, and it's, it's the same as all software. If you have control, you can be responsible for the success, for the failure.

[13:37](https://www.youtube.com/watch?v=FCi4jT86gSw&t=817s) I can be responsible for the prompt that dictates how the tool is called. I can be responsible for the result from the tool. I can make many calls behind the scenes and wrap those up.

[13:46](https://www.youtube.com/watch?v=FCi4jT86gSw&t=826s) So I, I just get a lot more control if I pick up the cost of that agent. I control the model even, right? And so I think this is, this is my big bet, and I think this is where B2B's gonna shine is when we start exposing agents through the MCP architecture.

[13:59](https://www.youtube.com/watch?v=FCi4jT86gSw&t=839s) Again, treating MCP as a plugin architecture. We've done that with one of ours, which is this thing. We keep renaming it, so bear with me. It's like called Seer now, but it's just like Sentry's got a lot of data on what's broken in your application.

[14:10](https://www.youtube.com/watch?v=FCi4jT86gSw&t=850s) We do this thing where we do this really high-quality root cause analysis that's done via an agent. Um, we expose that root cause analysis, mostly to our UI to be fair.

[14:19](https://www.youtube.com/watch?v=FCi4jT86gSw&t=859s) We also expose it to the MCP, but because it doesn't do streaming, we have to do like some polling check where it's like, "Okay, start the job and then let's check in on it a few times."

[14:27](https://www.youtube.com/watch?v=FCi4jT86gSw&t=867s) But then there, because of the way agents work, it just gives up at some point. So yeah, it, it's a little complicated, but again, beta testing, the promise is there.

[14:34](https://www.youtube.com/watch?v=FCi4jT86gSw&t=874s) Um, but when this works, I, I really think this is gonna be the value unlock for a lot of us. Again, MCP does a lot of things. It's an abstract protocol.

[14:41](https://www.youtube.com/watch?v=FCi4jT86gSw&t=881s) Um, but the agent analogy is really good. Um, aside, all this is open source. You can find Sentry's MCP somewhere on the internet. You'll find it on GitHub. I should say Fair Source.

[14:50](https://www.youtube.com/watch?v=FCi4jT86gSw&t=890s) There's some complexity there. This is what the agent looks like in the UI. Check it out if you haven't. We'll be around. Give me feedback. Um, I think the last thing I wanna, wanna sort of part with is just like this stuff is not that hard.

[15:02](https://www.youtube.com/watch?v=FCi4jT86gSw&t=902s) Um, it's quite broken all the time, but it's not that hard. I, again, I built it in two days. I got a lot of jobs to do at the company.

[15:08](https://www.youtube.com/watch?v=FCi4jT86gSw&t=908s) You can just go build it and try it out and learn and like all this stuff is pretty obvious. I think the lesson we've learned at Sentry, uh, or still are learning, I should say, uh, everybody is scared of all this stuff because there's fancy new words for everything, but the fancy new words are just new words

[15:22](https://www.youtube.com/watch?v=FCi4jT86gSw&t=922s) for the same thing. It's just a new p- like coat of paint, right? You know, MCP is just a plugin architecture. Agents are just services, like the, the LLM calls or MCP calls, actually half of them, tools are just API calls with a new response format, right?

[15:34](https://www.youtube.com/watch?v=FCi4jT86gSw&t=934s) So it's pretty accessible to do all this. There's a lot of great like technology that's been going on in here. Um, like I said, we used a lot of Cloudflare tech.

[15:40](https://www.youtube.com/watch?v=FCi4jT86gSw&t=940s) We did not use Cloudflare at all before this, and then in a couple days we're like, "Cool, we can shim up a thing on, on Workers. They've got an OAuth proxy for us.

[15:48](https://www.youtube.com/watch?v=FCi4jT86gSw&t=948s) Problem solved." And this is important 'cause we don't run WebSocket infrastructure at Sentry. It's just not a thing we had, right? And unfortunately, the protocol requires something like that, which makes it a little bit annoying to adopt, but, but again, it's not that hard.

[15:59](https://www.youtube.com/watch?v=FCi4jT86gSw&t=959s) It's pretty easy to adopt. Uh, try it out. You'll probably hit a lot of bugs, but just stick with it. I, I think this one will stick around. Um, but I would really dial in the, the thinking around agents and how you're optimizing for context in the workflows you understand for your data.

[16:12](https://www.youtube.com/watch?v=FCi4jT86gSw&t=972s) Uh, with that said, I will be around the rest of the afternoon probably at our, our booth in the expo hall if you wanna come chat, uh, come say hi.

[16:20](https://www.youtube.com/watch?v=FCi4jT86gSw&t=980s) I'm always happy to like rant about other things or give you my semi-informed opinions. Um, I'm not an AI guy to be clear, but, um, cool. With that, you know, thanks everybody for, for showing up to this talk and this wild conference which is interesting, and I'll call it there. [outro music]
