You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MCP DevKit Server uses stdio (standard input/output) for communication with Cursor. To prevent console logs from corrupting the JSON-RPC protocol, **you must set `MCP_LOGGING_DISABLE=true`** in the environment variables.
90
-
91
83
### Token Scopes
92
84
93
85
Your Mapbox access token must have the appropriate scopes for the tools you want to use. See the [main README](../README.md#tools) for required token scopes per tool.
@@ -143,9 +135,8 @@ If you get "command not found" errors for `node` or `npx`:
143
135
144
136
If you see JSON-RPC or parsing errors:
145
137
146
-
1. Ensure `MCP_LOGGING_DISABLE` is set to `"true"` in your configuration
147
-
2. If using Node version, verify the path to `dist/esm/index.js` is correct
148
-
3. Run `npm run build` to ensure the latest build is available
138
+
1. If using Node version, verify the path to `dist/esm/index.js` is correct
139
+
2. Run `npm run build` to ensure the latest build is available
# Add to .env (only works well with SSE transport)
204
-
OTEL_EXPORTER_CONSOLE_ENABLED=true
205
-
```
206
-
207
-
This prints traces to stderr. Only use this for debugging, as it can interfere with MCP's stdio communication.
208
-
209
-
### Verifying Different Transports
194
+
## Diagnostic Logging
210
195
211
-
#### stdio Transport (Default) - Silent Operation
196
+
By default, OpenTelemetry diagnostic logs are disabled to prevent interference with stdio transport. If you need to troubleshoot OTEL configuration issues, you can enable diagnostic logging:
212
197
213
198
```bash
214
-
#Normal operation
215
-
npm run inspect:build
199
+
#Add to .env - only for debugging OTEL issues
200
+
OTEL_LOG_LEVEL=ERROR
216
201
```
217
202
218
-
#### SSE Transport - Full Logging
219
-
220
-
```bash
221
-
# If your inspector supports SSE transport
222
-
SERVER_TRANSPORT=sse npm run inspect:build
223
-
```
203
+
**⚠️ Warning:** Any console output (including OTEL diagnostic logs) can corrupt stdio communication. Only enable diagnostic logging when actively troubleshooting, and disable it once resolved.
Copy file name to clipboardExpand all lines: docs/tracing.md
+17-27Lines changed: 17 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,11 @@
2
2
3
3
This MCP server includes comprehensive distributed tracing using OpenTelemetry (OTEL), providing production-ready observability for tool executions and HTTP requests.
4
4
5
-
## ⚠️ Important MCP Transport Compatibility
5
+
## ⚠️ Important: Stdio Transport Only
6
6
7
-
**Console tracing should be avoided with stdio transport**as console output interferes with MCP's stdio JSON-RPC communication.
7
+
**This server uses stdio transport exclusively.**Only OTLP exporters are supported for tracing.
8
8
9
-
**Transport-specific recommendations:**
10
-
11
-
-**stdio transport (default):** Use OTLP exporters only, avoid console tracing
12
-
-**SSE transport:** Console tracing is safe to use for development
13
-
14
-
The server automatically detects the transport type and adjusts logging behavior accordingly.
9
+
Console output is incompatible with stdio and will corrupt JSON-RPC communication. All diagnostic logging is disabled by default to ensure reliable operation.
15
10
16
11
## Features
17
12
@@ -56,14 +51,15 @@ The tracing system supports several configuration options through environment va
@@ -97,10 +93,6 @@ After restarting VS Code, you should see "Mapbox DevKit" appear in the GitHub Co
97
93
98
94
## Important Notes
99
95
100
-
### Stdio Transport Logging
101
-
102
-
The MCP DevKit Server uses stdio (standard input/output) for communication with VS Code. To prevent console logs from corrupting the JSON-RPC protocol, **you must set `MCP_LOGGING_DISABLE=true`** in the environment variables.
103
-
104
96
### Token Scopes
105
97
106
98
Your Mapbox access token must have the appropriate scopes for the tools you want to use. See the [main README](../README.md#tools) for required token scopes per tool.
@@ -128,8 +120,7 @@ Here's a complete `settings.json` example with the NPM version:
0 commit comments