프로그래밍 API & AI 에이전트
표준 PostgREST 엔드포인트, Supabase Edge Functions 및 AI 준비 엔드포인트를 통해 Nine 워크스페이스 데이터를 조회, 자동화 및 동기화하세요.
AI 에이전트, Gemini & LLM 지원
MCP 프로토콜llms.txt standard자체 MCP (Model Context Protocol) 서버, OpenAPI 3.0 사양 및 llms.txt 컨텍스트를 통해 Nine을 Google Gemini 연결 앱, Claude Desktop 및 IDE 에이전트에 직접 연동하세요.
Google Gemini 연결 앱 설정
- 1. Gemini > 확장 프로그램 / 연결된 앱 > 맞춤 연결된 앱 설정으로 이동합니다.
- 2. '맞춤 앱 링크 추가'에 MCP 서버 URL을 입력합니다:
https://ninehoang.com/mcp?token=YOUR_API_TOKEN - 3. Client ID 및 Client Secret은 비워두고 다음을 누릅니다.
지원되는 MCP 도구
| Tool Name | Description | Parameters |
|---|---|---|
| create_expense | Record an expenditure in the workspace ledger. | name (string), amount (number), category_id (enum), method_id (enum), occurred_at?, note? |
| list_expenses | Retrieve recent expense records with date filtering, category filter, search, and pagination (up to 1,000). | limit? (max 1000), offset?, category_id?, method_id?, start_date?, end_date?, search? |
| update_expense | Modify an existing expense (amount, category, vendor title, payment method, date, or notes). | id (uuid), name?, amount?, category_id?, method_id?, occurred_at?, note? |
| delete_expense | Permanently delete an expense record by its UUID. | id (uuid) |
| list_funds | List active collective funds, target budgets, and real-time balance totals. | none (returns all funds in workspace) |
| get_fund | Retrieve full details, budget targets, participants, and ledger for a specific fund. | fund_id (uuid) |
| create_fund | Create a new group fund (trips, sports seasons, event budgets). | name (string), kind? ('Travel' | 'Badminton'), currency?, target_amount?, description? |
| update_fund | Update fund name, target goal, status ('Upcoming', 'In Progress', 'Completed'), or description. | fund_id (uuid), name?, status?, target_amount?, description? |
| create_fund_transaction | Record an income contribution or expense payout in a group fund. | fund_id (uuid), name (string), amount (number), category_id (enum), method_id (enum), occurred_at? |
| list_fund_transactions | Retrieve transactions and payouts across group funds with date filtering and pagination. | fund_id?, limit? (max 1000), offset?, category_id?, start_date?, end_date? |
| delete_fund_transaction | Delete a fund transaction record by its UUID. | id (uuid) |
| list_contacts | Query member roster and contact address book in the workspace with optional search. | search? (name, nickname, or phone query) |
| create_contact | Add a new member or participant to the workspace directory. | name (string), nickname?, phone?, email?, gender?, nationality? |
| update_contact | Update member information (name, nickname, phone, email). | id (uuid), name?, nickname?, phone?, email? |
인증 & 토큰 교환
외부 요청은 2단계 토큰 흐름으로 인증합니다. 워크스페이스 베어러 토큰을 1시간 유효한 JWT로 교환하세요.
curl -X POST \ "https://pdkklibrvyqnatsqwtyg.supabase.co/functions/v1/api-token" \ -H "Authorization: Bearer nh_ws_YOUR_API_TOKEN" \ -H "Content-Type: application/json"
curl "https://pdkklibrvyqnatsqwtyg.supabase.co/rest/v1/personal_transactions?select=*&order=occurred_at.desc&limit=20" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "apikey: sb_publishable_gZdZ09nTdrxLCHPa36rXeg_6DraJ4Ps"
SDK & 빠른 시작
표준 HTTP 클라이언트, JavaScript/TypeScript SDK 또는 Python을 사용하여 워크스페이스에 연결하세요.
curl "https://pdkklibrvyqnatsqwtyg.supabase.co/rest/v1/personal_transactions?select=*&order=occurred_at.desc&limit=20" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "apikey: sb_publishable_gZdZ09nTdrxLCHPa36rXeg_6DraJ4Ps"
리소스 엔드포인트 & 스키마
엄격한 Row Level Security 격리 환경에서 PostgREST를 통해 워크스페이스 리소스에 직접 접근하세요.
/rest/v1/personal_transactions| Field | Type | Description / Valid Options |
|---|---|---|
| id | uuid | Primary key identifier |
| name | text | Expense description / item (max 255 chars) |
| amount | numeric | Amount in workspace currency |
| category_id | enum | Options: 'food-drinks', 'entertainment', 'local-transport', 'clothing', 'beauty-care', 'sports', 'essentials', 'fixed-expenses', 'credit-repayment', 'installment-payment', 'family-support', 'travel', 'work-expenses', 'investments', 'other'. Read from `transaction_categories` (the rows offered to Expenses), so this list can grow without a deploy. |
| method_id | enum | Slugs from the transaction_methods table: 'cash', 'bank-transfer', 'mobile-wallet', 'credit-card', 'installment'. Read the live list from /openapi.json. |
| occurred_at | timestamptz | Date and time of transaction |
| note | text | Optional context or memo |
HTTP 상태 코드 & 속도 제한
PostgREST 및 Supabase Edge Functions에서 반환하는 표준 HTTP 상태 코드입니다.
Standard successful response for GET, PATCH, and DELETE operations.
Resource successfully created (POST personal_transactions, funds, etc.).
Malformed JSON payload, out-of-bounds numbers, or invalid enum selection.
Missing API token, expired 1-hour JWT, or token revoked via 0-ms kill switch.
Attempted to access an ungranted table (e.g. workspace_members, passwords).
Rate limit exceeded (60 req/min). Returns Retry-After header with wait seconds.
테넌트 격리 & 보안
모든 API 요청은 Postgres Row Level Security(RLS)를 통해 안전하게 격리됩니다. 시스템 자격 증명 및 내부 인증 설정은 완벽히 보호됩니다.
워크스페이스를 연결할 준비가 되셨나요?
워크스페이스 설정에서 직접 읽기 전용 또는 읽기/쓰기 권한의 API 토큰을 발급받고 관리하세요.