npm @mhrj/mcp-agent-loopstdioupdated 1mo ago
The industry-standard persistent memory and state manager for long-running agentic workflows.
What can you do with agent loop mcp?
Agentic Loop Memory Server ♾️
The industry-standard persistent memory and state manager for long-running agentic workflows.
Enable any AI model—especially smaller ones with limited context windows—to function with the persistence of high-end models. This project works as a two-part ecosystem: an MCP Server for state management and an Agent Skill for orchestration.
🛠 Complete Setup (Required)
For the best experience, you must install both the orchestration skill and the MCP server.
1. Install the Skill
Install the agentic-loop skill into your AI agent (Codex, Claude Code, Cursor, Gemini CLI, GitHub Copilot, and other Agent Skills hosts):
npx skills add meharajM/agent-loop-mcp@agentic-loop -g -y
Preview the skill before activation:
gh skill preview meharajM/agent-loop-mcp agentic-loop
2. Configure the MCP Server
Add the following to your `mcp_config.json`:
{
"mcpServers": {
"agent-loop": {
"command": "npx",
"args": ["-y", "@mhrj/mcp-agent-loop"]
}
}
}
🌟 Why this approach is unique
Unlike passive memory tools, this is an Active State Manager. It monitors word counts to trigger compaction cycles and enforces a "Self-Healing Strategy" on every failure, preventing AI agents from getting stuck in mindless loops.
📂 Project Structure
src/: TypeScript source for the MCP server.skills/agentic-loop/SKILL.md: The instruction manual for the AI.build/: JavaScript artifacts.
📄 License
ISC
Install
Add agent loop mcp to your client. Pick the one you use.
claude mcp add mcp-agent-loop -- npx -y @mhrj/mcp-agent-loopcodex mcp add mcp-agent-loop -- npx -y @mhrj/mcp-agent-loopamp mcp add mcp-agent-loop -- npx -y @mhrj/mcp-agent-loop{
"mcpServers": {
"mcp-agent-loop": {
"command": "npx",
"args": [
"-y",
"@mhrj/mcp-agent-loop"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-agent-loop": {
"command": "npx",
"args": [
"-y",
"@mhrj/mcp-agent-loop"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp-agent-loop","command":"npx","args":["-y","@mhrj/mcp-agent-loop"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp-agent-loop": {
"command": "npx",
"args": [
"-y",
"@mhrj/mcp-agent-loop"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-agent-loop": {
"command": "npx",
"args": [
"-y",
"@mhrj/mcp-agent-loop"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-agent-loop": {
"command": "npx",
"args": [
"-y",
"@mhrj/mcp-agent-loop"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-agent-loop": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@mhrj/mcp-agent-loop"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-agent-loop": {
"command": {
"path": "npx",
"args": [
"-y",
"@mhrj/mcp-agent-loop"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @mhrj/mcp-agent-loopRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation18/25
- Maintenance16/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 45 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 1.0.3Latest | Mar 25, 2026 |
| 1.0.2 | Mar 15, 2026 |