KrexelDocsHome

Docs · API quickstart

Create a key and verify the connection.

Krexel uses one bearer-key contract across the CLI, direct REST requests, and hosted MCP.

1Create a customer key

Sign in, open Keys, and create a key. Copy the plaintext krx_... value when it is shown; it cannot be recovered later.

Store it in a password manager or the secret environment for the client that will use it. Never commit it to a repository.

2Verify the key

export KREXEL_API_KEY="krx_replace_with_your_key"

curl https://api.krexel.com/api/v1/me \
  -H "Authorization: Bearer $KREXEL_API_KEY"

A successful response identifies the authenticated customer. A 401 means the key is missing, malformed, revoked, or not being sent in the bearer header.

3Ship with the CLI

npm install -g krexel
krexel login --api-key "$KREXEL_API_KEY"
krexel ship ./dist my-site

The second positional value is a site slug. A successful publish returns a generated my-site.krexel.com URL; it is not a custom-domain argument.

4Inspect hosted MCP

curl -X POST https://api.krexel.com/api/v1/mcp \
  -H "Authorization: Bearer $KREXEL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

This direct API example is for clients that accept bearer API keys. Hosted browser clients should add https://krexel.com/api/mcp and use automatic OAuth. The local krexel-mcp process is a separate nine-tool stdio server.

Current boundaries

  • New custom-hostname attachment is temporarily unavailable.
  • Remote MCP clients use automatic OAuth, not this API key.
  • Use the CLI or MCP tools for deploy payloads rather than copying an unversioned multipart example.