Commit 8d76ced
committed
fix: auto-allow MCP tools via canUseTool permission callback
The dontAsk permission mode blocks MCP tools because they aren't
'pre-approved'. Added canUseTool callback that auto-allows tools from
configured MCP servers (mcp__<server>__<tool> prefix) while denying
other unpermitted tools. Built-in tools (Read, Edit, Bash, etc.) that
dontAsk auto-approves won't trigger this callback.1 parent 2534429 commit 8d76ced
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
145 | 150 | | |
146 | 151 | | |
147 | 152 | | |
| |||
199 | 204 | | |
200 | 205 | | |
201 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
202 | 219 | | |
203 | 220 | | |
204 | 221 | | |
| |||
0 commit comments