Show HN: Ask-human-mcp – zero-config human-in-loop hatch to stop hallucinations (masonyarbrough.com)
104 points by echollama 17 hours ago
While building my startup i kept running into the issue where ai agents in cursor create endpoints or code that shouldn't exist, hallucinates strings, or just don't understand the code.
ask-human-mcp pauses your agent whenever it’s stuck, logs a question into ask_human.md in your root directory with answer: PENDING, and then resumes as soon as you fill in the correct answer.
the pain:
your agent screams out an endpoint that never existed it makes confident assumptions and you spend hours debugging false leads
the fix:
ask-human-mcp gives your agent an escape hatch. when it’s unsure, it calls ask_human(), writes a question into ask_human.md, and waits. you swap answer: PENDING for the real answer and it keeps going.
some features:
- zero config: pip install ask-human-mcp + one line in .cursor/mcp.json → boom, you’re live - cross-platform: works on macOS, Linux, and Windows—no extra servers or webhooks. - markdown Q\&A: agent calls await ask_human(), question lands in ask_human.md with answer: PENDING. you write the answer, agent picks back up - file locking & rotation: prevents corrupt files, limits pending questions, auto-rotates when ask_human.md hits ~50 MB
the quickstart
pip install ask-human-mcp ask-human-mcp --help
add to .cursor/mcp.json and restart: { "mcpServers": { "ask-human": { "command": "ask-human-mcp" } } }
now any call like:
answer = await ask_human( "which auth endpoint do we use?", "building login form in auth.js" )
creates:
### Q8c4f1e2a ts: 2025-01-15 14:30 q: which auth endpoint do we use? ctx: building login form in auth.js answer: PENDING
just replace answer: PENDING with the real endpoint (e.g., `POST /api/v2/auth/login`) and your agent continues.
link:
github -> https://github.com/Masony817/ask-human-mcp
feedback:
I'm Mason a 19yo solo-founder at Kallro. Happy to hear any bugs, feature requests, or weird edge cases you uncover - drop a comment or open an issue! buy me a coffee -> coff.ee/masonyarbrough
superb_dev 15 hours ago
This site is impossible to read on my phone. Part of the left side of the screen is cut off and I can’t scroll it into view
tyzoid 14 hours ago
Completely blank for me on mobile (javascript disabled)
rfl890 13 hours ago
Switching to desktop mode fixed it for me
kbouck 12 hours ago
Rotate phone to landscape
multjoy an hour ago
lol, no
lobsterthief 14 hours ago
Same here
banner520 13 hours ago
I also have this problem on my phone
loloquwowndueo 16 hours ago
- someone sets up an “ask human as a service mcp” - demand quickly outstrips offer of humans willing to help bots - someone else hooks up AI to the “ask human saas” - we now have a full loop of machines asking machines
lordmauve 10 hours ago
Finally, the "AI" turns out to be 700 Indians. We now have the full loop of humans asking machines asking humans pretending to be machines. Civilisation collapses
franky47 4 hours ago
AI stands for Actual Indians.
kajkojednojajko 3 hours ago
olalonde 11 hours ago
I built this - but mostly as a joke / proof-of-concept: https://github.com/olalonde/mcp-human
aziaziazi 9 hours ago
Cool project! Naive question: does mechanical turk uses llm now?
TZubiri 15 hours ago
This is pretty much already possible in any economy, but quite a waste.
Not much is stopping you from buying products from a retailer and selling them at a wholesaler, but you'd lose money in doing so.
threeseed 13 hours ago
> an mcp server that lets the agent raise its hand instead of hallucinating
a) It doesn't know when it's hallucinating.
b) It can't provide you with any accurate confidence score for any answer.
c) Your library is still useful but any claim that you can make solutions more robust is a lie. Probably good enough to get into YC / raise VC though.
echollama 12 hours ago
reasoning models know when they are close to hallucinating because they are lacking context or understanding and know that they could solve this with a question.
this is a streamlined implementation of a interanlly scrapped together tool that i decided to open-source for people to either us or build off of.
geraneum 11 hours ago
> reasoning models know when they are close to hallucinating because they are lacking context or understanding and know that they could solve this with a question.
I’m interested. Where can I read more about this?
threeseed 10 hours ago
> reasoning models know when they are close to hallucinating because they are lacking context or understanding and know that they could solve this with a question
You've just described AGI.
If this were possible you could create an MCP server that has a continually updated list of FAQ of everything that the model doesn't know.
Over time it would learn everything.
xeonmc 2 hours ago
exclipy 11 hours ago
Would be great if it pinged me on slack or whatsapp. I wouldn't notice if it simply paused waiting for the MCP call to return
spacecadet 5 hours ago
Easy enough to do with smolagents and fastmcp, its 20 lines of code.
mgraczyk 16 hours ago
If you are answering these questions yourself, why not just add something like this to your cursor rules?
"If you don't know the answer to a question and need the answer to continue, ask me before continuing"
Will you have some other person answer the question?
bckr 15 hours ago
I’ve tried putting “stop and ask for help” in prompts/rules and it seems like Cursor + Claude, up to 3.7, is highly aligned against asking for help.
deadbabe 15 hours ago
Having another person answer the question is pretty much the obvious route this will go.
mgraczyk 15 hours ago
But then that means they are editing a markdown file on your computer? How is that meant to work?
I like the idea but would rather it use Slack or something if it's meant to ask anyone.
echollama 12 hours ago
ramesh31 13 hours ago
>If you are answering these questions yourself, why not just add something like this to your cursor rules?
What you are asking for is AGI. We still need human in the loop for now.
mgraczyk 12 hours ago
What I'm describing is a human in the loop. It's just a different UX, one that is easier to use and closer to what the model is trained to use.
ramesh31 2 hours ago
kordlessagain 3 hours ago
The same technique can be had by creating a "universal MCP tool" for the LLM to use if it thinks the existing tools aren't up to the job. The MCP language calls these "proxies".
kjhughes 16 hours ago
Cool conceptually, but how exactly does the agent know when it's unsure or stuck?
aziaziazi 9 hours ago
I had the same question reading your post:
> (problem description) your agent […] makes confident assumptions
> (solution description) when it’s unsure
I read this as a contradiction: in one sentence you describe the problem as an agent being confident while hallucinating and in the next phrase the solution is that the agent can ask you if it’s unsure.
You tool is interesting but you may consider rephrasing that part.
Groxx 16 hours ago
The same way it knows anything else.
So not at all, but that doesn't mean it's not useful.
kjhughes 15 hours ago
I'll try to give you credit for more than dismissing my question off-hand...
Yes, it may not need to know with perfect certainty when it's unsure or stuck, but even to meet a lower bar of usefulness, it'll need at least an approximate means of determining that its knowledge is inadequate. To purport to help with the hallucination problem requires no less.
To make the issue a bit more clear, here are some candidate components to a stuck() predicate:
- possibilities considered
- time taken
- tokens consumed/generated (vs expected? vs static limit? vs dynamic limit?)
If the unsure/stuck determination is defined via more qualitative prompting, what's the prompt? How well has it worked?
Groxx 15 hours ago
threeseed 13 hours ago
TZubiri 15 hours ago
So we are just pushing the issue to another, less debuggable layer. Cool.
echollama 12 hours ago
the reasoning aspect of most llms these days knows when its unsure or stuck, you can get that from its thinking tokens. It will see this mcp and call it when its in that state. Though this could benefit from some rules file to use it, although cursor doesn't quite follow ask for help rules, hence making this.
kjhughes 12 hours ago
Does all thinking end up getting replaced by calls to Ask-human-mcp then? Or only thinking that exceeds some limit (and how do you express that limit)?
ddalex 4 hours ago
Why wouldn't a rag-enabled ai be faster and better then humans at answering these documentation-grounded questions ?
rgbrenner 16 hours ago
Sounds similar to `ask_followup_question` in Roo
spacecadet 5 hours ago
If the model responds with an obvious incorrect answer or hallucination, start over. Rephrase your input. Consider what output you are actually after... Adding to original shit output wont help you.
conception 16 hours ago
What sort of prompt are you using for this?
kordlessagain 3 hours ago
The prompt is (mostly) built using the tool loads in the MCP server. In Python, the @mcp.tool() decorators provide the context of tool to the prompt, which is then submitted (I believe) with each call to the LLM.
throwaway314155 16 hours ago
Not certain that your definition of hallucination matches mine precisely. Having said that, this is so simple yet kinda brilliant. Surprised it's not a more popular concept already.
atoav 9 hours ago
I am running an electronics/medialab in an university, the amount of fires bad electronics advice from LLMs caused already is probably non-zero.
It is amazing how bad LLMs are when it comes to reasoning about simple dynamics within trivial electronic circuits and how eager they are to insist the opposite of how things work in the real world is the secured truth.