Skip to main content

Set up with your coding agent

One prompt sets up ByteAsk in the coding agent you already use: Context (C and C++ code intelligence over MCP), the Cloud Agent and the ByteAsk CLI, whichever you choose. Paste it into Claude Code, Codex, Cursor or another agent:

Set up ByteAsk (https://byteask.ai) for me.

Here are your instructions: https://byteask.ai/agent-guide.txt
Read them in full and follow them step by step.
Ask me what you need in one message, then do the whole setup yourself.
Never spend money without asking me first.

Your agent then follows the setup guide, which is written for it:

  1. It looks at what is there with one read-only command. Nothing is installed yet.
  2. It asks you one message of direct questions: which products (Context is selected; the Cloud Agent and the CLI are yours to add) and whether ByteAsk may index without asking. Setup is $0 on the Free plan; using the CLI and the Cloud Agent later draws usage credit. Prices are on byteask.ai/pricing.
  3. After your reply it installs with one script, https://byteask.ai/install.sh, after checking its SHA-256. Ask it for a dry run first if you want to see every change.
  4. It signs you in: a link and a code to approve in your browser, with one ByteAsk account.
  5. It checks each part, then tells you what is left for you (restart the agent, its MCP sign-in) and how to remove everything.

Everything below is the same setup by hand.

What it sets up in each agent​

AgentSetupWhat changes
Claude CodeFullThe MCP server for all projects, one hook script (two hooks in ~/.claude/settings.json) and an instruction block in ~/.claude/CLAUDE.md
CodexFullThe MCP server in ~/.codex/config.toml, the same two hooks in ~/.codex/hooks.json and the instruction block in ~/.codex/AGENTS.md
CursorBasicThe MCP server in ~/.cursor/mcp.json; the instruction text is printed for you to paste into Cursor's User Rules
Windsurf, VS Code, Zed, JetBrains and other MCP clientsBasic, by handA remote MCP server and the instruction text in the client's own rules

The hook asks ByteAsk where a change most likely belongs before the agent's first step, in a C or C++ git repository. The script writes only under ~/.byteask/ and the agent's own configuration, backs up every file it edits, and is idempotent: running it again changes nothing that is already right.

The setup script​

Download it once and check it. Its SHA-256 is listed under "Pinned files" at the end of the setup guide; if it differs, delete the file and stop.

d=$(mktemp -d) && curl -fsSL https://byteask.ai/install.sh -o "$d/install.sh" && echo "$d/install.sh"
sha256sum "$d/install.sh" # macOS: shasum -a 256 "$d/install.sh"

Run it with a dry run first, then for real:

sh "$d/install.sh" install --components context --agent claude-code --dry-run
sh "$d/install.sh" install --components context --agent claude-code
  • --agent claude-code|codex|cursor picks the agent.
  • --components context,agent,cli picks the products (agent is the Cloud Agent, which only prints its browser links; cli runs the CLI installer).
  • --allow-indexing lets the agent index your C and C++ repositories without asking each time.
  • sh install.sh help lists everything.

Linux and macOS. On Windows, use WSL.

Sign in​

  1. The hook key (Claude Code and Codex): run sh "$d/install.sh" login. Open the link it prints, sign in to ByteAsk, check the code and choose Allow. Then run sh "$d/install.sh" wait (it waits up to 5 minutes). The key is stored in ~/.byteask/context/hook.key and can only ask where a task's change belongs.
  2. The agent's own MCP sign-in.
    • Claude Code: restart it, type /mcp, select byteask, choose Authenticate and allow it in your browser.
    • Codex: run codex mcp login byteask, restart Codex, and when it shows "Hooks need review", trust the two ByteAsk hooks.
    • Cursor: Cursor Settings, MCP, find byteask, sign in and allow it.
  3. The CLI, if you chose it: sh "$d/install.sh" login --components cli --email [email protected], then click the sign-in link ByteAsk emails you.

Claude Code without the script​

mkdir -p ~/.byteask/context && chmod 700 ~/.byteask ~/.byteask/context
curl -fsSL https://byteask.ai/context/hook/v1/byteask-context-hook.py -o ~/.byteask/context/byteask-context-hook.py
sha256sum ~/.byteask/context/byteask-context-hook.py

The SHA-256 must be 905aaf7c04c3425d5eea96f73e25b47d85a8cc29c3edd766d05fa09bdba122da. If it differs, delete the file and stop. Then:

claude mcp add-json --scope user byteask '{"type":"http","url":"https://context.byteask.ai/mcp","alwaysLoad":true}'
python3 ~/.byteask/context/byteask-context-hook.py install
python3 ~/.byteask/context/byteask-context-hook.py login
python3 ~/.byteask/context/byteask-context-hook.py wait

If claude mcp get byteask already lists a server, run claude mcp remove --scope user byteask first. Then finish the MCP sign-in (above). The step-by-step page with what each change does is byteask.ai/context/setup.

Codex without the script​

Add the MCP server (Streamable HTTP) at the end of ~/.codex/config.toml:

# BEGIN ByteAsk
[mcp_servers.byteask]
url = "https://context.byteask.ai/mcp"
# END ByteAsk

Put the instruction text (below) in ~/.codex/AGENTS.md, or in ~/.codex/AGENTS.override.md when that file has text, because Codex then reads only that one. Run codex mcp login byteask and restart Codex. The two hooks are easiest with the script (--agent codex); without them, the instruction block still tells Codex to ask ByteAsk first.

Cursor without the script​

Add the server to ~/.cursor/mcp.json (keep your other servers):

{
"mcpServers": {
"byteask": { "url": "https://context.byteask.ai/mcp" }
}
}

Paste the instruction text (below) into Cursor Settings, Rules, User Rules. Then sign in from Cursor Settings, MCP. Cursor has no hook.

Other MCP clients​

In Windsurf, VS Code, Zed, JetBrains or any client with remote MCP support: add a remote MCP server named byteask with the URL https://context.byteask.ai/mcp (Streamable HTTP; the client signs in with OAuth in the browser), and add the instruction text to the client's global rules or instructions. Follow that client's own documentation for where each goes.

The instruction text​

The same for every agent:

<!-- byteask:start -->
## C/C++ repositories: ByteAsk
The `byteask` MCP server knows C and C++ code through the project's real build.
For a bug, crash, failing test or change request in a C or C++ repository: if
"ByteAsk Context ran find_code_for_task on this request" is already in your context,
start from its places. Otherwise your first action is `find_code_for_task` with my
request exactly as I wrote it, unless you already know the exact function and file
to change. If its first place fits, read those lines and edit; otherwise work as usual.
<!-- byteask:end -->

Cloud Agent​

Nothing is installed on your machine. Set it up in the browser at app.byteask.ai/welcome: install the ByteAsk GitHub App on the repositories it may work on (a GitHub organization admin approves it), then connect Slack or Jira. In Slack, the first @ByteAsk in a channel asks which repository that channel uses.

ByteAsk CLI​

--components cli runs the CLI installer after checking its pinned SHA-256. To install the CLI on its own, see Installation.

Check and remove​

sh "$d/install.sh" status
sh "$d/install.sh" uninstall --dry-run
sh "$d/install.sh" uninstall

status reports each part without printing secrets. uninstall removes only what setup added: in Claude Code the MCP server, the two hooks and the CLAUDE.md block (and it revokes the hook key); in Codex the marked blocks and hooks; in Cursor the byteask server entry (remove the User Rules text yourself). --agent limits it to one agent, and the CLI is removed only with --components cli. Backups (*.bak-byteask-*) stay next to the files that were edited. For the Cloud Agent, remove the GitHub App from your organization and disconnect Slack or Jira on your account page.

What leaves your machine​

  • In a C or C++ git repository, the hook sends each request you type (40 characters or more) and the repository's remote address to ByteAsk, before the agent starts, and adds ByteAsk's answer to the agent's context. Anywhere else it sends nothing. It never blocks the agent: after 15 seconds, or on any error, it adds nothing.
  • No code is uploaded until you approve indexing a repository. Indexing uploads that repository's source files to ByteAsk to build its index.
  • To rank where a change belongs, ByteAsk sends short excerpts of candidate code to a model provider (OpenAI) through its API.

Security details are in the Trust Center.