3.3 KiB
3.3 KiB
name, description
| name | description |
|---|---|
| attio-reverse-engineering | Reverse-engineer and integrate Attio CRM (AI models, API, MCP) into OMP — covers internal endpoints, auth, gateway, and provider wiring |
Attio Reverse Engineering & OMP Integration
Architecture
Attio Web App (app.attio.com)
├── Public API: api.attio.com/v2 (Bearer token from Settings → Developers → API Keys)
├── Internal AI: app.attio.com/api/internal/chat/completions (session cookie auth, Cloudflare-protected)
├── MCP: mcp.attio.com/mcp (OAuth: openid offline_access mcp)
└── SPA: React, all /api/* GET routes return HTML (not API JSON)
OMP Integration:
├── attio-gateway.py :8312 — FastAPI, round-robin API key pool, proxies api.attio.com/v2
├── attio-api-provider.py :8313 — OpenAI-compatible, /v1/models + /v1/chat/completions + tools
├── attio_mcp.py — MCP stdio server, 3 tools (list_workspaces, search_people, get_record)
└── mcp.json — attio (remote http OAuth) + attio-farm (local stdio)
Auth Methods
- API Key (for api.attio.com/v2):
Authorization: Bearer att_...— works from any client - Session Cookies (for app.attio.com/internal): requires real browser — Cloudflare blocks urllib/requests
- OAuth JWT (for mcp.attio.com/mcp): obtained via OAuth consent flow, stored in mcp.json
Internal AI Endpoint
- URL:
POST https://app.attio.com/api/internal/chat/completions - Auth: session cookies (
attio-session,attio-app-session,attio-session-id) - Blocked by Cloudflare Error 1010 for non-browser requests
- Models available: Claude Opus 5, Claude Sonnet 5 (names in Attio: "Opus 5", "Claude Sonnet 5")
- Other probe results:
/{workspace}/api/chatreturns 405 (exists but different method)
OMP Provider Wiring (3 files)
providers.yml: underproviders:, add entry withapiKey: "",baseUrl,models,provider: openaimodels.yml: detailed config per model (api, contextWindow, maxTokens, compat flags)config.yml: addprovider/*toenabledModelsAND provider tomodelProviderOrder- Without enabledModels, /model won't show the provider at all
- OMP restart required after changes
Pool Format (attio_accounts.json)
[{
"email": "...",
"api_key": "att_...",
"api_workspace_id": "uuid",
"api_workspace_slug": "slug",
"cookies": [
{"name": "attio-session", "value": "jwt...", "domain": ".attio.com"},
{"name": "attio-app-session", "value": "jwt...", "domain": ".attio.com"},
{"name": "attio-session-id", "value": "uuid", "domain": ".attio.com"}
],
"status": "active_pro_trial"
}]
Browser Automation Issues
- Camoufox: launch hangs (GeoIP lookup or binary issue on Windows)
- Playwright: chromium binary missing, install needed; node.exe must be copied to driver/
- Patchright: driver node.exe missing
- curl_cffi: fails to compile on Windows CPython 3.11
- Browser relay (OMP): times out, extension may not be connected
- Chrome CDP: port 9224 listening but OMP browser tool can't connect (503)
Working Tools
attio_list_workspaces— reads pool from JSON, no API call neededattio_search_people— POST /v2/objects/people/records/query with filterattio_create_person— POST /v2/objects/people/records with valuesattio_get_record— GET /v2/objects/{type}/records/{id}