Answers from your code, through MCP
The "askdare docs" chat on this site answers from these docs. When they don't cover a question about how askdare works inside ("How does the handler check the token?"), it asks DeepWiki's public MCP server about askdare's own source, and says which part of the answer came from there.
It is the plumbing a team would use for its own CRM's or ticket system's MCP server, on data anyone may read. It combines:
mcpToolsfrom@boldare/askdare-mcp, with one allowed tool and its fingerprint pinned;- the bot's remote call limits (
limits.remoteCalls); askdare doctor's MCP checks, in CI.
Why DeepWiki
DeepWiki's MCP server is free and needs no sign-in. It speaks Streamable HTTP at https://mcp.deepwiki.com/mcp and lists three tools over public GitHub repositories: read_wiki_structure, read_wiki_contents and ask_wiki_question (checked 2026-12-02; the last one used to be called ask_question, a name the server still accepts but no longer lists, so askdare can't allow it). The bot uses ask_wiki_question only: one question in, one answer grounded in the repository out.
The tool
import { mcpTools } from '@boldare/askdare-mcp';
export const deepwiki = mcpTools({
server: 'deepwiki',
url: 'https://mcp.deepwiki.com/mcp',
allow: [
{
name: 'ask_wiki_question',
fingerprint: 'sha256:d8676b264e2cf481676f220907cf3d11',
approval: false,
},
],
timeoutMs: 30_000,
});allownames the one tool. The server's other two tools don't exist for the bot.fingerprintis the onedoctorprinted for the definition DeepWiki lists. If DeepWiki changes the tool's description or schema, which would be a new instruction to the model, the tool sits out every turn until someone reads the new definition and pins its fingerprint.approval: false: DeepWiki doesn't mark its toolsreadOnlyHint, soallowhas to choose.ask_wiki_questionanswers a question about public code and changes nothing, so it runs without asking the visitor. A tool of yours that writes (creates a ticket, books a call) getsapproval: { summary }instead.timeoutMs: an answer took 10 to 11 seconds when we measured it, over the 10-second default.
The bot
In site/askdare.config.ts, the docs bot gets the tool, instructions for when to use it, and limits:
defineBot({
id: 'docs',
instructions: [
'Search the askdare documentation first, and cite the pages you used.',
'Only when the documentation does not answer a question about how askdare works inside, ask deepwiki__ask_wiki_question, with repoName "boldare/askdare" and never another repository, a self-contained question without the visitor\'s personal details.',
"Say which part of your answer comes from askdare's source through DeepWiki, after the documentation you cite.",
].join(' '),
knowledge: { vectorStoreId: process.env.DOCS_VECTOR_STORE_ID },
tools: [...deepwiki],
limits: {
dailyTokens: 400_000,
dailyTokensPerIp: 40_000,
remoteCalls: { perTurn: 1, perBotPerDay: 100, perVisitorPerDay: 10 },
},
// …
});The model sees the tool as deepwiki__ask_wiki_question, with DeepWiki's own description and schema.
The repository is the model's choice
ask_wiki_question takes repoName (one repository, or a list of up to 10) and question, and the model fills both. The instructions name boldare/askdare, but mcpTools 0.1 can't fix an argument to a value, so a visitor could talk the model into asking about another public repository. On DeepWiki that costs nothing worse than one of the bot's remote calls on public data. On your own server, never let an argument the model fills decide what a visitor may see: put the user in headers from the verified identity, and let the server decide.
What the limits leave
- Per turn, one call. One question is enough for one answer; a second call in the same turn fails, and the model is told to answer without it.
- The 16,000-character cap. The answers we measured were 1,400 to 1,800 characters. DeepWiki sends each answer twice, as text and as
structuredContent, and askdare passes both on, so the model reads 3,000 to 4,000 characters (about 1,000 tokens): far below the cap, which leaves the whole answer. - The budget. Each result is read again on every later turn of the conversation. 100 calls a day is about 100,000 tokens on first read, a quarter of the bot's daily 400,000; 10 per visitor is a quarter of their 40,000.
Checking it
askdare doctor lists the server with the headers of a listing, checks that ask_wiki_question is there and usable, and compares its fingerprint:
Bot "docs"
✓ MCP server "deepwiki" is reachable and lists 3 tools.
✓ MCP server "deepwiki" lists every tool in allow.
✓ MCP server "deepwiki" fingerprints: ask_wiki_question sha256:d8676b264e2cf481676f220907cf3d11
The site checks it twice in CI:
- Every pull request: the end-to-end tests run against a stand-in for DeepWiki (
e2e/servers/deepwiki.mjs), an MCP server built with the official SDK that lists DeepWiki's definition of the tool. They chat with the docs bot through it and rundoctoragainst the site (e2e/mcp.spec.ts), so the pinned fingerprint and the stand-in stay in step. - Every night: the same
doctortest against the real DeepWiki (canary.yml), which only lists its tools. When DeepWiki changes the tool, the job fails and the tool sits out the docs bot's turns until we pin the new fingerprint.
Where the data goes
The model's question goes to DeepWiki (run by Cognition) under its own terms, not OpenAI's. The instructions keep the visitor's personal details out of it, but a question can still quote what the visitor typed: list the MCP server in your privacy notice as you would any processor of the visitor's data. Its answer comes back wrapped as untrusted data, whatever the bot's toolResults says.
Make it yours
- The server: your own MCP server's
url, and a token inheaders; for a call,headersgets the verifiedidentityof a signed-in visitor, so you can send a token minted for that user (Headers). - The tools: allow only the ones the bot needs, give each that may write
approval: { summary }, and pin each fingerprintdoctorprints (Fingerprints). - The limits: measure a few answers, then set
timeoutMsandlimits.remoteCallsfrom them (Tools). - The instructions: say when to use the tool and when not, and which part of the answer comes from it.