Skip to content

Commit 0c5090f

Browse files
committed
docs: add setting_sources documentation for project MCP configs
Clarify that by default the SDK does not read MCP servers from project settings files, and show how to enable this with setting_sources option.
1 parent edbb81d commit 0c5090f

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,25 @@ The config file should follow the MCP configuration format:
167167
}
168168
```
169169

170+
#### Using Project Settings
171+
172+
By default, the SDK **does not** read MCP servers from project settings files (like `.claude/settings.json`). This is intentional for isolation.
173+
174+
To use MCP servers configured in your project settings, enable setting sources:
175+
176+
```python
177+
options = ClaudeAgentOptions(
178+
setting_sources=["project"] # Read MCP servers from project settings
179+
)
180+
181+
# Or combine multiple sources
182+
options = ClaudeAgentOptions(
183+
setting_sources=["user", "project", "local"]
184+
)
185+
```
186+
187+
Available sources: `"user"` (global), `"project"` (repo-level), `"local"` (gitignored local settings).
188+
170189
### Custom Tools (as In-Process SDK MCP Servers)
171190

172191
A **custom tool** is a Python function that you can offer to Claude, for Claude to invoke as needed.

0 commit comments

Comments
 (0)