[DOCS] claude mcp add docs show incorrect argument order for --env flag (for stdio)
Documentation Type
Incorrect/outdated documentation
Documentation Location
https://code.claude.com/docs/en/mcp
Section/Topic
Option 3: Add a local stdio server
Current Documentation
_No response_
What's Wrong or Missing?
The MCP documentation shows this example:
claude mcp add --transport stdio --env AIRTABLE_API_KEY=YOUR_KEY airtable -- npx -y airtable-mcp-server
This fails with:
Invalid environment variable format: airtable, environment variables should be added as: -e KEY1=value1 -e KEY2=value2
Because -e/--env is a variadic option (<env...>), it consumes all subsequent positional arguments — including the server name — as environment variable values
Suggested Improvement
Correct command: Place the server name before the -e flags:
claude mcp add airtable -e AIRTABLE_API_KEY=YOUR_KEY -- npx -y airtable-mcp-server
Impact
Medium - Makes feature difficult to understand
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