# sk33p API and MCP

The sk33p engine (SkeeptoEngine, 344 Excel-compatible functions, reads and writes .xlsx) over HTTPS and MCP.
Base URL: https://sk33p.pwa.pit.world

## Auth and limits

Send your key as `Authorization: Bearer sk33p_...` (or `X-API-Key`, or `?key=` for MCP clients that cannot set headers).
Get a free key at https://sk33p.pwa.pit.world/key or `POST /api/v1/keys {"email": "you@example.com"}`.

| Plan | Calls a day | Largest file | Price |
| --- | --- | --- | --- |
| No key | 10 | 512 KB | free |
| Free key | 100 | 2 MB | free |
| Pro | 10000 | 25 MB | $9 per 30 days |

Days reset at midnight UTC. Over the limit the API answers **402** with `next`: how to get a key or go Pro.
Every engine response carries `x-sk33p-plan` and `x-sk33p-remaining`.

Files travel as `{"name": "budget.xlsx", "data": "<base64>"}`. Formats: .xlsx, .sker, .csv, .tsv.
Each call runs in a fresh sandboxed process; nothing is kept.

## Endpoints

### POST /api/v1/eval
`{"formulas": ["=PMT(5%/12,360,-300000)", "=SUM(1,2,3)"]}` -> `{"results": [{"formula": "...", "value": "1610.46486903642"}, ...]}`
Up to 200 formulas. The engine has no ^ operator: use POWER().

### POST /api/v1/read
`{"file": {...}, "range": "A1:D20", "sheet": "Jan", "formulas": true}` -> computed values (and formulas). Omit range for the used range.

### POST /api/v1/write
`{"file": {...} | omit for a new workbook, "name": "new.xlsx", "cells": {"A1": "10", "B1": "=A1*2"}, "sheet": "Sheet1", "format": "xlsx"}`
-> `{"result": ..., "file": {"name", "data", "bytes"}}` with the saved workbook.

### POST /api/v1/sheets
`{"file": {...}}` -> sheet names and used sizes.

### POST /api/v1/convert
`{"file": {...}, "to": "csv"}` -> `{"file": {...}}`.
Raw form: `curl --data-binary @budget.xlsx 'https://sk33p.pwa.pit.world/api/v1/convert?name=budget.xlsx&to=csv' -o budget.csv` returns the file itself.

### GET /api/v1/me
Your plan, calls today and limits.

### POST /api/v1/keys
`{"email": "you@example.com"}` -> `{"key": "sk33p_..."}` (shown once).

### POST /api/v1/upgrade
With your key: starts a CoinPay checkout for Pro and returns `checkout_url` (any coin or PayPal). Each payment adds 30 days.

## MCP

Remote server (streamable HTTP): `https://sk33p.pwa.pit.world/mcp`

```json
{"mcpServers": {"sk33p": {"type": "http", "url": "https://sk33p.pwa.pit.world/mcp", "headers": {"Authorization": "Bearer sk33p_..."}}}}
```

Tools: eval, read_range, write_cells, list_sheets, convert (files as base64), usage, upgrade.

Local, unlimited, no account: install the app and run `sk33p mcp` (stdio; the same tools on file paths).

## The app

`curl -fsSL https://raw.githubusercontent.com/profullstack/sk33p/main/install.sh | sh`

Source: https://github.com/profullstack/sk33p (MIT)
