# MCP & coding agents

Three ways to put layahost in front of an AI agent: a remote MCP server for asking decisions from a chat or editor, a skill that teaches coding agents how to call the API in your code, and the whole documentation as Markdown.

## MCP server

Endpoint

```http
POST https://layahost.com/mcp
```

A remote MCP server (Streamable HTTP) on your normal account. Authenticate with an API key in the `Authorization` header; create a separate key for each agent so you can see its usage and revoke it on its own. Decisions are billed exactly like API calls and appear in [Logs](https://layahost.com/logs) as *MCP server*.

| Tool | What it does | Cost |
| --- | --- | --- |
| `decide` | One decision about one text: a template or your own choice, yes/no or score question. | 1 decision |
| `decide_batch` | The same decision for up to 64 texts. | 1 decision per text |
| `list_templates` | The ready-made templates with their options. | Free |
| `get_usage` | Balance, decisions left and the last 30 days of usage. | Free |

### Claude Code

Terminal

```bash
claude mcp add --transport http layahost https://layahost.com/mcp \
  --header "Authorization: Bearer $LAYAHOST_API_KEY"
```

### Cursor

.cursor/mcp.json

```json
{
  "mcpServers": {
    "layahost": {
      "url": "https://layahost.com/mcp",
      "headers": { "Authorization": "Bearer lh_your_key" }
    }
  }
}
```

### VS Code

.vscode/mcp.json

```json
{
  "servers": {
    "layahost": {
      "type": "http",
      "url": "https://layahost.com/mcp",
      "headers": { "Authorization": "Bearer ${input:layahost-key}" }
    }
  },
  "inputs": [
    { "id": "layahost-key", "type": "promptString", "description": "layahost API key", "password": true }
  ]
}
```

Other clients work the same way: the URL above plus an `Authorization: Bearer` header. The server does not use OAuth, so clients that only support OAuth sign-in cannot connect yet.

## Agent skill

The skill tells a coding agent (Claude Code, Codex, Cursor and others that read `SKILL.md`) which endpoint to use, how to phrase questions and options, how to read confidence and how to retry. With it, "add spam filtering to the contact form" ends in working layahost code instead of a guess.

Install for Claude Code

```bash
mkdir -p ~/.claude/skills/layahost
curl -fsSL https://layahost.com/skills/layahost/SKILL.md -o ~/.claude/skills/layahost/SKILL.md
```

For a single project, put it in `.claude/skills/layahost/SKILL.md` in the repository instead. Other agents: save the [same file](https://layahost.com/skills/layahost/SKILL.md) wherever they load skills from.

## Docs as Markdown

- [`/llms.txt`](https://layahost.com/llms.txt) lists every docs page with a one-line summary, following [llmstxt.org](https://llmstxt.org).
- [`/llms-full.txt`](https://layahost.com/llms-full.txt) is the whole documentation in one file, for pasting into a context window.
- Any docs page is available as Markdown by adding `.md`, for example [`/docs/decide.md`](https://layahost.com/docs/decide.md).
