# Set up Visibly AI in your agent

German version: https://app.visibly-ai.com/agent-setup.md

This file is written for people and for agents (Claude Code, Cursor, Codex and any other MCP client). An agent can read it and carry out the steps without asking; the only thing it needs from you is your API key. Further down you will also find sections on NSS optimization, plugins and the Python package, connecting a CMS, and the Claude Code SEO Starter.

## What you get

Visibly AI provides its SEO and content tools as an MCP server. With it, your agent can read your projects (Search Console, Analytics, scorecard, E-E-A-T, pages, internal links), score texts (`score_text`), read articles and content queries and, if you allow it, write drafts back.

- Server (HTTP transport): `https://mcp.visibly-ai.com/mcp`
- Sign-in: header `Authorization: Bearer <your API key>`
- Package and source code: https://github.com/AntonioBlago/visiblyai-mcp-server (PyPI: `visiblyai-mcp-server`)

## Requirements

1. A Visibly AI account with a plan that includes API access (Standard and above). Each plan has a monthly quota of API requests and a per-minute limit; your current usage is shown in the settings.
2. An API key that starts with `lc_`. Create it under **Settings › API key & MCP**: https://app.visibly-ai.com/settings#mcp
   The key is shown exactly once. A new key deactivates the old one.

Never write the key into a file that goes into a repository, and never into a public chat.

## Installation

### Claude Code

```bash
claude mcp add --transport http visiblyai https://mcp.visibly-ai.com/mcp --header "Authorization: Bearer lc_YOUR_API_KEY"
```

Replace `lc_YOUR_API_KEY` with your key. Then start a new session.

### Clients with JSON configuration (e.g. Cursor)

Many clients list MCP servers under `mcpServers`. The entry needs the URL and the header; check the exact format (some clients additionally require `"type": "http"`) and the location of the configuration file in your client's documentation.

```json
{
  "mcpServers": {
    "visiblyai": {
      "url": "https://mcp.visibly-ai.com/mcp",
      "headers": {
        "Authorization": "Bearer lc_YOUR_API_KEY"
      }
    }
  }
}
```

### OpenAI Codex

Codex connects Visibly through the plugin, which brings the remote configuration with it:

```bash
codex plugin marketplace add AntonioBlago/visiblyai-mcp-server
codex plugin add visibly-codex@visibly
```

There the key comes from the environment variable `VISIBLYAI_API_KEY`. Details and setup per operating system: https://github.com/AntonioBlago/visiblyai-mcp-server/blob/master/PLUGINS.md

### Any other MCP client

Any client with HTTP transport (Streamable HTTP) works with the same two values: URL `https://mcp.visibly-ai.com/mcp` and header `Authorization: Bearer <your API key>`.

## Check the connection

1. In Claude Code, run `/mcp`: `visiblyai` must appear as connected.
2. Call the tool `list_projects`. It returns your projects with their ID.
3. A first task, for example: "Show me the status of project <ID> with `get_project` and `get_scorecard`."

## Optimize texts for the NSS

The NSS (Neuro-SEO Score) measures how well a text fits its search query: coverage of terms, entities and reader questions, structure, readability and style. Explanation and limits: https://www.visibly-ai.com/nss-score

For this there is the skill `content-nss-optimize`. The agent writes and revises the text with its own model; Visibly provides the briefing, the scoring and the storage. Scoring (`score_text`) and saving a draft cost 0 Visibly credits; the paid Visibly text generator is not used. An NSS target is a target, not a guarantee.

This is how the agent loads the skill:

- With the tool `get_skill` and `name="content-nss-optimize"`. This works over remote and over the Python package and returns the complete methodology.
- With the plugins for Claude Code, Codex and Copilot CLI (section "Plugins and Python package"): the skill ships with them. In Claude Code you call it with `/visibly-claude:content-nss-optimize` or ask for it in plain words.

The flow according to the skill:

