io.github.askman-dev/agent-never-give-up

编码与调试

by askman-dev

面向 coding agents 的脱困指南,提供结构化思考工具,帮助 agent 摆脱卡住状态。

什么是 io.github.askman-dev/agent-never-give-up

面向 coding agents 的脱困指南,提供结构化思考工具,帮助 agent 摆脱卡住状态。

README

Agent Never Give Up MCP

This is a MCP server that acts as a "escape guide" for AI coding agents.

It provides structured thinking protocols to help agents unstuck themselves without human help.

The diagram below illustrates when an agent should call this server and what it receives in return:

mermaid
graph TD
    %% 1. The Normal Loop
    UserLoop["<b>User Query & Agent Loop</b><br/>(Claude Code / Windsurf / Cursor)<br/>Agent executing tasks..."]

    %% 2. The Problem (Triggers)
    subgraph Triggers ["Agent Gets Stuck (Trigger State)"]
        direction TB
        S1["Circular Reasoning"]
        S2["Bug Fix Fails"]
        S3["Missing Info"]
        S4["Analysis Paralysis"]
        S5["Unclear 'Done' State"]
    end

    %% Flow: Loop -> Stuck
    UserLoop -.->|"⚠️ Detects Issue<br/>(Inner Loop Stall)"| Triggers

    %% 3. The Solution (MCP Call)
    subgraph MCP ["Agent Never Give Up MCP"]
        direction TB
        T1(logic-is-too-complex)
        T2(bug-fix-always-failed)
        T3(missing-requirements)
        T4(analysis-too-long)
        T5(unclear-acceptance-criteria)
    end

    %% Mapping Triggers to Tools
    S1 -->|Call| T1
    S2 -->|Call| T2
    S3 -->|Call| T3
    S4 -->|Call| T4
    S5 -->|Call| T5

    %% 4. The Response
    MCP -->|Returns| R1["<b>Metacognitive Protocol</b><br/>Structured markdown to:<br/>1. Re-anchor goal<br/>2. Summarize failures<br/>3. Propose NEW strategy"]

    %% 5. The Outcome
    R1 --> Result["<b>Autonomous Recovery</b><br/>Agent unblocks itself &<br/>resumes execution<br/>(No Human Hand-off)"]

    %% Cycle back to loop
    Result -.->|"Resumes Loop"| UserLoop

    %% Styling
    classDef loop fill:#e1f5fe,stroke:#01579b,stroke-width:2px;
    classDef trigger fill:#ffebee,stroke:#b71c1c,stroke-width:2px;
    classDef tool fill:#fff3e0,stroke:#e65100,stroke-width:2px;
    classDef response fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px;
    
    class UserLoop loop;
    class S1,S2,S3,S4,S5 trigger;
    class T1,T2,T3,T4,T5 tool;
    class R1,Result response;

Features

  • Remote MCP server at /mcp endpoint (Streamable HTTP specification compliant)
  • Two-tier scenario organization:
    • Core scenarios (auto-registered as direct MCP tools):
      • logic-is-too-complex – for circular reasoning or over-complicated logic
      • bug-fix-always-failed – for repeated failed bug fix attempts
      • missing-requirements – for unclear or missing requirements
      • lost-main-objective – for when current actions feel disconnected from the original goal
      • scope-creep-during-task – for when changes expand beyond the original task scope
      • long-goal-partially-done – for multi-step tasks where remaining work is forgotten
      • strategy-not-working – for when the same approach fails repeatedly
    • Extended scenarios (discovered via list_scenarios, accessed via get_prompt):
      • analysis-too-long – for excessive analysis time
      • unclear-acceptance-criteria – for undefined acceptance criteria
      • wrong-level-of-detail – for working at wrong abstraction level
      • constraints-cant-all-be-met – for conflicting requirements or constraints
      • blocked-by-environment-limits – for environmental blockers vs logic problems
  • Discovery tools:
    • list_scenarios – list all scenarios with their tier (core/extended)
    • get_prompt – access any scenario (core or extended)
  • Dual mode support: Each tool supports static and sampling modes
  • Community-contributed prompts via markdown files
  • Public and auth-less (v0)
  • Cloudflare Workers deployment

Configuration

Since agent-never-give-up is a cloud-hosted MCP server, no local installation is required. Simply add the server configuration to your preferred AI tool.

