/*
 * Copyright 2026, Jaime Terrats.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// ─── Figma ──────────────────────────────────────────────────────────────────
const FIGMA = {
    id: 'figma',
    label: 'Figma',
    profiles: new Set(['ux', 'ba', 'ta', 'sa']),
    config: {
        transport: 'http',
        url: 'https://mcp.figma.com/mcp',
        requiresAuth: true,
        authType: 'oauth',
    },
    envVars: [],
    setupGuide: {
        steps: [
            [
                '**Step 1 — Verify your Figma plan**',
                'The Figma MCP server requires a **Full seat** or **Dev seat** on a paid plan (Professional+).',
                'Free plans cannot use the MCP server.',
                '',
                '→ [Upgrade your Figma plan](https://www.figma.com/pricing/)',
            ].join('\n'),
            [
                '**Step 2 — Connect via your IDE**',
                'Figma MCP uses OAuth handled natively by your IDE.',
                '',
                '> **Tool support:** Currently confirmed working with Claude Code and Codex.',
                '> Cursor desktop/web does not yet support Figma MCP natively. If Cursor adds support,',
                '> replicate the same HTTP transport config used by Claude/Codex below.',
                '',
                '**Claude Code:**',
                '```',
                'claude mcp add --transport http figma https://mcp.figma.com/mcp',
                '```',
                '',
                '**Codex:**',
                'Add to your MCP config:',
                '```json',
                '{ "servers": { "figma": { "url": "https://mcp.figma.com/mcp", "type": "http" } } }',
                '```',
                '',
                '**Cursor / VS Code (when supported):**',
                'Add to `.cursor/mcp.json` or `.vscode/mcp.json`:',
                '```json',
                '{ "mcpServers": { "figma": { "url": "https://mcp.figma.com/mcp", "type": "http" } } }',
                '```',
                'Then enable the server in your IDE MCP settings — it will open a browser for OAuth on first use.',
            ].join('\n'),
        ],
        learnMore: 'https://help.figma.com/hc/en-us/articles/32132100833559-Guide-to-the-Figma-MCP-server',
    },
};
// ─── Jira ───────────────────────────────────────────────────────────────────
const JIRA = {
    id: 'jira',
    label: 'Jira Cloud',
    profiles: new Set(['pm', 'ba', 'developer', 'qa', 'devops']),
    config: {
        transport: 'http',
        url: 'https://mcp.atlassian.com/v1/mcp',
        requiresAuth: true,
        authType: 'oauth',
    },
    envVars: [],
    setupGuide: {
        steps: [
            [
                '**Step 1 — Verify your Atlassian account**',
                '1. Open your browser and go to [atlassian.com](https://www.atlassian.com)',
                '2. Log in with your Atlassian account',
                '3. Confirm you have access to at least one Jira Cloud project',
                '',
                '*If you do not have an account, ask your team lead for an invitation.*',
            ].join('\n'),
            [
                '**Step 2 — Connect via OAuth**',
                'Your IDE handles authentication automatically when connecting to the Atlassian MCP server.',
                'A browser window will open asking you to authorize the connection.',
                '',
                '*No manual token is required — OAuth 2.0 handles everything.*',
            ].join('\n'),
        ],
        learnMore: 'https://www.atlassian.com/blog/announcements/atlassian-mcp',
    },
};
// ─── Draw.io ────────────────────────────────────────────────────────────────
const DRAWIO = {
    id: 'drawio',
    label: 'draw.io',
    profiles: new Set(['ta', 'sa', 'ba', 'ux', 'developer']),
    config: {
        transport: 'stdio',
        command: 'npx',
        args: ['-y', 'drawio-mcp'],
    },
    envVars: [],
    setupGuide: {
        steps: [
            [
                '**Step 1 — No installation needed**',
                'The draw.io MCP server runs via `npx` — nothing to install globally.',
                'It will be downloaded automatically on first use.',
            ].join('\n'),
            [
                '**Step 2 — Prepare your diagrams**',
                'Create `.drawio` or `.drawio.svg` files in your project.',
                'The agent can read, create, and modify diagrams for you.',
            ].join('\n'),
        ],
        learnMore: 'https://github.com/jgraph/drawio-mcp',
    },
};
// ─── GitHub ─────────────────────────────────────────────────────────────────
const GITHUB = {
    id: 'github',
    label: 'GitHub',
    profiles: new Set(['developer', 'ta', 'devops', 'qa', 'pm']),
    config: {
        transport: 'stdio',
        command: 'npx',
        args: ['-y', '@modelcontextprotocol/server-github'],
        env: {
            GITHUB_PERSONAL_ACCESS_TOKEN: '',
        },
    },
    envVars: [
        {
            name: 'GITHUB_PERSONAL_ACCESS_TOKEN',
            label: 'Personal Access Token',
            description: 'A GitHub PAT with repo, read:org, and read:user scopes',
            secret: true,
            obtainUrl: 'https://github.com/settings/tokens',
        },
    ],
    setupGuide: {
        steps: [
            [
                '**Step 1 — Create a Personal Access Token**',
                '1. Go to [github.com/settings/tokens](https://github.com/settings/tokens)',
                '2. Click **"Generate new token (classic)"**',
                '3. Select scopes: `repo`, `read:org`, `read:user`',
                '4. Click **"Generate token"** and copy it immediately',
                '',
                '*Store the token safely — GitHub will not show it again.*',
            ].join('\n'),
            [
                '**Step 2 — Provide the token**',
                'The agent will ask for your **Personal Access Token**.',
                'It is stored locally in your editor config and never shared.',
            ].join('\n'),
        ],
        learnMore: 'https://github.com/modelcontextprotocol/servers/tree/main/src/github',
    },
};
// ─── Elements.cloud ─────────────────────────────────────────────────────────
const ELEMENTS = {
    id: 'elements',
    label: 'Elements.cloud',
    profiles: new Set(['ba', 'pm', 'ta', 'sa']),
    config: {
        transport: 'stdio',
        command: 'bash',
        args: ['.setup-agents/skills/elements-sync/scripts/push-to-elements.sh'],
        env: {
            ELEMENTS_API_KEY: '',
            ELEMENTS_SPACE_NAME: '',
        },
    },
    envVars: [
        {
            name: 'ELEMENTS_API_KEY',
            label: 'API Key',
            description: 'Your Elements.cloud API token (Space Management → Developer → API Tokens)',
            secret: true,
            obtainUrl: 'https://app.elements.cloud',
        },
        {
            name: 'ELEMENTS_SPACE_NAME',
            label: 'Space Name',
            description: 'The name of your Elements.cloud Space (shown in the app)',
            secret: false,
        },
    ],
    setupGuide: {
        steps: [
            [
                '**Step 1 — Open your Elements Space**',
                '1. Go to [app.elements.cloud](https://app.elements.cloud)',
                '2. Log in and open your Space',
                '3. Note the **Space name** shown in the top-left (you will need it below)',
            ].join('\n'),
            [
                '**Step 2 — Create an API Token**',
                '1. In the Space, go to **Space Management** (gear icon) → **Developer** → **API Tokens**',
                '2. Click **"Create API Token"**',
                '3. Give it a name (e.g., "Cursor Agent") and select the required scopes',
                '4. **Copy the token immediately** — it is shown only once',
                '',
                '*Keep this token safe. Store it in a password manager, not in code.*',
            ].join('\n'),
            [
                '**Step 3 — Provide your credentials**',
                'The agent will ask for:',
                '- Your **API Key** (from Step 2)',
                '- Your **Space Name** (from Step 1)',
                '',
                'These are stored locally in your editor environment and never uploaded.',
            ].join('\n'),
        ],
        learnMore: 'https://developer.elements.cloud/docs/elements-api',
    },
};
// ─── Lucid ───────────────────────────────────────────────────────────────────
const LUCID = {
    id: 'lucid',
    label: 'Lucid (Lucidchart / Lucidspark)',
    profiles: new Set(['ta', 'sa', 'ba', 'ux', 'pm', 'developer']),
    config: {
        transport: 'http',
        url: 'https://mcp.lucid.app/mcp',
        requiresAuth: true,
        authType: 'oauth',
    },
    envVars: [],
    setupGuide: {
        steps: [
            [
                '**Step 1 — Verify your Lucid account**',
                '1. Go to [lucid.app](https://lucid.app) and log in',
                '2. Confirm you can open at least one Lucidchart or Lucidspark document',
                '',
                '*If you do not have a Lucid account, sign up at lucid.app or ask your admin.*',
            ].join('\n'),
            [
                '**Step 2 — Connect via OAuth**',
                'Your IDE handles authentication automatically when connecting to the Lucid MCP server.',
                'A browser window will open asking you to authorize the connection.',
                '',
                '*No manual token is required — OAuth 2.0 handles everything.*',
            ].join('\n'),
        ],
        learnMore: 'https://developer.lucid.co/docs/mcp',
    },
};
// ─── Registry ───────────────────────────────────────────────────────────────
export const MCP_INTEGRATIONS = [FIGMA, JIRA, DRAWIO, GITHUB, ELEMENTS, LUCID];
//# sourceMappingURL=mcp-registry.js.map