api-server-mcp

api-server-mcp is a skill for Claude Code, Codex from kreuzberg-dev/kreuzberg-lts. It costs 9 tokens per session (2,141 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 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,141 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.00009 $0.02141
Opus 5 $0.00005 $0.01071
Sonnet 5 $0.00002 $0.00428
Haiku 4.5 $0.00001 $0.00214

Measured 10d ago against content hash b99bef0b3741, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 · 213 lines

How it starts

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

API Server & MCP Protocol

Axum server design for document extraction endpoints, middleware, async processing, and Model Context Protocol integration for AI agents

Kreuzberg API Architecture

Location: crates/kreuzberg/src/api/, crates/kreuzberg-cli/

Kreuzberg provides a dual REST API + MCP server built with Axum + Tokio.

Request Flow:
HTTP Client / AI Agent (Claude)
    |
[Transport Layer]
├── REST API (Axum HTTP)
└── MCP Protocol (HTTP or Stdio)
    |
[Middleware Layer]
├── CORS, Request Logging (TraceLayer)
├── Request/Response size limits
└── Rate limiting (optional)
    |
[Router]
├── REST Endpoints
│   ├── POST /extract - File upload extraction
│   ├── POST /extract-url - URL-based extraction
│   ├── GET /formats - List supported formats
│   ├── GET /health - Server health check
│   ├── POST /batch - Batch document processing
│   ├── GET /cache/stats - Cache statistics
│   └── DELETE /cache - Clear extraction cache
├── MCP Endpoints
│   ├── POST /mcp/tools - List available tools
│   ├── POST /mcp/tools/call - Call a tool
│   ├── GET /mcp/resources - List resources
│   ├── GET /mcp/resources/:uri - Read resource
│   ├── GET /mcp/prompts - List prompts
│   └── GET /mcp/prompts/:name - Get prompt
    |
[Handler / Tool Layer]
├── extract_handler / extract_file tool
├── batch_handler / batch_extract tool
├── health_handler / get_capabilities tool
└── format_handler
    |
[Extraction Core]
├── Format detection
├── Extraction pipeline
├── Post-processing (chunking, embeddings)
└── Result formatting
    |
JSON Response / MCP ToolResult

Server Setup & Configuration

Location: crates/kreuzberg/src/api/server.rs

Server initialization pattern: Create ApiState (holds ExtractionConfig + ExtractionCache), build Axum Router with all REST + MCP routes, apply middleware layers (body limits, CORS, tracing), serve via tokio::net::TcpListener.

Key middleware layers applied in order:

  • DefaultBodyLimit::max(100MB) + RequestBodyLimitLayer -- configurable via env vars
  • CorsLayer::permissive() -- restrict in production via CORS_ALLOWED_ORIGINS
  • TraceLayer::new_for_http() -- request/response logging

Read the full file on GitHub · 213 lines

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 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 (14 stars, last pushed 4d ago), licensed MIT. It adds 9 tokens to every session and 2,141 once invoked, about $0.0000 per session on Opus 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 · 94 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 · 98 tokens

api-server-mcp

REST API server and MCP protocol integration.

xberg-io/xberg · 12 tokens