Free key, no card · Two minutes · Claude Code, Cursor, Windsurf, Cline, Continue
95.10% on LongMemEval · Guard included on every plan

Give Your Coding Assistant Memory in Two Minutes

One key, one command, one restart. After that your coding assistant loads what it knows about the project at the start of every session, saves what it learns as it works, and keeps the rules you set. Switch editors or machines and the memory comes with you. Every command and tool name below is from the cogmemai-mcp README.

Step 1: Get a Free Key

One link, no card. Register at hifriendbot.com/register/?from=developer and copy the key from your dashboard. It starts with cm_. Every mode needs it, including Local mode, where it works as a license key and your data never leaves your machine.

Step 2: Run the Setup Wizard

Pick a mode (Cloud is recommended), paste the key when asked, and the wizard verifies it, adds the MCP server to your coding assistant, and installs the compaction-recovery and Guard hooks in ~/.claude/settings.json. Works in PowerShell, bash and zsh.

1

Local install (recommended)

npx cogmemai-mcp@latest setup

Already have the key in your clipboard? npx cogmemai-mcp setup cm_your_api_key_here skips the prompt. Expected at the end: the key verified, the server added, the hooks installed, and a note to restart.

2

Or zero install: the remote endpoint

Endpoint:  https://hifriendbot.com/mcp/
Auth:      Bearer cm_your_api_key_here   (or sign in)

No npm, no config files, no Node.js. Add the endpoint to any MCP client that speaks Streamable HTTP. Clients that support OAuth 2.1 (claude.ai, Claude Desktop, Cursor and others) can skip the key: the endpoint sends you to a CogmemAi sign-in page and the client gets its own token.

3

Check it

npx cogmemai-mcp verify

Expected: the connection succeeds and your tier and usage are printed.

Step 3: Restart and Test the Memory

Restart your coding assistant so it picks up the new server. Then run this two-session test.

01

Session one: tell it something

Remember that this project deploys
with rsync to the staging box first,
never straight to production.

Expected: the assistant calls save_memory and confirms what it stored. Phrase it as a rule ("never ...") and it can call save_rule instead, which surfaces in every session and is enforced by Guard.

02

Session two: ask what it knows

What do you remember about
how this project deploys?

Expected: at the start of the new session the assistant calls get_project_context and loads the top memories for this project; for the question it calls recall_memories and answers with the rsync-to-staging fact, citing it as a memory.

03

Then stop thinking about it

From here on, saving is automatic: context is captured before a compaction and restored after it, and facts you state while working are saved without being asked. Memories are scoped per project by git remote, with global ones for your own preferences.

Step 4 (Optional): Install a Rule Pack

Forty DevSecOps rules in plain English, installed as memories your assistant cannot ignore. Read the pack first, then install it for this project (add --global for every project).

1

Read, then install

npx cogmemai-mcp rules show devsecops
npx cogmemai-mcp rules install devsecops

Expected: the rules are listed, then installed, with any you already hold skipped. npx cogmemai-mcp rules list shows the other packs (aws, azure, gcp, migrate).

2

What Guard does with it

With the hooks from Step 2 in place, Guard judges every shell command against those rules before it runs, with no model call, so git push --force origin main or curl ... | bash is denied with the rule quoted as the reason, and the way forward is to run it yourself or remove the rule. Details at /guard/.

Other Editors

The wizard configures Claude Code. For the rest, paste one block into the config path shown and restart. Same key, same memory.

Cursor

~/.cursor/mcp.json

{
  "mcpServers": {
    "cogmemai": {
      "command": "npx",
      "args": ["-y", "cogmemai-mcp"],
      "env": { "COGMEMAI_API_KEY": "cm_your_api_key_here" }
    }
  }
}

Cursor Settings, then MCP, then Add new MCP server, or edit the file directly. Restart Cursor; the tools appear in agent mode.

Windsurf

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "cogmemai": {
      "command": "npx",
      "args": ["-y", "cogmemai-mcp"],
      "env": { "COGMEMAI_API_KEY": "cm_your_api_key_here" }
    }
  }
}

Windsurf Settings, then Cascade, then MCP, then Add Server, or edit the file directly. Restart Windsurf; the tools work with Cascade in agent mode.

Cline (VS Code)

Cline MCP Settings

{
  "cogmemai": {
    "command": "npx",
    "args": ["-y", "cogmemai-mcp"],
    "env": { "COGMEMAI_API_KEY": "cm_your_api_key_here" }
  }
}

VS Code, then the Cline extension, then MCP Servers (gear icon), then Edit MCP Settings. Cline detects the new server; toggle it on and approve the tools when prompted.

Continue

~/.continue/config.yaml

mcpServers:
  - name: cogmemai
    command: npx
    args: ["-y", "cogmemai-mcp"]
    env:
      COGMEMAI_API_KEY: cm_your_api_key_here

VS Code, then the Continue extension, then the gear icon to edit config.yaml. Reload the VS Code window; Continue picks up the tools automatically.

Guard for these editors: npx cogmemai-mcp guard shell-install makes every bash -c and zsh -c on the machine hand its command to Guard first, whichever tool opened the shell.

Troubleshooting

Four things that go wrong on a first run, each with the one command that shows the cause.

Key not found or rejected

Run npx cogmemai-mcp verify. It tests the connection and shows your usage. The key starts with cm_ and goes in COGMEMAI_API_KEY (the wizard writes it for you). Copy it again from your dashboard at /developer/ if verify fails; a key pasted with a trailing space or a missing character is the usual cause.

The server is not listed in the assistant

In Claude Code run claude mcp list. If cogmemai is missing, run npx cogmemai-mcp setup again or add it by hand with claude mcp add cogmemai cogmemai-mcp -e COGMEMAI_API_KEY=cm_your_api_key_here --scope user. A per-project .mcp.json only applies inside that folder. In Cursor, Windsurf, Cline and Continue the server appears after a restart or window reload; check the config path shown in the cards above.

Hooks are not firing

Run npx cogmemai-mcp guard status. It lists the rules cached for this project and the verdict counts so far. If nothing is installed, run npx cogmemai-mcp guard install, which adds the PreToolUse and Stop hooks to ~/.claude/settings.json, then restart the assistant. Test without running anything: npx cogmemai-mcp guard test "git push --force origin main". Other tools get the same guard at the shell with npx cogmemai-mcp guard shell-install. Guard fails open, so a broken hook never blocks you; it just stops guarding.

It saved nothing when I asked it to remember

Check that the server is listed (above) and that its tools are enabled in the client. Then ask directly: "Use save_memory to store that ...". In a new session the assistant calls get_project_context first; if it did not, ask it to. Memories are scoped to the project by its git remote, so a folder with no git remote is its own project.

Memory That Keeps Your Rules

The free tier is enough to run this guide and keep going. Guard, rule packs, intent and review are included on every plan. The REST API and SDKs give the same memory to anything you build.