Skip to content

Commit 3b17346

Browse files
authored
feat(mcp-cloudflare): enhance Remote/stdio setup guides (#536)
- Add constraints and scopes guidance for stdio - Deprecate SSE usage behind accordion with limitations - UI tweaks: headings, margins, accordion components chore(claude): enable co-authored-by and tighten tool allowlist
1 parent c258f79 commit 3b17346

3 files changed

Lines changed: 84 additions & 29 deletions

File tree

‎.claude/settings.json‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"Bash(gh pr checks:*)",
1818
"Bash(gh pr view:*)",
1919
"Bash(gh run view:*)",
20-
"Bash(git status:*)",
21-
"mcp__sentry__*"
20+
"Bash(git status:*)"
2221
],
2322
"deny": []
2423
},
@@ -36,6 +35,6 @@
3635
]
3736
},
3837
"enableAllProjectMcpServers": true,
39-
"includeCoAuthoredBy": false,
38+
"includeCoAuthoredBy": true,
4039
"enabledMcpjsonServers": ["sentry"]
4140
}

‎packages/mcp-cloudflare/src/client/components/fragments/remote-setup.tsx‎

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
import { Accordion } from "../ui/accordion";
1+
import {
2+
Accordion,
3+
AccordionContent,
4+
AccordionItem,
5+
AccordionTrigger,
6+
} from "../ui/accordion";
27
import CodeSnippet from "../ui/code-snippet";
38
import SetupGuide from "./setup-guide";
49
import { Prose } from "../ui/prose";
510
import { NPM_REMOTE_NAME } from "@/constants";
611
import { Button } from "../ui/button";
12+
import { Heading } from "../ui/base";
713

814
const mcpServerName = import.meta.env.DEV ? "sentry-dev" : "sentry";
915

