DocumentationMCP & AgentsPart 1 of 2

    Install Cogny in Your AI Agent

    Paste one line into Claude Code, Codex, Cursor or another coding agent and it sets Cogny up itself. What the agent does, what it changes on your machine, how to do it by hand, and how to undo it.

    Cogny installs itself through your coding agent. You paste one line, the agent reads a file of instructions and runs three commands. This page is the human-readable version of that file: what happens, what changes on your machine, and how to undo it.

    The one line

    Paste this into Claude Code, Codex, Cursor, Gemini CLI, OpenCode or Aider:

    Read https://cogny.com/SKILL.md and follow the setup instructions.
    

    /SKILL.md is the machine-readable form of this page. It is written for the agent: setup commands, the tools Cogny exposes, rules for using them, and what to do when something fails.

    Not sure Cogny is for you? Ask instead:

    Read https://cogny.com/SKILL.md. How could Cogny help me?
    

    The file tells the agent to look at what it already knows about your project before answering, and to say so plainly if Cogny is not a fit. It installs nothing until you say yes.

    What the agent does

    1. Runs the Cogny CLI. It uses npx @cogny/cli, which needs no global install. If you prefer a global binary, npm install -g @cogny/cli works too.
    2. Signs you up, or finds your account. cogny init uses your git config user.email, creates a free workspace for it (or recovers the one you already have), and saves an API key. No card, no browser. To use a different address: cogny init --email you@example.com.
    3. Starts using the tools. cogny tools list shows what is available and cogny tools call <name> runs one. This works in the same session, with no restart.

    The free plan gives 15 tool calls per calendar month. What the paid plans add: Buying Guide for Agents.

    What changes on your machine

    WhatWhereWhen
    An API key for your workspace~/.cogny/config.jsonAlways, written by cogny init
    The CLI itselfThe npx cache, or your npm global directory if you chose a global installAlways
    A cogny MCP server entryYour agent's MCP config, for example ~/.claude.json or ~/.cursor/mcp.jsonOnly if the agent runs cogny mcp-config --write
    Marketing skill filesYour agent's skills directoryOnly if the agent runs cogny install-skill
    A copy of SKILL.mdYour agent's skills directoryOnly if the agent saves it for later sessions

    Nothing is connected to your ad or analytics accounts by installing. That is a separate step you approve per platform.

    After installing: connect a channel

    A new workspace has no data until you connect something. Either:

    • open the Cogny dashboard and connect Google Ads, GA4, Search Console, Meta Ads or another platform, or
    • ask your agent to connect one. It calls list_integrations to see what is available and starts the sign-in for you.

    Then ask a real question, such as which search queries rank on page one with a low click-through rate. Every integration's tools are listed at Integrations and tools.

    No shell? Claude.ai and ChatGPT

    A web chat cannot run commands, so add Cogny as a connector instead. The server URL is https://app.cogny.com/mcp and sign-in is OAuth.

    • Claude.ai: Settings → Connectors → Add custom connector → name cogny, URL https://app.cogny.com/mcp → Add → log in → pick your workspace → Authorize.
    • ChatGPT: Settings → Apps → Advanced settings → enable Developer mode → Create app → name Cogny, URL https://app.cogny.com/mcp, authentication OAuth → Create → pick your workspace → Authorize. ChatGPT may ask you to authorize twice the first time.

    Full connector setup with videos: Cogny MCP Server.

    Other ways in

    • An agent that already speaks MCP and only needs a credential: /auth.md describes a registration call that returns an API key in one round trip, with no browser.
    • Tools in your agent's own MCP list: after cogny init, run cogny mcp-config --agent <your-agent> --write and restart the agent. Some clients prefer OAuth over a saved key and will show the server as needing authentication. If that happens, keep using cogny tools call, which reaches the same tools.
    • An existing workspace: create an API key under Settings → Connect AI Clients and run cogny login --api-key <key> instead of cogny init.

    Undo it

    • Delete ~/.cogny/config.json to remove the saved key from your machine.
    • Revoke the key under Settings → Connect AI Clients in the Cogny app so it stops working anywhere.
    • Remove the cogny entry from your agent's MCP config if one was added.
    • npm uninstall -g @cogny/cli if you installed the CLI globally.

    If something fails

    You seeDo this
    cogny: command not foundUse npx @cogny/cli in place of cogny. A global install is not on your PATH.
    Missing API keyRun cogny init, or cogny login --api-key <key> for an existing workspace.
    401 or Invalid or expired tokenThe saved key was revoked. Run cogny init again for a new one.
    429The free plan's monthly calls are used up. They reset next month, or pick a paid plan.
    MCP server "needs authentication"Your client is ignoring the saved key. Use cogny tools call from the shell.

    Scripting the CLI, with a worked Google Ads audit: Cogny CLI: marketing MCP from the command line.

    Reading this with an AI agent? Fetch the raw markdown at /docs/install-cogny-in-your-agent/index.md or see llms.txt.

    Ready to set this up?
    Start with Solo at $9/mo or talk to us about Cloud.