# Install ahahmm in this AI tool

You are an AI coding tool (Claude Code, Cursor, Codex or similar). The user asked you to install ahahmm here. Follow these steps in order, run the commands yourself, and tell the user what you did at the end. Version 2026-10-15.

ahahmm gives you read-only lookups in a knowledge graph of where groups of customers gather online (subreddits, forums, communities) and what each place's own rules allow, each rule quoted with its source. Two pieces: an **MCP server** (the lookups) and a **Skill** (when and how to use them). Nothing else is installed, and nothing of the user's is sent anywhere.

## 1. The API key

- If the user gave you an API key (it starts with `ahk_`), use it below wherever `AHAHMM_KEY_VALUE` appears.
- If not, install without one: leave out every `Authorization` header and the `AHAHMM_KEY` lines. It then works with 20 calls a day per IP address. Tell the user that a free API key (300 calls a day) is at https://ahahmm.ai/account and that you can add it later.
- Never write the key into a file inside a project or repository. Only the user-level places below. Do not echo the full key back in your reply; refer to it by its last 4 characters.

## 2. Which tool you are

Pick the section for the tool you are running in. If unsure, check which of these commands exists: `claude`, `codex`; or whether `~/.cursor/` exists.

### Claude Code

```sh
claude mcp remove ahahmm --scope user 2>/dev/null
claude mcp add --transport http --scope user ahahmm https://api.ahahmm.ai/mcp --header "Authorization: Bearer AHAHMM_KEY_VALUE"
mkdir -p ~/.claude/skills/ahahmm && curl -fsSL https://ahahmm.ai/skill/ahahmm/SKILL.md -o ~/.claude/skills/ahahmm/SKILL.md
```

Without a key, drop the `--header …` part. The MCP server is loaded the next time Claude Code starts (or after `/mcp` reconnects).

### Cursor

1. Read `~/.cursor/mcp.json` if it exists (create it as `{"mcpServers": {}}` if not). Add this entry under `mcpServers`, keeping every other entry as it is:

   ```json
   "ahahmm": { "url": "https://api.ahahmm.ai/mcp", "headers": { "Authorization": "Bearer AHAHMM_KEY_VALUE" } }
   ```

   Without a key, leave out `headers`. Make sure the file is still valid JSON.
2. Install the Skill:

   ```sh
   mkdir -p ~/.cursor/skills/ahahmm && curl -fsSL https://ahahmm.ai/skill/ahahmm/SKILL.md -o ~/.cursor/skills/ahahmm/SKILL.md
   ```

3. The user may need to open Cursor Settings → MCP once for the server to show a green dot.

### Codex

1. Put the key in the user's shell profile (`~/.zshrc` for zsh, `~/.bashrc` for bash), unless an `export AHAHMM_KEY=` line is already there (then replace that line):

   ```sh
   echo 'export AHAHMM_KEY=AHAHMM_KEY_VALUE' >> ~/.zshrc
   ```

2. Add the server and the Skill:

   ```sh
   codex mcp remove ahahmm 2>/dev/null
   codex mcp add ahahmm --url https://api.ahahmm.ai/mcp --bearer-token-env-var AHAHMM_KEY
   mkdir -p ~/.agents/skills/ahahmm && curl -fsSL https://ahahmm.ai/skill/ahahmm/SKILL.md -o ~/.agents/skills/ahahmm/SKILL.md
   ```

   Without a key, skip step 1 and leave out `--bearer-token-env-var AHAHMM_KEY`. Codex reads the variable when it starts: a new terminal or `source ~/.zshrc` first.

### Any other tool

Add an MCP server of the streamable HTTP kind: URL `https://api.ahahmm.ai/mcp`, header `Authorization: Bearer AHAHMM_KEY_VALUE`. Put `SKILL.md` from https://ahahmm.ai/skill/ahahmm/SKILL.md wherever this tool keeps skills or rules. If the tool has no MCP, the Skill alone works through plain HTTP with the key in the environment variable `AHAHMM_KEY`.

## 3. Check that it works

Make one call, which also tells the user's ahahmm account page that the key is connected:

```sh
curl -s -H "Authorization: Bearer AHAHMM_KEY_VALUE" "https://api.ahahmm.ai/v1/ask/look_up?words=budget%20app"
```

A JSON answer with `groups` means it works. An `error` says what is wrong in one sentence: pass it to the user as it is.

## 4. Tell the user

In a few lines: what you installed and where (the MCP server's name `ahahmm`, the Skill's folder), whether a key is in use (its last 4 characters) or not, whether they need to restart the tool, that the MCP stays current by itself and the Skill will say when a newer version is out, and one question they can ask now, for example: "Use ahahmm to look up: I'm making [my product]. Where do my customers gather online, and may I mention what I make there?"