1. Read the project, the article or content query, and the briefing (`get_content_query`, `get_content_briefing`, `get_article` with `include_content`). A finished analysis of the query is a prerequisite; a new analysis costs credits and needs your explicit go-ahead.
2. Score the complete text with `score_text` and read the real NSS from the response (`data.nss.scores.nss`).
3. Revise in a targeted way and score again. The target is NSS 70 or 80 (default 80). Stop after five rounds or after two rounds without improvement; the best version is kept.
4. Save as a draft (`submit_article_draft` or `update_article`, each with the current revision), score the saved text once more and report the editor link. Nothing is published on the side. Slug and URL of a published article stay unchanged, existing links are preserved.

Example task to copy:

```text
Optimize article #<ID> (project_id <PROJECT_ID>) for a higher NSS with the skill content-nss-optimize. First load the methodology with get_skill name=content-nss-optimize. Score the article before and after with score_text, do not change the slug or existing links, and do not use paid Visibly generation. Save the result as a draft only after my approval and tell me the editor link, the NSS before and after, and the most important changes.
```

## Permissions and costs

- **Reading** is allowed with any active key.
- **Writing** (for example `update_article`, `save_content_query_draft`, approving, publishing) additionally needs explicitly granted key permissions. You set them under **Settings › API key & MCP › Permissions for write tools**; they cannot be changed through the agent. Write calls require the current revision (`expected_revision`) so that nothing is silently overwritten.
- **Costs:** reading and scoring your own data usually costs no credits. Paid tools (for example keyword, SERP or backlink queries, analyses, generation) book credits from your account. Have your agent ask briefly before a paid call.
- In a team, the project owner pays; your role in the project determines what you may read and trigger.

## Troubleshooting

| Response | Meaning | What helps |
|---|---|---|
| 401 `invalid_api_key` | Key is missing, wrong or deactivated | Create a new key in the settings and replace it in the client |
| 403 `tier_no_access` | Your plan does not include API access | Change your plan in the settings |
| 403 `key_scope_required` | The key lacks the permission for a write tool | Set the permission under "Permissions for write tools" |
| 403 `role_read_only` | Your role in the project may not write here | Ask the project owner |
| 403 `stage_disabled` | The write tool is not enabled yet | Try again later or ask support |
| 402 `insufficient_credits` | Not enough credits for a paid tool | Top up credits |
| 404 | Project, article or query does not belong to your access | Check the ID with `list_projects` |
| 409 `revision_conflict` | The content has been changed in the meantime | Read again and write again with the current revision |
| 429 `monthly_quota_exceeded` | Monthly quota of API requests reached | Wait until the month changes (`resets_at`) or change your plan |
| 429 `rate_limited` | Too many requests per minute or too many simultaneous Google queries | Wait briefly (`Retry-After`) |

## Plugins and Python package

The server runs in two ways. Both talk to the same Visibly backend and need the same API key.

| | Remote (HTTP) | Local (stdio) |
|---|---|---|
| Installation | nothing, just a URL | Python package `visiblyai-mcp-server` |
| Endpoint | `https://mcp.visibly-ai.com/mcp` | Process on your machine, calls the backend via `https://app.visibly-ai.com/api/v1/mcp` |
| Key | Header `Authorization: Bearer lc_YOUR_API_KEY` | Environment variable `VISIBLYAI_API_KEY` |
| When | Default, recommended | If you cannot use an HTTP transport or want to pin the package locally |

Without a key the server only provides the free knowledge tools (keyword classification, SEO checklists, Google guidelines, URL analysis). With a key all tools are available (as of package 0.13.1: 84).

### Python package (stdio)

Current version on GitHub: 0.13.1, requires Python 3.10 or newer.

```bash
pip install visiblyai-mcp-server
claude mcp add --transport stdio --env VISIBLYAI_API_KEY=lc_YOUR_API_KEY visiblyai -- visiblyai-mcp-server
```

Without installation, with `uv`:

```bash
claude mcp add --transport stdio --env VISIBLYAI_API_KEY=lc_YOUR_API_KEY visiblyai -- uvx visiblyai-mcp-server
```

Updating (standard pip command, not from the package documentation):

```bash
pip install --upgrade visiblyai-mcp-server
```

Optionally there is `VISIBLYAI_API_URL` to override the API base for development or staging. Do not set it for normal operation.

