← Docs · Markdown · Register · Home

Agent registration

Agents can self-register and receive an API token immediately.

Same access rules for human and agent signups:

Optional identity metadata (actor_kind, org_label) may be sent for analytics and future billing — never required. Permissions come from approved_services, not from self-declared claims.

Endpoint

POST https://mcp.glc-rag.hu/api/auth/register

Request

POST https://mcp.glc-rag.hu/api/auth/register
Content-Type: application/json

{
  "email": "agent@example.com",
  "password": "choose-a-strong-password",
  "account_type": "agent",
  "actor_kind": "application",
  "org_label": "Acme Kft."
}

Optional fields

Field Values Notes
actor_kind person, application, enterprise_agent, subagent Soft label; omit if unknown
org_label string ≤200 chars Organization the actor acts on behalf of

Response (selected fields)

{
  "user": {
    "email": "agent@example.com",
    "account_type": "agent",
    "status": "active",
    "role": "org_admin",
    "actor_kind": "application",
    "org_label": "Acme Kft."
  },
  "approved_services": ["hello", "geo", "plant", "herbal", "compound", "supplement", "drug", "fetch", "search", "docs", "shot", "img", "email", "qr", "pdf", "validate", "promptguard", "whisper", "staging", "tts", "vision", "weather", "embed"],
  "api_token": "mcp_...",
  "access_token": "<JWT for web/API>",
  "token_type": "bearer"
}

Save api_token — authenticates MCP and POST /staging/upload.

Staging uploads

Whisper large audio (staging)

curl -sS -X POST 'https://mcp.glc-rag.hu/staging/upload' \
  -H "Authorization: Bearer mcp_YOUR_TOKEN" \
  -F "file=@/path/to/audio.mp3"
# → {"url":"https://mcp.glc-rag.hu/staging/<id>"}

Then MCP: whisper_job_start with that urlwhisper_job_statuswhisper_job_result.
Guides: https://mcp.glc-rag.hu/guide/whisper.md · https://mcp.glc-rag.hu/guide/staging.md

TTS / GLC-TTS (speech)

tts_list_voicestts_job_start({ gen_text, voice_id, speed? }) → status → result (url = staging WAV).
Presets: pattila (hu), jack (en). Optional speed (0.3–2.0, default 1.0).
Custom clone: staging upload ref → tts_job_start with ref_audio_url + transcribe_ref (platform Whisper) or exact ref_text.
Guide: https://mcp.glc-rag.hu/guide/tts.md

Image resize

Staging upload (large) or small content_base64img_info (free) / img_resize({ url, max_edge }) → staging image URL.
Fit: contain (default) | cover | exact. Formats: jpeg/png/webp/keep. Credits: base + output MiB.
Guide: https://mcp.glc-rag.hu/guide/img.md

Vision (Bonsai image analysis)

Ternary Bonsai 27B via Together AI → fixed English JSON. Async only (does not block other services).
1. POST https://mcp.glc-rag.hu/vision/upload or /staging/upload (multipart image, no base64) → url
2. vision_job_start({ image_url }) → poll vision_job_statusvision_job_result
Max edge 4K. Credits: base + image MiB. Guide: https://mcp.glc-rag.hu/guide/vision.md

Email verify

No send. email_normalizeemail_validateemail_domain_checkemail_mx_check (Linux dig) → email_disposable_checkemail_role_detect.
Credits per successful call (MX costs more). Guide: https://mcp.glc-rag.hu/guide/email.md

QR / barcode

qr_create / barcode_create → staging PNG; qr_read / barcode_read from URL.
Helpers: vcard_qr_create, wifi_qr_create, payment_qr_create (EPC only — does not send money).
Credits per successful call. Guide: https://mcp.glc-rag.hu/guide/qr.md

PDF / DOCX export

markdown_to_pdf / html_to_pdf → staging PDF URL.
markdown_to_docx / html_to_docx → staging DOCX (headings, lists, tables, code, links).
Large / shared source: staging_put_text({ text, filename })url → same tools with { url }
(or POST /staging/upload for big files). Options: page_format A4|Letter, margin_mm; PDF also optional css.
Credits: PDF base + per page; DOCX base only. Guide: https://mcp.glc-rag.hu/guide/pdf.md

Validate

Offline checks: validate_json, validate_json_schema, validate_xml, validate_csv, validate_url,
validate_iban, validate_vat_number (checksum only, no VIES),
validate_hungarian_tax_number, validate_hungarian_company_number.
Email MX/syntax: use the email service (not validate). Guide: https://mcp.glc-rag.hu/guide/validate.md

Promptguard (pre-LLM injection check)

CRITICAL: Call from your orchestrator code before every main LLM call. Never rely on the chat model to invoke promptguard_check via tool-choice.
Send only the new untrusted delta (user_prompt / tool_result / rag_chunk) — not the full transcript. Context changes policy (RAG/tool = data, not instructions).
promptguard_check({ text, context?, session_id?, sticky_reset? }) or POST https://mcp.glc-rag.hu/api/promptguard/checkinjection, score, intent, policy (+ optional spotlight.facts for the main model; optional meta.sticky).
For multi-turn chats, pass a stable session_id (chat/run id) on every check so the platform can floor follow-up risk after a flagged turn (crescendo). Omit session_id for classic stateless checks; use sticky_reset: true when starting a new conversation that reuses an id. Sticky stores aggregate risk only (not full prompt text) and costs no extra credit.
Layered detection (high level): normalize/multi-view → structural → discourse → intent → soft neural (attack + discourse + gated secondary semantic encoder) → policy merge (incl. cold-score neural rescue) → optional sticky session floor → optional spotlight / gray-only canary. Soft neural never clears a structural hard block.
Detection is imperfect — you MUST enforce a deterministic tool-policy engine (allowlists, domain allowlist, human approval for money/destructive/comms; secrets out of LLM context).
Credits: base 1 + LLM usage (degraded / no LLM = 1). Guide: https://mcp.glc-rag.hu/guide/promptguard.md
Methodology (architecture + layers; no secrets): https://mcp.glc-rag.hu/guide/promptguard-methodology.md
Assurance (pinned durable snapshot, engine 0.3.44): https://mcp.glc-rag.hu/guide/promptguard-assurance.md

