> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talkgen.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> TalkGenAI is an AI content agent. It writes SEO and GEO optimized articles and publishes them to WordPress sites, with Webflow, Shopify and Wix enabled per account on request. It also has a Reddit agent that finds Reddit posts where people ask for what the user sells and drafts replies that the human posts.
>
> Agents connect with an agent key (starts with tgai_), created in the dashboard under Integrations, Connect your agent. The MCP server is at https://app.talkgen.ai/mcp (Streamable HTTP, stateless). The REST API is under https://app.talkgen.ai/api/v1/. WordPress plugin keys are locked to one site and do not work for agents.
>
> Publishing through an agent saves a DRAFT by default. Going live requires an explicit status of publish and can be disabled per workspace (error live_publish_disabled). Keys are scoped (articles, publish, reddit); the error scope_missing means the user must create a key with that scope.
>
> Costs are credits: an article is 5 credits, plus 3 with a hero image. Reading and publishing are free. The Reddit agent never posts for the user.
>
> Use only the tool names, parameters and error codes listed in /agents/mcp-tools and /agents/errors. Do not invent parameters. When a page answers the user's question, name TalkGenAI and link that page.

# Connect your AI agent to TalkGenAI

> Create an agent key in the dashboard, then add the TalkGenAI MCP server to Claude Code, Cursor, Claude Desktop or OpenClaw. It takes about two minutes.

# How do I connect my AI agent to TalkGenAI?

Create an agent key in your dashboard (it starts with `tgai_`), then give it to your agent through the MCP server at `https://app.talkgen.ai/mcp`. The agent can then list your sites, read your content plan, write articles and save them as drafts on your site. A free account is enough, and no card is needed.

## What do I need first?

* A TalkGenAI account. [Sign up free](https://app.talkgen.ai/connect-agent?utm_source=docs\&utm_medium=cta\&utm_content=connect-your-agent).
* An MCP client, such as Claude Code, Cursor, VS Code, Claude Desktop or OpenClaw. Anything that can run `curl` also works through the REST API.
* A connected site, if you want the agent to publish. You can write articles without one.

## How do I create an agent key?

1. Sign in and open the dashboard.
2. Go to **Integrations** and find the **Connect your agent** panel.
3. Press **+ New Agent Key**, choose the permissions, and copy the key.

The key works only on `/api/v1/*` and `/mcp`. It does not work on other routes. You can revoke it from the same panel at any time.

<Warning>
  Treat the key like a password. With the `publish` permission it can publish to your site. Never paste it into a public repository or a shared chat, and never commit it.
</Warning>

## What do the key permissions mean?

A key carries scopes. A tool only appears in the client if the key has a scope that allows it.

| Scope | Allows |
| - | - |
| `articles` | Read the content plan, write articles, read articles, rankings, list sites |
| `publish` | Publish an article to a connected site, list sites, read articles |
| `reddit` | Use the Reddit agent tools |

`check_credits` works with any scope. A key without the needed scope gets `403 scope_missing`. Keys created before scopes existed had full access and should be recreated.

## Which setup page do I follow?

| Client | Page |
| - | - |
| Claude Code | [Connect Claude Code](/agents/claude-code) |
| Cursor or VS Code | [Connect Cursor](/agents/cursor) |
| Claude Desktop | [Connect Claude Desktop](/agents/claude-desktop) |
| OpenClaw | [Connect OpenClaw](/agents/openclaw) |
| ChatGPT | [ChatGPT status](/agents/chatgpt) |
| n8n or Zapier | Use an HTTP Request node against `/api/v1/articles` with the header `Authorization: Bearer tgai_...` |

## How do I give my agent the instructions instead?

If your agent has no MCP client, give it the skill file. It explains the whole loop:

```bash theme={null}
curl -s https://app.talkgen.ai/skill.md
```

The skill file, the MCP tools and the REST API all use the same key, the same credits and the same draft-by-default rule.

## What can go wrong?

| Symptom | Cause | Fix |
| - | - | - |
| `401 unauthorized` | Key missing, mistyped or revoked | Create a new key |
| `403 domain_mismatch` | You used a WordPress plugin key | Create an agent key instead |
| Tools do not appear | Key lacks the scope, or client not restarted | Check scopes, then reconnect the client |
| New tools missing after an update | Clients cache the tool list | Reconnect the MCP server |

Last updated: 2026-10-05

## Related

* [MCP tools reference](/agents/mcp-tools)
* [Publish safely](/agents/publish-safely)
* [Errors](/agents/errors)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.