### Plugins (Claude Code, Codex, GitHub Copilot CLI)

The plugins bring the skill `content-nss-optimize` with them: the agent writes an article with its own model, scores it with `score_text`, improves it up to the NSS target (70 or 80) and stores the draft in the Visibly editor. This does not use a paid Visibly text generator and publishes nothing. The plugins do not replace the connection: the key must be in the client's environment as `VISIBLYAI_API_KEY`, and the client must be started from the same terminal.

Claude Code (the remote configuration is included in the plugin):

```bash
claude plugin marketplace add AntonioBlago/visiblyai-mcp-server
claude plugin install visibly-claude@visibly
```

OpenAI Codex:

```bash
codex plugin marketplace add AntonioBlago/visiblyai-mcp-server
codex plugin add visibly-codex@visibly
```

GitHub Copilot CLI (the plugin contains only the skill, you set up the connection once separately):

```bash
copilot plugin marketplace add AntonioBlago/visiblyai-mcp-server
copilot plugin install visibly-copilot@visibly
copilot mcp add --transport http --header "Authorization: Bearer $VISIBLYAI_API_KEY" visiblyai https://mcp.visibly-ai.com/mcp
```

Cursor: there is no plugin for Cursor. Use the JSON entry in the section "Clients with JSON configuration" above.

The plugin packages (release 1.0.2) are also available as a ZIP download at https://github.com/AntonioBlago/visiblyai-mcp-server/releases/tag/plugins-v1.0.2. The plugins are not listed in any official store; the marketplace is the GitHub repository itself. Setting up the key per operating system and troubleshooting: https://github.com/AntonioBlago/visiblyai-mcp-server/blob/master/PLUGINS.md

## Connect your own website (CMS)

Visibly can bring articles into your CMS in two ways.

**Way 1: Your CMS fetches the articles (pull CMS).** You give Visibly a webhook URL of your system. On approval or change, Visibly sends a signed event (`article.approved`, `article.updated`); your system confirms immediately with 202, fetches the article through the pull API and reports the published URL back. A plan from Standard is required, because the Content Autopilot (CMS connections, project key) is not included in the Free plan.

Setup in Visibly: **Content Tools › Content Autopilot** (`https://app.visibly-ai.com/tools/content`, choose your project), card **CMS connections**:

1. Under "Contentpilot API key (pull)" click **Create key**. The key starts with `cp_`, is shown exactly once and only sees this project (placeholder here: `cp_YOUR_PROJECT_KEY`).
2. Under "Add new connection" choose the CMS type **Webhook (pull CMS)**, enter the webhook URL of your system and a webhook secret of your choice, tick the events `article.approved` and `article.updated` and save.
3. Only then click "Test connection", once your receiver is running; otherwise you get a 404.

Your agent cannot do these same steps through MCP; the card "CMS connections" is the place for it. Hosting variables (secret, key) go into your host's secret store, never into the chat or the code.

Receivers that already exist:

| Target | How | Webhook path |
|---|---|---|
| WordPress | anyCMS plugin `ai-automation-connector.php` (version 1.1.0, WordPress 6.0+, PHP 8.0+) | `/wp-json/ai-automation/v1/webhook` |
| Astro, Next.js | Starter from anyCMS | `/api/visibly/webhook` |
| Flask / Python | Python SDK `ai-content-autopilot` | `/webhooks/visibly` |
| Any other system | Protocol per `CONTRACT.md` (HMAC-SHA256) | freely selectable |

### WordPress with anyCMS

Source: https://github.com/AntonioBlago/anycms (public). The plugin is a single file, there is no separate release ZIP.

1. Download `apps/wordpress/ai-automation-connector.php`: https://github.com/AntonioBlago/anycms/blob/main/apps/wordpress/ai-automation-connector.php
2. Place it at `wp-content/plugins/ai-automation-connector/ai-automation-connector.php` and activate the plugin under Plugins.
3. Under **Settings › AI Automation** enter the webhook secret and the key (`cp_YOUR_PROJECT_KEY`). The page shows the exact webhook URL that you enter in Visibly for the connection.
4. In Visibly click "Test connection", then approve an article.

