In short:
ak-agentizewraps working code (a module, a function, an API) as a CLI, an MCP server or both, so AI agents can call it without changing current behavior. It tests each entry point and only publishes when you ask. It does not write a new server from scratch: that is whatak-mcp-builderis for.
Disclosure: I maintain AgentKit and have an affiliate relationship with it: the AgentKit link in this post is an affiliate link; buying through it gets you 30% off.
Summary
Use it when you have working code and want Claude Code, Cursor or a CI script to call it as a command or a tool. Not needed when there is no code yet and you want a new MCP server from scratch: use ak-mcp-builder.
flowchart LR
A["Existing code or API"] --> B["ak-agentize"]
B --> C["CLI"]
B --> D["MCP server"]
B --> E["Both, one shared core"]
C --> F["Ready report"]
D --> F
E --> F
F --> G["Publish, only when you ask"]
H["No code yet, need a new server"] --> I["ak-mcp-builder"]Four ideas it relies on when wrapping code:
| Concept | Question | Example |
|---|---|---|
| Agentization map | Which operations are exposed to agents, and what does each one touch? | A "create order" operation: inputs are customer name and item list, it writes to the DB, needs staff permission, and is checked with one test call over MCP. |
| Surface | Who will call it, and from where? | An agent on your machine calls over stdio. A teammate in Claude Code calls a remote server over Streamable HTTP, with sign-in. |
| Core and adapter | Where does the business logic live? | The create-order function stays where it is. The CLI and MCP only translate arguments, call that function, then format the result. |
| Ready is not published | Does done mean it is on npm or deployed? | The prompt does not mention publishing: you get a ready report. The prompt says "publish to npm": it checks the package installs and has a publish receipt. |
When designing, it groups several steps into one operation that matches what the agent needs, returns compact results, and errors say what to try next. Write operations get a dry run, delete operations need explicit confirmation.
Sample prompt for an MCP server on your machine:
/ak-agentize src/inventory --mcp
Outcome: Claude Code on my machine can call tools to check stock and place restock orders.
Constraints: run locally, open no external port.
Done when: both tools can be called from Claude Code, and bad input returns a clear message.| Flag | What it is for | Since ak |
|---|---|---|
--both, --mcp, --cli | Choose which surface to build | 1.0.0 |
--auto | Analyze, decide and build on its own | 1.0.0 |
--ask | Question you before building | 1.0.0 |
--ultra | 5 independent decision runs, pick the best | 2.13.0 |
--advice | A stronger model advises at key checkpoints | 2.13.0 |
--yagni | Cut what the outcome does not need | 2.8.0 |
Below is the detailed version: how it runs, 5 situations with prompts, each flag explained, change history by ak release, and common pitfalls. The detailed version and the interactive page are for subscribers. Your agent can also search them through the portal's MCP.
Opens when your account has subscriber access
This guide is for subscribers
Once your account has access, the full piece, the interactive visual and the agent call all open.
- Sign in or create a modernEngineer accountReading access belongs to your account email.
- Choose a plan on the pricing page1, 3 or 12 months, paid by VietQR bank transfer. Access opens about a minute after the money arrives.
- Or redeem a Facebook subscriber codePeople supporting the page on Facebook get an activation code by message each month.
Already a subscriber? Sign in to read.
Use this piece in your agent
Get an API keyCopy the text below and paste it into Claude Code, Codex or whichever agent you use. The agent reads the piece and checks it against the repo you have open.
Read "ak-agentize: wrap existing code as a CLI or MCP for agents" on modernEngineer and apply it to this repo.
1. Call the content_get tool of the modernengineer MCP server with locale "en", slug "ak-agentize". If the modernengineer MCP server is not connected, stop and walk me through connecting it from https://modernengineer.dev/en/mcp.
2. Summarize the main steps of the piece and point out which apply to this repo.
3. Propose concrete changes and ask me before editing any file.Connect MCP in Claude Code (once)
claude mcp add --transport http modernengineer \
https://api.modernengineer.dev/mcp \
--header "Authorization: Bearer <API key>"Reading the full piece over MCP needs an API key from a subscriber account or one that bought this guide. Without access, the agent only gets the opening.
- Version
- v1.0.0
- Updated
- 22/10/2026
- Licence
- All rights reserved
- Slug
- ak-agentize


