Intake-Triage
Classify raw text into structured triage objects with intent, urgency, category, and sentiment. Zero-config MCP tool for support intake, lead routing, and ticket automation
README
Intake Triage & Classification API
A pay-per-call API that accepts raw unstructured text (emails, support tickets, Slack messages, voicemail transcripts) and returns a guaranteed-schema JSON triage object with intent, urgency, sentiment, entities, and routing.
Quick Start
curl -X POST https://your-domain.com/triage \
-H "Content-Type: application/json" \
-H "X-API-Key: sk_live_abc123" \
-d '{
"text": "Hi, I placed an order three days ago (order #8821) and still haven't received a shipping confirmation. This is really frustrating. Can someone help? - James, james@example.com",
"context": "ecommerce_support"
}'
Response:
{
"schema_version": "v1",
"intent": "order_status_inquiry",
"urgency": "medium",
"sentiment": "frustrated",
"entities": {
"order_id": "8821",
"issue": "missing shipping confirmation",
"contact_name": "James",
"contact_email": "james@example.com",
"product": null,
"company": null,
"phone": null,
"date_mentioned": null
},
"suggested_routing": "order_fulfillment",
"summary": "Customer James reporting no shipping confirmation received 3 days after placing order #8821.",
"tags": ["order", "shipping", "delay"],
"confidence": 0.96,
"processing_time_ms": 312,
"model_used": "gpt-4o-mini"
}
Setup
git clone <repo-url> && cd intake-triage-api
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # fill in your keys
python main.py
API Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /triage |
API Key | Classify text and return triage JSON |
| GET | /health |
None | Health check |
| GET | /schema |
None | Full JSON Schema of the output model |
| GET | /usage |
API Key | Current usage stats for your key |
| POST | /keys/provision |
Admin Key | Create a new API key |
| GET | /docs |
None | Swagger UI |
Input Schema
| Field | Type | Required | Description |
|---|---|---|---|
text |
string | Yes | Raw unstructured text to classify |
context |
string | No | Business context hint (e.g. ecommerce_support) |
schema_version |
string | No | "v1" (default) |
Output Schema
| Field | Type | Description |
|---|---|---|
schema_version |
"v1" |
Response schema version |
intent |
enum | support_request, sales_inquiry, billing_question, complaint, feature_request, general_question, spam, appointment_request, refund_request, order_status_inquiry, technical_issue, unclear |
urgency |
enum | critical, high, medium, low |
sentiment |
enum | positive, neutral, frustrated, angry, confused, urgent |
entities |
object | Extracted entities: order_id, issue, contact_name, contact_email, product, company, phone, date_mentioned (all nullable) |
suggested_routing |
enum | support_team, sales_team, billing_team, technical_team, management, order_fulfillment, unroutable |
summary |
string | One-sentence summary |
tags |
string[] | Lowercase keyword tags |
confidence |
float | 0.0–1.0 confidence score |
processing_time_ms |
int | Processing time in ms |
model_used |
string | LLM model used |
Authentication
Pass your API key in the X-API-Key header with every request.
To get an API key, email api@yourdomain.com with your use case.
Rate Limits
60 requests per minute per API key. Exceeding this returns 429.
Using as an MCP Server (Claude Desktop)
Add to your Claude Desktop claude_desktop_config.json:
{
"mcpServers": {
"intake-triage": {
"url": "http://localhost:8001/sse"
}
}
}
The MCP server exposes one tool: triage_text(text, context?) which returns the full triage JSON object.
Using in n8n
- Add an HTTP Request node
- Set method to POST
- URL:
https://your-domain.com/triage - Headers:
X-API-Key: your_key,Content-Type: application/json - Body (JSON):
{ "text": "{{ $json.message }}" } - The response JSON is directly usable in downstream nodes for routing
Using in Make / Zapier
Use the HTTP module with the same POST configuration as above. The guaranteed JSON schema means you can map output fields directly without parsing.
Pricing
| Plan | Price | Calls/month |
|---|---|---|
| Free | $0 | 500 |
| Starter | $19/mo | 10,000 |
| Agency | $99/mo | 100,000 |
Marketplace Listings
- RapidAPI: https://rapidapi.com/your-listing (coming soon)
- Smithery: https://smithery.ai/your-listing (coming soon)
Deployment
Docker
docker build -t intake-triage-api .
docker run -p 8000:8000 -p 8001:8001 --env-file .env intake-triage-api
Fly.io
fly launch
fly secrets set OPENAI_API_KEY=sk-... ADMIN_KEY=...
fly deploy
Running Tests
pytest tests/ -v
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。