diff --git a/README.md b/README.md
index 80ae79d60..8e5ca8ca7 100644
--- a/README.md
+++ b/README.md
@@ -46,10 +46,10 @@ team:write
event:write
```
-Launch the transport:
+Launch the transport with your token in the environment:
```shell
-npx @sentry/mcp-server@latest --access-token=sentry-user-token
+SENTRY_ACCESS_TOKEN=sentry-user-token npx @sentry/mcp-server@latest
```
Need to connect to a self-hosted deployment? Add --host (hostname
@@ -61,13 +61,13 @@ Some features (like Seer) may not be available on self-hosted instances. You can
disable specific skills to prevent unsupported tools from being exposed:
```shell
-npx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.example.com --disable-skills=seer
+SENTRY_ACCESS_TOKEN=TOKEN npx @sentry/mcp-server@latest --host=sentry.example.com --disable-skills=seer
```
For self-hosted instances without TLS:
```shell
-npx @sentry/mcp-server@latest --access-token=TOKEN --host=sentry.internal:9000 --insecure-http
+SENTRY_ACCESS_TOKEN=TOKEN npx @sentry/mcp-server@latest --host=sentry.internal:9000 --insecure-http
```
#### Environment Variables
@@ -222,7 +222,7 @@ pnpm -w run cli --agent "who am I?"
pnpm -w run cli --mcp-host=https://mcp.sentry.dev "query"
# Test with local stdio mode (requires SENTRY_ACCESS_TOKEN)
-pnpm -w run cli --access-token=TOKEN "query"
+SENTRY_ACCESS_TOKEN=TOKEN pnpm -w run cli "query"
```
Note: The CLI defaults to `http://localhost:5173`. Override with `--mcp-host` or set `MCP_URL` environment variable.
diff --git a/packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx b/packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx
index 4dbb81ac8..0b1c0fea9 100644
--- a/packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx
+++ b/packages/mcp-cloudflare/src/client/components/fragments/stdio-setup.tsx
@@ -10,10 +10,10 @@ const orderedSkills = [...skillDefinitions].sort((a, b) => a.order - b.order);
export default function StdioSetup() {
const mcpStdioSnippet = `npx ${NPM_PACKAGE_NAME}@latest`;
+ const mcpStdioWithTokenSnippet = `SENTRY_ACCESS_TOKEN=sentry-user-token ${mcpStdioSnippet}`;
const selfHostedHostExample = [
- `${mcpStdioSnippet}`,
- "--access-token=sentry-user-token",
+ `${mcpStdioWithTokenSnippet}`,
"--host=sentry.example.com",
].join(" \\\n ");
@@ -60,10 +60,7 @@ export default function StdioSetup() {
Now wire up that token to the MCP configuration: