# Stackby — how to use (mcp.ai)

Connect your Stackby account and use 9 tools for spreadsheets straight from your AI agent. Connect with your own API key. Stackby combines spreadsheets, databases, and workflow automation so teams can organize data, collaborate, and manage business processes.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_stackby?ms=1787291460000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `stackby_create_rows`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/stackby`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/stackby/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/stackby/create/rows` — Create 1 to 10 rows in a Stackby table in one request.
  - body: { records: object[], stack_id: string, table_id: string }
- `POST https://api.mcp.ai/api/stackby/delete/rows` — Delete 1 to 10 identified rows from a Stackby table.
  - body: { row_ids: string[], stack_id: string, table_id: string }
- `POST https://api.mcp.ai/api/stackby/list/columns` — List columns and their types for a Stackby table so row field names can be chosen correctly.
  - body: { stack_id: string, table_id: string }
- `POST https://api.mcp.ai/api/stackby/list/rows` — List one page of rows from a Stackby table, or retrieve specific rows by ID, with optional filtering, view selection, and single-field sorting.
  - body: { filter?: string, offset?: integer, row_ids?: string[], view_id?: string, stack_id: string, table_id: string, page_size?: integer, sort_field?: string, sort_direction?: string }
- `POST https://api.mcp.ai/api/stackby/list/stacks` — List accessible Stackby stacks in a known workspace and return IDs needed for table discovery.
  - body: { workspace_id: string }
- `POST https://api.mcp.ai/api/stackby/list/tables` — List tables in a Stackby stack and return their IDs and names.
  - body: { stack_id: string }
- `POST https://api.mcp.ai/api/stackby/list/views` — Return view IDs and names for a Stackby table for use in view-scoped row queries.
  - body: { stack_id: string, table_id: string }
- `POST https://api.mcp.ai/api/stackby/list/workspaces` — List accessible Stackby workspaces and return the workspace IDs needed to discover stacks.
- `POST https://api.mcp.ai/api/stackby/update/rows` — Partially update 1 to 10 existing Stackby rows in one request.
  - body: { records: object[], stack_id: string, table_id: string }

## Example prompts
- "What can I do in Stackby?"
- "Show me a summary of my Stackby account"

## More
- Page: https://mcp.ai/stackby
- Agent spec (llms.txt): https://mcp.ai/stackby/llms.txt
- Postman collection: https://mcp.ai/stackby/postman.json