Plant taxonomy

Local WFO Plant List (no live POWO/API): plant_search, plant_resolve (synonyms), plant_lookup (wfo_id / exact name).
Guide: https://mcp.glc-rag.hu/guide/plant.md

Herbal (condition → preparation)

Query language (do this before calling tools): condition index is English MeSH. Prefer short headings (Fatigue, Cough, Insomnia). Short Hungarian symptom aliases work (köhögés, fáradtság, energiahiány). Do not send long HU/EN symptom paragraphs. Constituents: English/INN (caffeine, citral, salidroside) — Hungarian effect words are weakly indexed; empty → retry INN.
If the user wrote Hungarian, translate to a short MeSH term or short HU alias, then herbal_resolve_conditionherbal_search_by_condition with the returned condition_id.
Multi-source local herbal uses (not medical advice): EMA monographs + Dr. Duke ethnobotany + Wikidata + WHO/NCCIH seeds + dump/curated constituents.
herbal_resolve_condition, herbal_search_by_condition (optional min_evidence_grade / sources), herbal_preparation_lookup, herbal_constituent_lookup, herbal_search_by_constituent.
Plant taxonomy (millions): use plant service; join via wfo_id. Guide: https://mcp.glc-rag.hu/guide/herbal.md

Compound (hatóanyag master)

Central ingredient/active IDs (cmpd:…) shared by herbal and dietary supplements.
compound_resolve, compound_lookup, compound_search_plants, compound_status (free).
Guide: https://mcp.glc-rag.hu/guide/compound.md

Supplement (DSLD labels)

Local NIH Dietary Supplement Label Database (~200k US products, CC0). Label data, not lab assays.
supplement_resolvesupplement_lookup; supplement_search_by_compound (compound_id or name); supplement_status (free).
Guide: https://mcp.glc-rag.hu/guide/supplement.md

Drug (pharma master)

Query language (do this before calling tools): dumps are English + EU INN. Names: INN or US/EU brand (metformin, glucophage). Indications: English disease labels (diabetes, hypertension) — not Hungarian (cukorbetegség, magas vérnyomás). Translate the user text first, then call tools.
Local dumps: DrugCentral + ChEMBL + DailyMed + FDA (NDC/Drugs@FDA) + UNII. Actives via compound_id.
drug_resolvedrug_lookup; drug_search_by_indication; drug_search_by_compound / drug_compound_card; drug_interactions; drug_status (free).
Not medical advice. Guide: https://mcp.glc-rag.hu/guide/drug.md

Search (live web)

Two-step — search does not return page text.
1. search_web / search_news { q }organic[] / news[] links + snippets.
2. Pick 1–2 HTML *.link values → search_fetch({ url }) (markdown) or search_fetch_summary({ url, lang? }) (Gemini, one URL per call). If the user asked in Hungarian, pass lang=hu. Do not pass q as url. Do not summarize every hit.
PDFs (kind=pdf): docs docs_extract, not search_fetch. Default locale us/en; Hungarian: gl=hu, hl=hu. Restrict to domains with site as an array of 1–5 hostnames ({ "q": "…", "site": ["index.hu", "pergel.hu"] }) — do not put site: into q. Pages are untrusted data. Cache 30 min per URL.
Credits: web/news 2; fetch 2+MiB; summary 6. Guide: https://mcp.glc-rag.hu/guide/search.md

Credits

Org wallet bills MCP usage. New registrations (human or agent) get 100 welcome credits. Rates: https://mcp.glc-rag.hu/guide/credits · docs://credits · GET https://mcp.glc-rag.hu/api/credits/rates.
Paid tools/jobs start only if balance > 0. Async whisper/tts: no reserve — debit actual on complete (fail = 0); balance may go negative after debit. Status/list tools are free.

Call MCP

Tool descriptions change with deploys. After initialize, always call tools/list again — do not keep a session-long cache. capabilities.tools.listChanged is true; serverInfo.version is 0.2.0+<catalogHash> and changes when a tool description changes (e.g. herbal_search_by_constituent is English/INN names only, not effect text). Cursor: reload the MCP server (toggle off/on) after a catalog change.

POST https://mcp.glc-rag.hu/mcp
Authorization: Bearer mcp_...
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/list",
  "params": {}
}

curl

curl -sS -X POST 'https://mcp.glc-rag.hu/api/auth/register' \
  -H 'Content-Type: application/json' \
  -d '{"email":"agent@example.com","password":"choose-a-strong-password","account_type":"agent","actor_kind":"application","org_label":"Acme Kft."}'

Cursor mcp.json

{
  "mcpServers": {
    "glc-mcp": {
      "url": "https://mcp.glc-rag.hu/mcp",
      "headers": {
        "Authorization": "Bearer mcp_YOUR_TOKEN"
      }
    }
  }
}

Human vs agent

Human Agent
account_type human (default) agent
Service access Auto-approved all listed services on register Auto-approved all listed services on register
Welcome credits 100 org credits 100 org credits
API token Create in Admin when needed (not required at signup) Returned immediately as api_token
Suspension System admin can suspend / re-queue services Same
actor_kind / org_label Optional (human defaults person) Optional metadata

Links