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

# Architecture

> Technical architecture of the Adspirer MCP server — shared skills, plugin system, and multi-IDE distribution.

# Architecture

The Adspirer MCP server uses a shared-skills architecture for consistent behavior across all AI clients.

## System Overview

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart TD
    subgraph "AI Clients"
        A[Claude Code Plugin]
        B[Cursor Config]
        C[ChatGPT Connector]
        D[Codex Config]
    end

    subgraph "Shared Layer"
        E[Skills Templates]
        F[Agent Instructions]
        G[Slash Commands]
    end

    subgraph "MCP Server"
        H[Adspirer MCP Server]
        I[OAuth 2.1 / PKCE]
    end

    subgraph "Ad Platforms"
        J[Google Ads API]
        K[Meta Ads API]
        L[LinkedIn Ads API]
        M[TikTok Ads API]
    end

    A --> E
    B --> E
    E --> H
    F --> H
    C --> H
    D --> H
    H --> I
    I --> J
    I --> K
    I --> L
    I --> M
```

## Shared Skills

Skills are defined as Markdown templates in `shared/skills/`. Each skill contains:

* **SKILL.md** — The skill definition with instructions and workflow steps
* **references/** — Supporting documents and examples

Skills are the source of truth — IDE-specific plugins generate their implementations from these shared templates.

## Plugin System

Each IDE gets a tailored plugin that adapts the shared skills to its environment:

| IDE         | Plugin Location        | Adapts For                           |
| ----------- | ---------------------- | ------------------------------------ |
| Claude Code | `plugins/claude-code/` | Slash commands, CLAUDE.md, subagents |
| Cursor      | `plugins/cursor/`      | .cursor/rules, MCP config            |
| Codex       | `plugins/codex/`       | config.toml, agent instructions      |
| OpenClaw    | `plugins/openclaw/`    | Plugin manifest, commands            |

## Server Registry

The MCP server is registered at `registry.modelcontextprotocol.io` as `com.adspirer/ads`. The `server.json` file contains the registry manifest with server metadata, capabilities, and authentication requirements.