New posts land as drafts by default. WP-Cron must be running, and Visibly does not follow redirects, so the webhook URL must answer directly (https, without a double slash).

### Python SDK `ai-content-autopilot` (Flask and custom Python CMS)

Package on PyPI, version 1.1.0, Python 3.8 or newer, source: https://github.com/AntonioBlago/visibly-ai-cms-connector

```bash
pip install ai-content-autopilot
```

```python
from ai_content_autopilot import configure_visibly, contentpilot_webhook_bp

def my_handler(article):
    # article contains, among others, id, title, slug, content_html, content_markdown, meta_description
    return True  # stored; you confirm publication separately

configure_visibly(
    webhook_secret="your-webhook-secret",
    api_key="cp_YOUR_PROJECT_KEY",
    base_url="https://app.visibly-ai.com",
    on_article_received=my_handler,
)
app.register_blueprint(contentpilot_webhook_bp)  # POST /webhooks/visibly
```

`base_url` must be `https://app.visibly-ai.com`. Versions before 1.1.0 pointed by default to an old host that only redirects; then `fetch_article` returns nothing and nothing gets published. When in doubt, set `base_url` explicitly. Read secret and key from the environment, not from the source code.

### Publish directly from Visibly (WordPress and Shopify)

Alternatively, Visibly writes into WordPress or Shopify itself. For this you create a connection of type WordPress (site URL and application password) or Shopify in the same Content Autopilot under **CMS connections**. You then publish approved articles from the article itself; already published posts can be updated with the stored version. This is also available from Standard.

## Claude Code SEO Starter (for agencies and freelancers)

A ready-made Claude Code scaffold for SEO freelancers and agencies, public and MIT-licensed: https://github.com/AntonioBlago/claude-code-seo-starter

It comes with:

- a pre-wired Visibly MCP connection (usable without a key, then only the free knowledge tools),
- four slash commands for the client workflow: `/visibly-seo-status-quo`, `/visibly-seo-potential`, `/visibly-seo-offer`, `/visibly-seo-pdf-build` (status quo, potential analysis with empirical CTR curve, offer, CI-compliant PDF),
- a hook that points to real data instead of guessing for SEO questions, plus templates and documentation.

How it works with Visibly: with your `lc_` key the commands pull Search Console and Analytics data live through the Visibly MCP (these queries cost no credits); keyword, backlink and competitor queries book credits. Tools that read client data ask first. Without a key you work with a Search Console export in the Python templates.

Installation as a plugin:

```text
/plugin marketplace add AntonioBlago/claude-code-seo-starter
/plugin install seo-starter@antonioblago
```

Or as a project template:

```bash
git clone https://github.com/AntonioBlago/claude-code-seo-starter.git
cd claude-code-seo-starter
claude
```

You connect the key once with the command from the section "Claude Code" above. The PDF and data helpers require Python 3.11 or newer. Further steps: `docs/setup.md` in the repository.

## Also connect Ahrefs (optional)

If you have Ahrefs (Lite and above), connect the official Ahrefs MCP with your own Ahrefs account in addition to Visibly. Ahrefs supports Claude Code as a client; how to set up the server is described at https://docs.ahrefs.com/mcp. Visibly does not broker this access and stores nothing for it, the Ahrefs units run through your Ahrefs account.

In the Visibly SEO Copilot you use Ahrefs instead through your Ahrefs API key under Settings › API and integrations › Ahrefs. The Copilot then fetches backlinks, referring domains, keywords and your site audit from Ahrefs.

## Help

- Settings: https://app.visibly-ai.com/settings#mcp
- MCP server on the website: https://www.visibly-ai.com/developers/mcp
- Plugins on the website: https://www.visibly-ai.com/developers/plugin
- Tool reference (every tool with fields, limits and costs, live from the app): https://app.visibly-ai.com/mcp-tools.md
- Package documentation (configuration, clients): https://github.com/AntonioBlago/visiblyai-mcp-server#readme
- Source code: https://github.com/AntonioBlago/visiblyai-mcp-server
- Contact: service@visibly-ai.com
