# MCP Configuration Guide

import Code from '~/components/Code/Code.astro'

This guide provides configuration instructions for integrating Azion's MCP server with popular code assistants.

---

## Prerequisites

Before configuring MCP, ensure you have:

1. An **Azion Personal Token**
   - Navigate to [Azion Console](https://console.azion.com/personal-tokens)
   - Create a new Personal Token
   - Copy and store it securely

2. A compatible **code assistant** installed

---

## Claude Code (Terminal)

Claude Code provides native MCP support through simple CLI commands.

### Installation

<Code lang="bash" code={`
# Add Azion MCP to Claude
claude mcp add "azion-mcp" "https://mcp.azion.com" -t http -H "Authorization: Bearer YOUR_PERSONAL_TOKEN"

# Start Claude service
claude serve
`} />

### Usage

Once configured, you can ask Claude to:
- Search Azion documentation
- Generate deployment guides
- Create Rules Engine configurations
- Build GraphQL queries

---

## Cursor

Cursor supports MCP through its settings interface.

### Configuration steps

1. Open Cursor Settings
2. Navigate to **Tools & Integrations**
3. Add the following MCP configuration:

<Code lang="json" code={`
{
    "mcpServers": {
        "azion": {
            "type": "streamable-http",
            "url": "https://mcp.azion.com",
            "headers": {
                "Authorization": "Token YOUR_PERSONAL_TOKEN"
            }
        }
    }
}
`} />

:::note
  Cursor uses `Token` prefix instead of `Bearer` in the authorization header.
:::

---

## Windsurf

Windsurf requires creating a configuration file in your project.

### Setup

Create the file `.codeium/windsurf/mcp_config.json`:

<Code lang="json" code={`
{
    "mcpServers": {
        "azion": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.azion.com",
                "--header",
                "Authorization: Bearer YOUR_PERSONAL_TOKEN"
            ]
        }
    }
}
`} />

### Requirements

- Node.js 18+ installed
- `mcp-remote` package (installed automatically via npx)

---

## Claude Desktop

Claude Desktop supports MCP through its configuration settings.

### Configuration

1. Open Claude Desktop settings
2. Navigate to MCP configuration
3. Add the following:

<Code lang="json" code={`
{
    "mcpServers": {
        "azion": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.azion.com",
                "--header",
                "Authorization: Bearer YOUR_PERSONAL_TOKEN"
            ]
        }
    }
}
`} />

---

## VS Code with GitHub Copilot

For VS Code users with GitHub Copilot extension supporting MCP.

### Setup

Create `.vscode/mcp.json` in your project root:

<Code lang="json" code={`
{
    "mcpServers": {
        "azion": {
            "type": "http",
            "url": "https://mcp.azion.com",
            "headers": {
                "Authorization": "Bearer YOUR_PERSONAL_TOKEN"
            }
        }
    }
}
`} />

:::warning
  MCP support in VS Code may require additional extensions. Check the marketplace for MCP-compatible extensions.
:::

---

## Warp Terminal

Configure MCP in Warp's settings.

### Configuration

Add to Warp MCP settings:

<Code lang="json" code={`
{
    "azion": {
        "command": "npx",
        "args": [
            "mcp-remote",
            "https://mcp.azion.com",
            "--header",
            "Authorization: Bearer YOUR_PERSONAL_TOKEN"
        ]
    }
}
`} />

---

## Kiro Code

Kiro Code supports MCP through its settings file.

### Setup

Create `.kiro/settings/mcp.json`:

<Code lang="json" code={`
{
    "servers": {
        "azion": {
            "url": "https://mcp.azion.com",
            "token": "YOUR_PERSONAL_TOKEN"
        }
    }
}
`} />

---

## OpenCode

OpenCode uses TOML configuration for MCP servers.

### Setup

Create `.codex/config.toml`:

<Code lang="toml" code={`
[mcp.servers.azion]
type = "http"
url = "https://mcp.azion.com"
auth = "Bearer YOUR_PERSONAL_TOKEN"
`} />

---

## Testing your connection

### Using MCP Inspector

MCP Inspector helps validate your configuration before using it with code assistants.

#### Installation

<Code lang="bash" code={`
npm install -g @modelcontextprotocol/inspector
`} />

#### Testing

1. Run the inspector:
   <Code lang="bash" code={`
   npx @modelcontextprotocol/inspector
   `} />

2. Configure connection:
   - **Transport type**: `streamable-http`
   - **URL**: `https://mcp.azion.com`
   - **Authentication**: `Authorization: Bearer YOUR_PERSONAL_TOKEN`

3. Click **Connect**

4. Verify:
   - **Tools tab**: Should show 9 available tools
   - **Resources tab**: Should show deployment resources

### Test a tool

1. Select `search_azion_docs_and_site`
2. Enter query: `"how to configure cache"`
3. Verify response contains relevant documentation

---

## API endpoint

The Azion MCP server is available at:

<Code lang="plaintext" code={`
https://mcp.azion.com
`} />

This endpoint provides access to all MCP tools and resources for interacting with Azion's platform.

---

## Security best practices

1. **Never commit tokens**: Add configuration files to `.gitignore`
2. **Use environment variables**: Store tokens in environment variables when possible
3. **Rotate tokens regularly**: Create new tokens periodically
4. **Use minimal permissions**: Create tokens with only necessary permissions

---

## Next steps

- [Explore MCP examples](/en/documentation/devtools/mcp/examples/)
- [Troubleshooting guide](/en/documentation/devtools/mcp/troubleshooting/)
- [Local Development](/en/documentation/devtools/mcp/local-development/)
- [Cache Testing Guide](/en/documentation/devtools/mcp/cache-testing/)