⌨️--mcp-config Flag
Also known as claude --mcp-config
It loads MCP servers for one session from JSON.
Think of it like
It is like you bring more toys to a friend's house. They are just for today.
Example
Emma's CI job needs a ticket server that no developer has set up. The job passes it with --mcp-config, so it is there for that run only.
Why it matters
A run can bring the servers it needs without touching anyone's saved setup.
Definition
Example code
bash
claude -p --mcp-config ./ci-mcp.json "Check the open tickets"Common mistake
Key takeaways
- 1Files or strings. JSON.
- 2Adds to yours. Not instead.
- 3Waits to connect. With -p.