feega MCP
feega exposes a Model Context Protocol server so coding agents (Cursor, Claude, and others) can read and write a brand's canvas, posts and ad campaigns directly — with the same OAuth login as the CLI.
Your agent
│ stdio (local) → bun run mcp / feega-mcp
│ HTTPS (remote) → https://mcp.feega.app/mcp + Bearer
▼
feega API (/api/v1/*) Quick start
Pick a transport: local stdio is simplest on your machine; remote HTTP is for cloud hosts.
Option A — Local stdio
Best for Cursor and other local agents.
- Install Bun and clone the feega repo (or install the CLI binary so feega-mcp is on your PATH).
- Authenticate once:
feega login # once, in a terminal — the CLI and the local MCP server share one session - Add to Cursor MCP config (absolute path required when using Bun):
{ "mcpServers": { "feega": { "command": "bun", "args": ["run", "/ABS/PATH/to/feega/cli/mcp/stdio.ts"] } } }If the binary is on PATH after install:
{ "mcpServers": { "feega": { "command": "feega-mcp" } } } - Restart Cursor / reload MCP. Call `query` on `brands`, then work with a brand_id.
Session file (shared with the CLI): ~/.config/feega/session.json.
Option B — Remote HTTP
- Confirm the server is up:
curl -sS https://mcp.feega.app/healthExpect a JSON health payload with ok: true and mcp: "/mcp".
- Cursor MCP config:
{ "mcpServers": { "feega": { "url": "https://mcp.feega.app/mcp" } } } - Clients that speak MCP OAuth (opencode, Claude Code, Cursor, the Inspector…) authenticate on their own: on first connect they open
feega.app, you approve, and the token is stored by the client. The initial 401 is the start of that handshake, not a crash.
Custom option — if your client cannot do OAuth, attach the token by hand: Authorization: Bearer <access_token>, using the Supabase access token that feega login saves in ~/.config/feega/session.json. Static API keys (feega_…) are not accepted by the remote server.
Option C — Local HTTP
cd cli
bun install
bun run mcp:http
# → http://localhost:8787/mcp
# http://localhost:8787/health Auth: Bearer or the local session file.
Auth rules
| Context | How you authenticate |
|---|---|
| Local stdio / local HTTP | feega login → shared session file |
| Remote HTTP | OAuth 2.1 + PKCE, or Authorization: Bearer <access_token> |
| Static API key | Not supported |
Protected resource metadata: GET /.well-known/oauth-protected-resource.
What to call first
query({ table: "brands", columns: ["id","slug","name"] })— — confirm auth and see which brands/orgs this session can seequery({ table: "posts", columns: ["id","status","caption"], where: [...] })— a brand's pending posts (add a brand_id filter once you have one)- Ids from list-derived reads accept short unambiguous prefixes; a `where` on `id` in `delete_row`/`update_row` needs the full id.
Twelve tools total — the CLI is narrower and brand-scoped, and does not expose the six generic ones below.
Tool areas
query reaches every table your org can see, as you: Postgres RLS returns exactly what you would see in the app. Always name columns, or the character cap drops whole rows to fit a long answer into a short one.
| Area | Examples |
|---|---|
| Reading and writing any table | query, insert_row, update_row, delete_row, describe_node_types |
| Canvas generation | run_node_generation |
| Ad campaigns | list_ad_campaigns, create_ad_campaign, approve_ad_campaign |
Full catalog, with parameters and CLI equivalents: tools.md.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 on /mcp | Missing or invalid Bearer on remote | Login locally and pass the access token, or use stdio |
| Tools missing | MCP not connected in the host | Check the Cursor MCP panel and restart the host |
| Auth works in CLI but not MCP | Different machine / no session file | Run feega login on the machine running the MCP server |
| 'conflict' on run_node_generation | Stale version — someone else wrote the node since you read it | Re-read the node with query, take its current version, retry |
Next
- Agent skill — install the feega skill so agents know when and how to call MCP or the CLI
- CLI — terminal commands when MCP is not available
- API reference — REST endpoints the CLI calls
- feega — source, tools map, and development notes