> ## 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, Wix and Framer supported from Integrations in the dashboard. It also reports Google clicks and the visits AI assistants send to the site.
>
> Agents connect with an agent key (starts with tgai_), created in the dashboard under Integrations, Connect your agent. Claude.ai custom connectors need no key: they add https://app.talkgen.ai/mcp and sign in with OAuth (see /agents/claude-ai). 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); 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.
>
> 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.

# Cursor MCP: connect Cursor or VS Code to TalkGenAI

> Add the TalkGenAI MCP server to .cursor/mcp.json or .vscode/mcp.json, with a sign-in or an agent key, so your editor's agent can write articles and save them as drafts on your site.

# How do I connect Cursor or VS Code to TalkGenAI?

Add the TalkGenAI server to `.cursor/mcp.json` (Cursor) or `.vscode/mcp.json` (VS Code). Cursor can sign you in with OAuth, so the URL is enough. If you prefer a key, add it as a header. The editor's agent then sees the TalkGenAI tools and can write an article and save it as a draft on your site.

## What do I need first?

* Cursor or VS Code with MCP support.
* A TalkGenAI account (free). Only the workspace owner can approve a sign-in.
* An agent key (starts with `tgai_`) only if you use the key method. See [Connect your AI agent](https://docs.talkgen.ai/agents/connect-your-agent.md).

## How do I do it with a sign-in (no key)?

Add this to `.cursor/mcp.json` or `.vscode/mcp.json`, with no headers:

```json theme={null}
{
  "mcpServers": {
    "talkgenai": {
      "type": "http",
      "url": "https://app.talkgen.ai/mcp"
    }
  }
}
```

Reload the window. Cursor opens the TalkGenAI sign-in page when the server asks for it. Sign in and approve the connection.

We have tested this sign-in with Claude.ai and Claude Code. We have not tested it in Cursor or VS Code yet. If it does not work, use the key method below.

## How do I do it with an agent key?

Add this instead:

```json theme={null}
{
  "mcpServers": {
    "talkgenai": {
      "type": "http",
      "url": "https://app.talkgen.ai/mcp",
      "headers": { "Authorization": "Bearer tgai_your_key_here" }
    }
  }
}
```

Then reload the window or restart the editor. Use one method or the other: a stored key header turns the sign-in off.

> [!WARNING]
>
> Do not commit this file with a real key in it. Add it to `.gitignore`, or keep it in your user-level configuration instead of the project.

## How do I check that it worked?

Open the MCP panel in your editor. `talkgenai` should be listed with its tools. Ask the agent: "Check my TalkGenAI credits."

## What prompt should I give the agent?

> Use TalkGenAI to write a post about "how to choose a CRM for a 5-person agency". Wait for it to finish, then save it as a draft on my site and show me the edit link.

The agent saves a draft unless you ask for it to go live. See [Publish safely](https://docs.talkgen.ai/agents/publish-safely.md).

## What can go wrong?

| Symptom | Cause | Fix |
| - | - | - |
| Server shows as failed with a header | Wrong or revoked key, or a typo in the header | Check the header value starts with `Bearer `, or remove the header and use the sign-in |
| No sign-in page opens | A key header is stored, which turns the sign-in off | Remove the `headers` block and reload |
| The approval page says only the owner can approve | You are a workspace member, not the owner | Ask the workspace owner to approve, or use a key the owner created |
| `403 scope_missing` | Key lacks `articles` or `publish` | Create a new key with the scope |
| Tools missing | Editor cached the tool list | Reload and reconnect |

Last updated: 2026-11-14

## Related

* [MCP tools reference](https://docs.talkgen.ai/agents/mcp-tools.md)
* [Connect Claude Code](https://docs.talkgen.ai/agents/claude-code.md)
* [Errors](https://docs.talkgen.ai/agents/errors.md)

> [card] [Create a free account](https://app.talkgen.ai/connect-agent?utm_source=docs\&utm_medium=cta\&utm_content=cursor)
>
> About two minutes. No card.


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