# MCP server

Source : https://webgune.cloud/en-us/docs/mcp · Mis à jour le 2026-10-27

# MCP server

The official `webgune-mcp` server exposes your webgune account as [Model Context Protocol](https://modelcontextprotocol.io) tools: you can list your services, view logs, redeploy a service, or check your invoices directly from Claude (Desktop, Code) or any other MCP client.

## Installation

```bash
bun add -g webgune-mcp
# or
npm install -g webgune-mcp
```

## Authentication

Like the [CLI](/docs/cli), the MCP server authenticates with an **API key** (prefix `wgk_`), created from the dashboard: **Settings → API keys**. The key is passed via the `WEBGUNE_API_KEY` environment variable.

Tip: create a dedicated key with limited scopes. For read-only use, `projects:read` + `services:read` + `billing:read` are enough.

## Configuration

### Claude Desktop / Claude Code

```json
{
  "mcpServers": {
    "webgune": {
      "command": "webgune-mcp",
      "env": {
        "WEBGUNE_API_KEY": "wgk_xxxxxxxx"
      }
    }
  }
}
```

With Claude Code:

```bash
claude mcp add webgune --env WEBGUNE_API_KEY=wgk_xxxxxxxx -- webgune-mcp
```

## Available tools

| Tool | Description | Read-only |
|---|---|:---:|
| `list_projects` | Lists your projects | ✓ |
| `list_services` | Lists your services (can filter by project) | ✓ |
| `get_service` | Details of a service | ✓ |
| `get_service_logs` | Runtime logs | ✓ |
| `list_deployments` | Deployment history | ✓ |
| `redeploy_service` | Rebuild + redeploy | No |
| `restart_service` | Restart | No |
| `rollback_deployment` | Roll back to a previous deployment | No |
| `list_plans` | Pricing grid | ✓ |
| `get_subscription` | Subscription + SEPA mandate status | ✓ |
| `list_invoices` | Invoices | ✓ |
| `list_domains` | Domain names | ✓ |

Write tools (`redeploy_service`, `restart_service`, `rollback_deployment`) require the `services:write` scope on the API key. Without it, the API responds 403 and the action fails.

## Example usage

Once configured, simply ask Claude:

> "List my webgune services and show me the logs of the service with error status."

> "Roll back the api-prod service to the previous deployment."

## See also

- [Webgune CLI](/docs/cli): the same operations from the terminal.
- [API reference](/docs/reference-api): the underlying HTTP API.
