api-server-mcp

api-server-mcp is a skill for Claude Code, Codex from kreuzberg-dev/kreuzberg-lts. It costs 17 tokens per session (733 once invoked), scanned A, original, MIT.

A server-development guide for Kreuzberg, a document-extraction service that exposes both web endpoints and the Model Context Protocol, a standard way for AI agents to call tools and read resources. It covers routing, middleware, asynchronous processing, REST endpoints, and MCP integration.

In plain words
What is it for?
Use it when adding or changing extraction APIs, URL or batch processing, format and health endpoints, cache controls, rate limits, or MCP tools and resources.
Why use it?
It keeps file extraction, health checks, batch jobs, caching, request limits, logging, and agent access organized in one server design.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding or changing extraction APIs, URL or batch processing, format and health endpoints, cache controls, rate limits, or MCP tools and resources.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kreuzberg-dev/kreuzberg-lts/api-server-mcp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kreuzberg-dev/kreuzberg-lts --skill api-server-mcp
Clone the repo
git clone --depth 1 https://github.com/kreuzberg-dev/kreuzberg-lts

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for api-server-mcp

README.md
[![agentmods](https://agentmods.dev/badge/skills/kreuzberg-dev/kreuzberg-lts/api-server-mcp/github.svg)](https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/api-server-mcp)
Your own site
<a href="https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/api-server-mcp"><img src="https://agentmods.dev/badge/skills/kreuzberg-dev/kreuzberg-lts/api-server-mcp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for api-server-mcp

Your own site · 80×15
<a href="https://agentmods.dev/skills/kreuzberg-dev/kreuzberg-lts/api-server-mcp"><img src="https://agentmods.dev/badge/skills/kreuzberg-dev/kreuzberg-lts/api-server-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 733 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 38
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • high Tool Misuse · line 86
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Rogue Agent · line 66
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.00733
Opus 5.5 $0.00007 $0.00293
Sonnet 5.5 $0.00003 $0.00147
Haiku 4.5 $0.00002 $0.00073

Measured 10d ago against content hash 128b0890ce33, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

api-server-mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.ai-rulez/skills/api-server-mcp/SKILL.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API Server and MCP Protocol

Use the 4.x implementation in this repository. REST and MCP have separate transports; do not invent REST subroutes for MCP tools.

REST routes

crates/kreuzberg/src/api/router.rs registers:

  • POST /extract, /extract-structured, /detect, /embed, /chunk, /cache/warm.
  • GET /formats, /health, /info, /version, /cache/stats, /cache/manifest.
  • DELETE /cache/clear.
  • PUT /process and POST /v1/convert/file for Open WebUI compatibility.
  • GET /openapi.json when the api feature is enabled.

Read the individual handler request types before constructing requests. The router applies configurable body limits, CORS, tracing, request IDs, compression and panic handling. Restrict production CORS with KREUZBERG_CORS_ORIGINS; the permissive default is not a security boundary.

api/error.rs maps validation and unsupported formats to HTTP 400, parsing/OCR failures to 422, and other extraction errors to 500. JSON responses carry error_type, message, optional traceback, and status_code. JSON syntax, content type and multipart rejection handling have their own statuses. Preserve those contracts when changing handlers.

MCP tools and transport

crates/kreuzberg/src/mcp/server.rs implements thirteen tools:

extract_file, extract_bytes, batch_extract_files, detect_mime_type, cache_stats, list_formats, cache_clear, get_version, cache_manifest, cache_warm, embed_text, extract_structured, chunk_text.

Read schemas in mcp/params.rs. File extraction uses path, bytes extraction uses base64 data, and batch extraction uses paths. Extraction tools accept an optional config JSON object and response_format (json or toon); batches additionally accept file_configs, a parallel array of optional per-file configurations. Do not substitute file_path, file_paths, or arbitrary flattened extraction flags.

MCP results are CallToolResult values: decode the text content using the requested wire format and inspect the MCP error flag. JSON extraction payloads use the 4.x flat ExtractionResult; a batch payload is an array. Do not apply a newer product's result envelope.

Read the full file on GitHub · 55 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago Changed · -158 lines · +8 tokens per session 128b0890ce33
  2. 1mo ago Changed ec4dcde90f13
  3. 1mo ago First seen · 213 lines · 9 tokens per session scan A b99bef0b3741

Subscribe to this mod's changes

api-server-mcp is a skill published in the GitHub repository kreuzberg-dev/kreuzberg-lts (18 stars, last pushed 9d ago), licensed MIT. It adds 17 tokens to every session and 733 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

doc-reader

PDF/DOCX/XLSX/image document intelligence — text extraction, table parsing, OCR, financial statement analysis, contract clause detection, document classification, and format conversion. Use when reading, analyzing, extracting data from, or converting documents.

JansenAnalytics/claudex · 51 tokens

paddleocr-doc-parsing

A document-parsing tool configuration for extracting structured Markdown or JSON from complex PDFs and document images, including tables, formulas, charts, and multi-column pages.

PaddlePaddle/PaddleOCR · 140 tokens

paddleocr-text-recognition

An optical character recognition tool configuration for extracting text from images, photos, scans, screenshots, and scanned PDFs. OCR means converting text visible in an image into machine-readable text.

PaddlePaddle/PaddleOCR · 125 tokens

wasm-constraints

WASM build constraints for the crates/xberg-wasm crate — the wasm-target feature set, no-tokio sync-only internal APIs, the crate-private SyncExtractor trait, the 2 MB HTML size limit, size-optimized build config (opt-level="z"), and the async-wrapper/sync-internal API pattern. Load when building for wasm32, adding or…

xberg-io/xberg · 89 tokens

feature-flag-policy

Cargo feature flags for crates/xberg — ORT-incompatible targets (WASM, Android x8664 emulator), type-only and tract inference companion features, WASM/Android-safe variants, PDF backend, mutually-exclusive ORT variants, platform-conditional deps, aggregate feature sets, and build profiles. Load when adding, wiring, or…

xberg-io/xberg · 93 tokens

api-server-mcp

REST API server and MCP protocol integration.

xberg-io/xberg · 7 tokens