# Giky API MCP Server

Connect an AI coding tool to the hosted Giky API MCP server. Discover models without a key, then use your own API key for task operations.

## Remote MCP endpoint

Use the Streamable HTTP endpoint below. It supports current stateless MCP clients and the legacy initialization flow used by older clients.

```
https://gikyapi.com/mcp
```

## Authentication

Model discovery is public. Task listing, status, creation and cancellation require your Giky API key in the MCP connection's Authorization header. Keep the key in the client's secret or environment configuration; never paste it into a prompt or pass it as a tool argument.

```
Authorization: Bearer YOUR_API_KEY
```

## Available tools

Choose the smallest tool that matches the job. `create_task` can spend account balance and requires an explicit confirmation flag plus a stable idempotency key.

| Tool | Key required | Purpose |
| --- | --- | --- |
| list_models | No | Search model IDs, operations, minimum published prices and availability |
| get_model | No | Read exact parameters and prices for one model |
| list_tasks | Yes | List tasks owned by the configured key |
| get_task | Yes | Read task status and output URLs |
| create_task | Yes | Create a potentially billable generation task after confirmation |
| cancel_task | Yes | Cancel a task before upstream submission when possible |

## VS Code configuration

Add the hosted endpoint to your user MCP configuration. Replace the placeholder through a private environment variable or the client's secret-input support; do not commit a real key.

```
{
  "mcpServers": {
    "gikyApi": {
      "type": "http",
      "url": "https://gikyapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${input:gikyApiKey}"
      }
    }
  },
  "inputs": [
    {
      "id": "gikyApiKey",
      "type": "promptString",
      "description": "Giky API key",
      "password": true
    }
  ]
}
```

## Safe generation workflow

Call `get_model` immediately before a paid request, verify `generationAvailable`, match the input schema to one published price, and show that selection to the user. Call `create_task` only after explicit approval. Preserve its idempotency key and exact request body when retrying an uncertain response; once a task ID exists, use `get_task` instead of submitting again.

- [Create an API key](https://gikyapi.com/dashboard/keys/)
- [Billing and limits](https://gikyapi.com/docs/billing/)
- [Errors and retries](https://gikyapi.com/docs/errors/)
