brave-answers-mcp: Instructions file for Codex

AGENTS.md

brave-answers-mcp AGENTS.md is an instructions file for Codex, OpenCode from nazerim/brave-answers-mcp. It costs 749 tokens per session, scanned A, original, MIT.

A set of project instructions for brave-answers-mcp, a TypeScript server that submits research questions to the Brave Answers API and returns cited answers. It covers building, testing, running, secrets, cost, and latency.

In plain words
What is it for?
Use it when changing or running brave-answers-mcp, including its offline parser tests or its live end-to-end check.
Why use it?
It helps agents build and test the server correctly while keeping the Brave API key out of code, logs, and commits.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: positional $N argument; mentions OpenCode.

This is nazerim/brave-answers-mcp's own configuration. It tells Codex and OpenCode how to work on brave-answers-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything brave-answers-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to nazerim/brave-answers-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/nazerim/brave-answers-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/nazerim/brave-answers-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for brave-answers-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/nazerim/brave-answers-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/nazerim/brave-answers-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/nazerim/brave-answers-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/nazerim/brave-answers-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for brave-answers-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/nazerim/brave-answers-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/nazerim/brave-answers-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 749 This file is loaded in full into every session.
When invoked 749 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00749 $0.00749
Opus 5.5 $0.00300 $0.00300
Sonnet 5.5 $0.00150 $0.00150
Haiku 4.5 $0.00075 $0.00075

Measured 2mo ago against content hash 45e1242c4817, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

brave-answers-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 65 lines

How it starts

The opening of the file, as written. The whole thing — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.

brave-answers-mcp

TypeScript MCP server (stdio) for the Brave Answers API — async research submit/status/result + cited one-shot answers. Full docs: README.md; resume map, cost ledger, and open items: HANDOFF.md.

Build / test / run

npm install
npm run build        # tsc → dist/  — rebuild after ANY src/ change
npm run test:parser  # offline SSE parser unit tests (no API calls)
node dist/smoke.js   # LIVE end-to-end: tool listing + one real call (~$0.05)

There is no test runner — test:parser executes node dist/test-parser.js, so it always tests the last build, not the current sources. Order matters: build → test:parser. There is no lint, formatter, or typecheck step beyond tsc itself (it typechecks during build).

The MCP speaks stdio; dist/index.js is what hosts launch. A running host (opencode) keeps the pre-restart build in memory — restart the host after rebuilding to pick up changes.

Secrets

  • API key = BRAVE_ANSWERS_KEY env var (Brave Answers plan, billed separately from Brave Search). Never print, commit, or log it.
  • smoke.ts and any test client MUST pass env: explicitly — the MCP SDK's StdioClientTransport sanitizes child env by default (inherits only HOME/LOGNAME/PATH/SHELL/TERM/USER); forward TMPDIR too or raw SSE tees land in /tmp/brave-answers-mcp/ instead of the shell's $TMPDIR.

Cost & latency

Every API call costs real money (Answers plan): simple ~$0.05, research ≈ $0.07 × queries run (narrow ~$0.07, broad $0.77+). Do not call the API in loops or without need; test:parser is the zero-cost test path. See README cost model.

Research jobs are long-running (~90–300s; second budgets are SOFT, not walls): research_submit returns immediately — never block or wait on it. End the turn, then poll research_status and fetch research_result in a LATER turn once completed. Simple answers (~2–30s) is safe within one turn.

Conventions

  • Source of truth for API params/tag formats: references/official-brave-skills/answers-SKILL.md (pinned from brave/brave-search-skills). Re-fetch from upstream rather than editing the pinned copy.
  • Raw SSE evidence lives in artifacts/sse/ (named by research_id / uuid); add new probe files with an artifacts/README.md row.
  • Display normalization (citation dedup by URL, <answer> unwrap, progress collapse) is intentional and tested in src/test-parser.ts — keep tests in lockstep with parser changes.
  • Keep dist/ and node_modules/ git-ignored; commit only sources, docs, lockfile, and artifacts.

Read the full file on GitHub · 65 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 65 lines · 749 tokens per session scan A 45e1242c4817

Subscribe to this mod's changes

brave-answers-mcp AGENTS.md is an instructions file published in the GitHub repository nazerim/brave-answers-mcp (0 stars, last pushed 2mo ago), licensed MIT. It adds 749 tokens to every session, about $0.0030 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

brave-answers-mcp AGENTS.md compared with instructions from other repositories

brave-answers-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
brave-answers-mcp AGENTS.mdnazerim/brave-answers-mcpInstructions file02mo agoMITA749Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode