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.
- 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.
Related agent uses
Test an iOS app and collect bugs automatically
Use Claude Code to drive an iOS app through its accessibility tree, visit screens, and return a structured bug report.
Keep coding in batches while Claude works ahead
They paired ongoing app testing with Claude-generated edits, moving from one round of fixes to the next without waiting around.
Move WordPress posts into MDX files
Pauline used Claude Code to pull a WordPress archive into MDX and sort it into year folders.
Automate a self-hosted stack on your own hardware
Jordan Fulghum let Claude Code configure and run several home services on a Beelink mini PC.
Build a lean skill layer from CLI help output
A developer swapped token-heavy Jira and GitLab MCPs for Markdown-based skills generated from the Atlassian and GitLab CLIs.
Automate a second check on Claude Code replies
They built Sage to forward Claude Code’s answers to Codex so they could review another model’s take without manual copy-pasting.