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
- Runs the Cogny CLI. It uses
npx @cogny/cli, which needs no global install. If you prefer a global binary,npm install -g @cogny/cliworks too. - Signs you up, or finds your account.
cogny inituses yourgit 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. - Starts using the tools.
cogny tools listshows what is available andcogny 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
| What | Where | When |
|---|---|---|
| An API key for your workspace | ~/.cogny/config.json | Always, written by cogny init |
| The CLI itself | The npx cache, or your npm global directory if you chose a global install | Always |
A cogny MCP server entry | Your agent's MCP config, for example ~/.claude.json or ~/.cursor/mcp.json | Only if the agent runs cogny mcp-config --write |
| Marketing skill files | Your agent's skills directory | Only if the agent runs cogny install-skill |
A copy of SKILL.md | Your agent's skills directory | Only 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_integrationsto 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, URLhttps://app.cogny.com/mcp→ Add → log in → pick your workspace → Authorize. - ChatGPT: Settings → Apps → Advanced settings → enable Developer mode → Create app → name
Cogny, URLhttps://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.mddescribes 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, runcogny mcp-config --agent <your-agent> --writeand restart the agent. Some clients prefer OAuth over a saved key and will show the server as needing authentication. If that happens, keep usingcogny 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 ofcogny init.
Undo it
- Delete
~/.cogny/config.jsonto 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
cognyentry from your agent's MCP config if one was added. npm uninstall -g @cogny/cliif you installed the CLI globally.
If something fails
| You see | Do this |
|---|---|
cogny: command not found | Use npx @cogny/cli in place of cogny. A global install is not on your PATH. |
Missing API key | Run cogny init, or cogny login --api-key <key> for an existing workspace. |
401 or Invalid or expired token | The saved key was revoked. Run cogny init again for a new one. |
429 | The 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.