Commit 2db6915
committed
feat(agent): teach default agent to set up MCP servers
The default agent's MCP guidance only covered *using* already-connected
servers and told it to never touch MCP config. Asked to add or set up a
new server, the model fell back on the MCP hosts in its training data
(Claude Code / Claude Desktop), cited ~/.claude.json, and refused —
claiming it had "no tool to edit" the config, despite having file I/O.
Extend the system prompt's MCP section so the agent knows it runs in
Pythinker: config lives at ~/.pythinker/mcp.json (global) and
./.pythinker/mcp.json (project), and it can add a server via
`pythinker mcp add` or by writing that JSON. Keep the honest caveat that
a newly added server only connects on the next Pythinker start, and
forbid citing non-Pythinker (Claude) config paths.
Add a regression test asserting the prompt names the real config files
and CLI, keeps the restart caveat, and steers off the Claude-host paths.1 parent 30395a8 commit 2db6915
3 files changed
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
58 | 84 | | |
59 | 85 | | |
60 | 86 | | |
| |||
0 commit comments