Agent Afk
MCP server by griffinwork40 Verified · npm:agent-afk
Agent AFK is an open-source coding agent harness that can run long tasks unattended and text you when they finish. It works with any model provider, including local models. It suits developers who want to change how their agent decides what to do.
Install Agent Afk
Built from the published package, never by AI.
claude mcp add agent-afk -- npx -y agent-afkRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"agent-afk": {
"args": [
"-y",
"agent-afk"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"agent-afk": {
"args": [
"-y",
"agent-afk"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"agent-afk": {
"args": [
"-y",
"agent-afk"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add agent-afk -- npx -y agent-afk{
"mcpServers": {
"agent-afk": {
"args": [
"-y",
"agent-afk"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add agent-afk npx -y agent-afkGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the agent-afk block.
About
Agent AFK is an autonomous coding agent that runs locally from the terminal. You start a task, leave it running, and it builds the feature, checks its own work, and can send a Telegram message when it is done. Each run writes a trace of tool calls, gate decisions, subagent activity, and cost, which you can print with afk trace show.
The tool runs as a REPL, a one-shot chat command, a headless daemon, or a Telegram bot, and all four share one memory store under ~/.afk/. Memory includes a hot memory file injected into each session and a searchable fact archive. The project is open source, and the source says it works with any subscription or model provider, including local models. It is aimed at developers who want to own the agent loop rather than rely on a closed default agent.
Written from the project's README and checked against it.
Tools it gives your assistant
memory_searchRuns full-text search across stored facts and saved procedures during a session.memory_updateWrites or supersedes a fact in the archive, or overwrites hot memory.procedure_writeSaves a reusable step-by-step workflow as a named markdown file.send_telegramSends a Telegram message, for example when work reaches a terminal state.Bash, file ops, web fetch, grep/globGives the REPL full tool access for running commands, editing files, and searching.SubagentsDispatches subagents, including background jobs whose results return to the model.
What you need
- Node.js 22.22.2 to 22.x, 24.15 to 24.x, or 26+ (23.x and 25.x are excluded)
- A model provider key, or an existing Claude Code or Codex login
- A Telegram bot token, only for the Telegram features
Try asking
- Start an afk task to build a feature and text me when it is done
- Use memory_search to find past decisions about this project's file layout
- Save this workflow as a procedure with procedure_write
Good to know
- pnpm 10+ blocks build scripts by default, so run pnpm approve-builds -g after install
- Codex-hosted app connectors and TOML MCP server loading are not imported
- On Linux, the daemon must be restarted after every upgrade
Security check
B- Runs a script automatically when the package is installedIn
package.json:"postinstall":
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to Agent Afk
All alternatives →Oh My Posh Validator is listed as an MCP server, but the source is the README for oh-my-posh, a cross platform prompt theme engine. It does not describe an MCP server, tools, or schema validation.
Sim is a workspace for building, deploying and managing AI agents and workflows. Its MCP server lets Claude, Claude Code, Codex or another MCP client manage workspaces, workflows, tables, knowledge bases, files and logs.
Omnara deploys durable AI agents on any model and any machine. It is an open-source, self-hostable managed agent platform under Apache 2.0, with a REST API, TypeScript SDK, CLI, and MCP server.
Strata is an MCP server from Klavis AI for progressive tool usage, described as a way to optimize the AI agent's context window. The repository is deprecated, but it remains public for reference and for local or hosted use.
VoiceMode is an MCP server that adds voice conversations to Claude Code and other MCP capable agents. It uses speech-to-text and text-to-speech. It suits people whose hands or eyes are busy.
Gives an AI agent access to the skills, plugins, MCP connections, and Google Workspace and Microsoft 365 capabilities assigned to you by your OpenWork organization, through one OAuth MCP URL. Intended for people and teams who want to reuse the same setup across agents, tools, and machines.
Compare with Oh My Posh Validator, Sim or Omnara
Agent Afk: common questions
Does Agent AFK send my code or prompts to the developer?
The source says there is no analytics or remote telemetry. Prompts, code, and usage go only to the model provider you configure. Local telemetry is stored as JSONL under ~/.afk/ and can be read or deleted.
Can Agent AFK run with local models?
Yes. The source says you can point the local model slot at Ollama, LM Studio, or any OpenAI-compatible shim using AFK_MODEL_LOCAL and AFK_MODEL_LOCAL_BASE_URL.
Does Agent AFK keep memory between sessions?
Yes. Memory is stored locally under ~/.afk/state/memory/ and is shared across the REPL, chat, daemon, and Telegram surfaces.
How do I install Agent Afk?
In Claude Code run claude mcp add agent-afk -- npx -y agent-afk. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Agent Afk the official server?
Agent Afk is published by npm:agent-afk from its verified domain in the official MCP Registry.
Is Agent Afk free?
The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.
Is Agent Afk safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality B. Security check: grade B (runs a script automatically when the package is installed). Review the code before you install. How grades work.
What are alternatives to Agent Afk?
Similar MCP servers: Oh My Posh Validator, Sim, Omnara, strata.
Does Agent Afk work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
