Content Classifier

by garyedgington

329 downloads
Not rated
GitHub

About

Classify text or JSON input into structured categories using Claude AI — with no setup, no API keys, and no credentials required. Connect directly and start classifying immediately.

Details

Author
garyedgington
Downloads
329
Categories
Other, AI

- Classify text or JSON into five built‑in presets or a custom taxonomy
- Optional multi‑label output returning a ranked list of all matching labels
- x402 micropayment integration – $0.005 USDC per call on Base mainnet
- Free trial endpoint with 4KB input limit and two presets (sentiment, topic)
- MCP tool over SSE transport for Claude Desktop and MCP‑compatible agents
- Chains with Formatter and SchemaCheck agents in the x402 task market

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Content Classifier
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The server exposes a single MCP tool classify_content via SSE transport at https://project-classifier-production.up.railway.app/sse. REST endpoints are also available: POST /v1/classify (paid, requires x402 payment header) and POST /v1/classify/trial (free, with limits). Provide parameters such as input, preset, taxonomy, multi_label, and explain to classify content.

classify_content

Classify text or JSON input into a category using Claude AI. Supports five built-in presets and caller-supplied custom taxonomies. Returns the top label, confidence score, ranked list of all labels, and an optional one-sentence reasoning string. Args: input: Text or JSON string to classify. Max 32KB. input_type: "text" (default) or "json". When json, the string is parsed before classification. preset: Built-in taxonomy — sentiment | topic | intent | urgency | custom. sentiment: positive, neutral, negative. topic: technology, finance, health, legal, science, sports, other. intent: question, request, complaint, feedback, informational. urgency: critical, high, medium, low. custom: use your own labels via the taxonomy parameter. taxonomy: Required when preset=custom. List of 2–20 label strings. multi_label: When True, labels array contains all taxonomy labels ranked by confidence. explain: When True, include a one-sentence reasoning string. Returns: label (str), confidence (float), labels (list), reasoning (str|null), meta (dict).

classify_content_trial

Classify text into a category using Claude AI (free trial — limited presets, 4KB max). Supports sentiment and topic presets only. Multi-label is always disabled. Use classify_content for full access: all presets, custom taxonomies, 32KB input. Args: input: Text to classify. Max 4KB on trial. preset: sentiment (positive/neutral/negative) or topic (technology/finance/health/…). explain: When True, include a one-sentence reasoning string. Returns: label (str), confidence (float), labels (list), reasoning (str|null), meta (dict).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "content classifier": {
            "x402-classifier": {
                "url": "https://web-production-2d1051.up.railway.app/sse"
            }
        }
    }
}

McpServers

{
    "x402-classifier": {
        "url": "https://web-production-2d1051.up.railway.app/sse"
    }
}

x402 Content Classifier

Classify text or structured data into categories using Claude AI. Optional confidence scoring and multi-label output. Part of the x402 micropayment task market.

Live service: https://project-classifier-production.up.railway.app _(pending deployment)_
Smithery: gary-edgington/x402-content-classifier _(pending submission)_
Payment: $0.005 USDC per call · x402 v2 · Base mainnet

---

Supported Classification Modes

| Preset | Labels | Use case |
|---|---|---|
| sentiment | positive, neutral, negative | Tone analysis |
| topic | technology, finance, health, legal, science, sports, other | Content routing |
| intent | question, request, complaint, feedback, informational | Support triage |
| urgency | critical, high, medium, low | Prioritization queues |
| custom | caller-supplied taxonomy | Any domain |

---

Endpoints

POST /v1/classify — Paid

Requires x402 payment header. $0.005 USDC on Base mainnet.

Request body:

{
"input": "<text or JSON string to classify>",
"input_type": "text",
"preset": "sentiment",
"taxonomy": [],
"multi_label": false,
"explain": true
}

Query params:
- ?multi_label=true — return ranked list of all matching labels rather than a single top label.

Response (200):

{
"label": "positive",
"confidence": 0.92,
"labels": [
{"label": "positive", "confidence": 0.92},
{"label": "neutral", "confidence": 0.06},
{"label": "negative", "confidence": 0.02}
],
"reasoning": "The text expresses strong satisfaction and approval with no negative indicators.",
"meta": {
"preset": "sentiment",
"multi_label": false,
"input_type": "text",
"model": "claude-haiku-4-5"
}
}

Response (402 — no payment):

{
"x402Version": 2,
"accepts": [{
"scheme": "exact",
"network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000",
"payTo": "0x8fC4006534801c17A3368075A1Fb3b3C511EdB1F",
"maxTimeoutSeconds": 300
}],
"error": "Payment required"
}

---

POST /v1/classify/trial — Free

No payment required. Same classification logic. Limits: 4KB max input, single-label only, sentiment and topic presets only.

---

GET /health

{ "status": "ok", "service": "classifier-agent", "version": "0.1.0" }

---

MCP Tool

This service exposes a single MCP tool via SSE transport for use with MCP-compatible agents and Claude Desktop.

SSE endpoint: https://project-classifier-production.up.railway.app/sse

classify_content

Classify text or structured data into a category using Claude AI.

| Parameter | Type | Required | Description |
|---|---|---|---|
| input | string | ✅ | Text or JSON string to classify |
| input_type | string | — | text (default) or json |
| preset | string | — | sentiment, topic, intent, urgency, or custom |
| taxonomy | array | — | Custom label list (required when preset=custom) |
| multi_label | boolean | — | If true, return ranked label list |
| explain | boolean | — | If true, include reasoning string |

---

x402 Payment Details

| Setting | Value |
|---|---|
| Network | Base mainnet (eip155:8453) |
| USDC contract | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Amount | 5000 atomic units ($0.005) |
| Receiving wallet | 0x8fC4006534801c17A3368075A1Fb3b3C511EdB1F |
| Facilitator | https://api.cdp.coinbase.com/platform/v2/x402 |
| EIP-712 domain | USD Coin |

---

Pipeline Example

Agents can chain services via the A2A hub discovery manifest:

Raw CSV → Formatter (/v1/format) → Classifier (/v1/classify)
Raw JSON → Schema Checker (/v1/schema-check) → Classifier (/v1/classify)

Each hop settles independently on Base mainnet via x402.

---

Ecosystem

This service is part of a three-service x402 task market:

- SchemaCheck Agent — JSON Schema validation
- Formatter — data format conversion
- Classifier (this service) — content classification
- A2A Hub — service discovery

Full capability manifest: GET https://project-a2a-production.up.railway.app/v1/capabilities

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.