@@ -42,44 +48,47 @@ export default function RemoteSetup() {
4248

4349
return (
4450
<>
45-
<Prose>
51+
<Prose className="mb-6">
4652
<p>
4753
If you've got a client that natively supports the current MCP
4854
specification, including OAuth, you can connect directly.
4955
</p>
5056
<CodeSnippet snippet={endpoint} />
51-
{/* Hidden for now - constraints not working correctly
5257
<p>
5358
<strong>Organization and Project Constraints:</strong> You can
54-
optionally constrain your MCP session to specific organizations or
55-
projects by including them in the URL path:
59+
optionally constrain your MCP session to a specific organization and
60+
project by including them in the URL path:
5661
</p>
5762
<ul>
5863
<li>
59-
<code>{endpoint}/:organization</code> - Restricts session to a
64+
<code>{endpoint}/:organization</code> — Restricts the session to a
6065
specific organization
6166
</li>
6267
<li>
63-
<code>{endpoint}/:organization/:project</code> - Restricts session
64-
to a specific organization and project
68+
<code>{endpoint}/:organization/:project</code> — Restricts the
69+
session to a specific organization and project
6570
</li>
6671
</ul>
67-
*/}
68-
<p>
69-
Sentry's MCP server supports both the SSE and HTTP Streaming
70-
protocols, and will negotiate based on your client's capabilities. If
71-
for some reason your client does not handle this well you can pin to
72-
the SSE-only implementation with the following URL:
73-
</p>
74-
<CodeSnippet snippet={sseEndpoint} />
75-
<p>
76-
<strong>Note:</strong> SSE endpoints do not support organization and
77-
project constraints. Use the main endpoint above if you need scoped
78-
access.
79-
</p>
80-
81-
<h3>Integration Guides</h3>
72+
<Accordion type="single" collapsible>
73+
<AccordionItem value="sse-deprecated">
74+
<AccordionTrigger>SSE support is deprecated</AccordionTrigger>
75+
<AccordionContent>
76+
<p className="mb-2">
77+
New clients should use HTTP Streaming via the main
78+
<code>/mcp</code> endpoint. If you must use the SSE-only
79+
implementation, use the following URL:
80+
</p>
81+
<CodeSnippet noMargin snippet={sseEndpoint} />
82+
<p className="mt-2">
83+
<strong>Limitations:</strong> SSE endpoints do not support
84+
organization or project constraints. Use the main
85+
<code>/mcp</code> endpoint if you need scoped access.
86+
</p>
87+
</AccordionContent>
88+
</AccordionItem>
89+
</Accordion>
8290
</Prose>
91+
<Heading as="h3">Integration Guides</Heading>
8392
<Accordion type="single" collapsible>
8493
<SetupGuide id="cursor" title="Cursor">
8594
<Button
@@ -119,6 +128,10 @@ export default function RemoteSetup() {
119128
)}
120129
/>
121130
</li>
131+
<li>
132+
Optional: To use the service with <code>cursor-agent</code>:
133+
<CodeSnippet noMargin snippet={`cursor-agent mcp login sentry`} />
134+
</li>
122135
</ol>
123136
</SetupGuide>
124137

@@ -135,6 +148,10 @@ export default function RemoteSetup() {
135148
This will trigger an OAuth authentication flow to connect Claude
136149
Code to your Sentry account.
137150
</li>
151+
<li>
152+
You may need to manually authenticate if it doesnt happen
153+
automatically, which can be doe via <code>/mcp</code>.
154+
</li>
138155
</ol>
139156
<p>
140157
<small>

‎packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx‎

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Accordion } from "../ui/accordion";
2-
import { Link } from "../ui/base";
2+
import { Heading, Link } from "../ui/base";
33
import CodeSnippet from "../ui/code-snippet";
44
import SetupGuide from "./setup-guide";
55
import { NPM_PACKAGE_NAME, SCOPES } from "../../../constants";
@@ -22,7 +22,7 @@ export default function StdioSetup() {
2222

2323
return (
2424
<>
25-
<Prose>
25+
<Prose className="mb-6">
2626
<p>
2727
The stdio client is made available on npm at{" "}
2828
<Link href={`https://www.npmjs.com/package/${NPM_PACKAGE_NAME}`}>
@@ -64,8 +64,47 @@ export default function StdioSetup() {
6464
sentry.io). If you wish to disable it, pass <code>--sentry-dsn=</code>{" "}
6565
with an empty value.
6666
</p>
67-
<h3>Integration Guides</h3>
67+
68+
<p>
69+
<strong>Constraints (stdio only):</strong> Restrict all tool calls to
70+
a specific organization, and optionally to a project within that
71+
organization using CLI flags.
72+
</p>
73+
<CodeSnippet
74+
snippet={[
75+
`${mcpStdioSnippet}`,
76+
"--access-token=sentry-user-token",
77+
"--host=sentry.io",
78+
"--organization-slug=sentry",
79+
"--project-slug=mcp-server",
80+
].join(" \\\n ")}
81+
/>
82+
<p>
83+
You can provide just <code>--organization-slug</code> to scope to an
84+
org, or include <code>--project-slug</code> to scope to a single
85+
project within that org.
86+
</p>
87+
88+
<p>
89+
<strong>Scopes:</strong> The default configuration grants read-only
90+
access (listed above). To grant full access to all available tools use
91+
<code>--all-scopes</code>.
92+
</p>
93+
<CodeSnippet
94+
snippet={[
95+
`${mcpStdioSnippet}`,
96+
"--access-token=sentry-user-token",
97+
"--host=sentry.io",
98+
"--all-scopes",
99+
].join(" \\\n ")}
100+
/>
101+
<p>
102+
For more options and details, run{" "}
103+
<code>npx @sentry/mcp-server@latest --help</code> — there are many
104+
flags available.
105+
</p>
68106
</Prose>
107+
<Heading as="h3">Integration Guides</Heading>
69108
<Accordion type="single" collapsible>
70109
<SetupGuide id="cursor" title="Cursor">
71110
<ol>

0 commit comments

Comments
 (0)