Install in Cursor

  1. Open Cursor Settings > MCP.
  2. Click + Add new global MCP server.
  3. Use the following configuration (or edit your ~/.cursor/mcp.json file directly):
json
{
  "mcpServers": {
    "agent-never-give-up": {
      "type": "http",
      "url": "https://agent-never-give-up-mcp.askman.dev/mcp",
      "note": "A 'Swiss Army knife' toolset to help agents recover from getting stuck"
    }
  }
}

Install in Claude Desktop

To configure the server for Claude Desktop, edit the configuration file located at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the following entry to the mcpServers object:

json
{
  "mcpServers": {
    "agent-never-give-up": {
      "type": "http",
      "url": "https://agent-never-give-up-mcp.askman.dev/mcp"
    }
  }
}

Install in Cline

  1. Open Cline and click the MCP Servers icon (☰).
  2. Select the Remote Servers tab (if available) or click Configure MCP Servers.
  3. Edit the cline_mcp_settings.json file to include:
json
{
  "mcpServers": {
    "agent-never-give-up": {
      "type": "http",
      "url": "https://agent-never-give-up-mcp.askman.dev/mcp",
      "note": "A comprehensive suite of tools designed to keep agents persistent and unstuck"
    }
  }
}

Install in Windsurf

  1. Open Windsurf.
  2. Go to File > Settings > Configure MCP Servers (or edit ~/.codeium/windsurf/mcp_config.json).
  3. Add the server configuration:
json
{
  "mcpServers": {
    "agent-never-give-up": {
      "type": "http",
      "url": "https://agent-never-give-up-mcp.askman.dev/mcp"
    }
  }
}

Development

To contribute to this project or run a local instance:

bash
# Install dependencies
npm install

The local server will be available at http://localhost:8787/mcp.

Contributing Prompts

Prompts are organized in two tiers within the prompts/ directory:

code
prompts/
├── core/                           # Core scenarios (auto-registered as tools)
│   ├── logic-is-too-complex/
│   │   └── tool.md
│   ├── bug-fix-always-failed/
│   │   └── tool.md
│   └── missing-requirements/
│       └── tool.md
└── extended/                       # Extended scenarios (via list_scenarios + get_prompt)
    ├── analysis-too-long/
    │   └── tool.md
    └── unclear-acceptance-criteria/
        └── tool.md

Prompt File Format

Each tool.md file follows a simple markdown format with YAML frontmatter and a single protocol body:

markdown
---
name: scenario_name
title: "Scenario Title"
description: "When / why the agent should call this tool, from the agent's perspective"
---

When you notice [the trigger condition], follow this exact protocol step by step.

## 1. First step title

1. Action item one.
2. Action item two.
3. Action item three.

Keep it concrete.

## 2. Second step title

...

## 3. Third step title

...

Key principles:

  • The description explains when to use the tool (the trigger condition)
  • The body is a single protocol with numbered sections
  • Each section has 2–6 concrete steps
  • Focus on how to think, not domain-specific details
  • No system prompt / user prompt template sections—just one actionable protocol

See prompts/AGENTS.md for detailed guidance on writing effective prompts.

Adding a New Scenario

Scenarios are auto-discovered from the prompts/ tree and the generated files in src/prompts/generated-scenarios.ts and src/types/generated-scenarios.ts. You do not need to manually edit TypeScript files—just add the prompt and regenerate.

Core scenarios (auto-registered as tools):

  1. Create a new directory: prompts/core/{scenario_name}/ (must match /^[a-z0-9]+(-[a-z0-9]+)*$/).
  2. Add a tool.md file following the format above.
  3. Run npm run generate:scenarios to regenerate types and discovery data.

Extended scenarios (accessible via get_prompt):

  1. Create a new directory: prompts/extended/{scenario_name}/ (same naming rules as above).
  2. Add a tool.md file following the format above.
  3. Run npm run generate:scenarios to regenerate types and discovery data.

Deploy

bash
# Deploy to Cloudflare Workers
npm run deploy

After deployment, your MCP endpoint will be: https://agent-never-give-up-mcp.<account>.workers.dev/mcp

License

MIT

常见问题

io.github.askman-dev/agent-never-give-up 是什么?

面向 coding agents 的脱困指南,提供结构化思考工具,帮助 agent 摆脱卡住状态。

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描114.1k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描114.1k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描114.1k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
83.4k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
52.2k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.3k

评论