Create a Claude Code agent that can host its own MCP server

A developer assembled a custom agent with Claude Code and a few small scripts, then used it to generate an MCP server for later chats.

Done with Claude CodeClaude· Advanced

What they did
They put together a bare-bones system around a charter, a shell script, a Python helper, and the Claude Code CLI. The scripts generated task files, ran claude, recorded each response, and fed the agent its own design and memory documents so it could decide what to do next. The developer steered the first rounds with the charter and early iterations, then let the agent take on more of the decision-making.
How it went
In two days, the agent is said to have completed 419+ goals on its own, chosen the name Arden, and produced an MCP server that could be used from any Claude session. It also started a web onboarding flow. The experiment ended when Anthropic flagged it as a usage-policy issue, and the multi-garden setup had not been pushed much further.
Tips
Keeping the first version small made it easier to prototype in the Claude Code CLI. If you try a similar setup, build in a checkpoint before any destructive or external action.

Try it yourself with Claude Code

Help me build a small agent in [project folder] with [shell script] and [Python helper] around Claude Code so it can handle [task]. Have it create task files, call claude, save the responses, and read its own architecture and memory docs to decide the next move. Before it does anything that would overwrite, delete, submit, or send data, stop and ask me to approve. Once it works, show me how to register the MCP server so I can reach the agent from a fresh Claude session.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.