api-server-mcp

api-server-mcp is a skill for Claude Code, Codex from xberg-io/xberg. It costs 7 tokens per session (1,524 once invoked), scanned A, original, MIT.

A guide to the Rust server that exposes Xberg document extraction through REST APIs and the Model Context Protocol, a standard way for AI tools to call external capabilities. It documents routes for extraction, detection, jobs, formats, health, version information, caching, and document conversion.

In plain words
What is it for?
Use it to add or diagnose API and MCP integrations, accept files or URLs for extraction, queue or cancel jobs, detect document formats, check service health, inspect cache state, and connect external conversion clients.
Why use it?
Knowing the exact routes and handlers prevents integrations from targeting files or endpoints that do not exist. It also clarifies how to submit synchronous or queued extraction work and how to inspect or manage jobs and caches.

Skill for Claude CodeCodex

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

Good fit Use it to add or diagnose API and MCP integrations, accept files or URLs for extraction, queue or cancel jobs, detect document formats, check service health, inspect cache state, and connect external conversion clients.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xberg-io/xberg/api-server-mcp
About the project

Xberg is a document-intelligence engine that reads files, URLs, archives, and source trees and extracts text, metadata, images, tables, and structured data, with additional code-language understanding. Developers use it through language bindings, a command-line tool, REST API, or MCP server, and the catalogue entries support those integrations.

xberg-io/xberg · 9,433 stars · on GitHub · docs.xberg.io

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 xberg-io/xberg --skill api-server-mcp
Clone the repo
git clone --depth 1 https://github.com/xberg-io/xberg

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/xberg-io/xberg/api-server-mcp/github.svg)](https://agentmods.dev/skills/xberg-io/xberg/api-server-mcp)
Your own site
<a href="https://agentmods.dev/skills/xberg-io/xberg/api-server-mcp"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/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/xberg-io/xberg/api-server-mcp"><img src="https://agentmods.dev/badge/skills/xberg-io/xberg/api-server-mcp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 7 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,524 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: 2 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 22
    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 28
    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.
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.00007 $0.01524
Opus 5.5 $0.00003 $0.00610
Sonnet 5.5 $0.00001 $0.00305
Haiku 4.5 $0.00001 $0.00152

Measured 9d ago against content hash 0d9fe294707b, 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 9d 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 · 128 lines

How it starts

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

API Server & MCP Protocol

Axum server for document extraction, plus the rmcp Model Context Protocol surface

Locations: crates/xberg/src/api/ (router.rs, handlers.rs, startup.rs, types.rs, error.rs, jobs.rs) and crates/xberg/src/mcp/. There is no api/server.rs.

REST routes

Registered in api/router.rs, all on one Router:

Route Handler
POST /extract extract_handler — multipart files, URL fields, or JSON; builds ExtractInput
POST /extract-async extract_async_handler — queues a job
GET/DELETE /jobs/{job_id} job_status_handler / cancel_job_handler
POST /detect detect_handler
GET /formats formats_handler
GET /health health_handler
GET /info, GET /version info_handler, version_handler
GET /cache/stats cache_stats_handler
DELETE /cache/clear cache_clear_handler
GET /cache/manifest, POST /cache/warm cache_manifest_handler, cache_warm_handler
PUT /process, POST /v1/convert/file openweb_external_handler, openweb_docling_handler (api/openweb.rs)
GET /openapi.json openapi_schema_handler (feature api)
GET /metrics metrics_handler (feature prometheus)

There is no POST /extract-url (URL ingestion is a field on ExtractInput passed to /extract) and no POST /batch (batch is /extract-async + /jobs/{job_id}).

Middleware, in order: DefaultBodyLimit::max(limits.max_request_body_bytes) + RequestBodyLimitLayer (default 100 MB), CORS, request-id, compression, catch-panic, sensitive-header stripping, tracing. CORS is built explicitly as CorsLayer::new().allow_origin(Any).allow_methods(Any).allow_headers(Any) and warns loudly; restrict it with XBERG_CORS_ORIGINS.

Caching

crates/xberg/src/cache/ — GenericCache is a filesystem-backed store with LRU-style eviction, not an in-memory map. Keys are BLAKE3 content hashes (blake3_hash_bytes / blake3_hash_file, cache/utilities.rs). Eviction is bounded by max_age_days, max_cache_size_mb and min_free_space_mb — there is no entry-count limit.

Read the full file on GitHub · 128 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. 9d ago Changed · +6 lines · -5 tokens per session 0d9fe294707b
  2. 1mo ago First seen · 122 lines · 12 tokens per session scan A 2878f4ce0fd5

Subscribe to this mod's changes

api-server-mcp is a skill published in the GitHub repository xberg-io/xberg (9,433 stars, last pushed today), licensed MIT. It adds 7 tokens to every session and 1,524 once invoked, about $0.0000 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

fastapi-patterns

FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

affaan-m/ECC · 35 tokens

status

Show whether Mem0 memory is working in this repository, covering configuration, capture state, pending flushes, and whether the Mem0 API key is valid. Use when the user asks whether memory is on, why a memory is missing, or anything looks broken.

mem0ai/mem0 · 54 tokens

mem0-test-integration

Verify a Mem0 integration produced by /mem0-integrate. Runs in the same workspace on the same branch (loose coupling) — installs dependencies, runs the repo's native test suite, then exercises a real end-to-end smoke flow against the user's API key. Produces a scorecard. TRIGGER when: user has just run /mem0-integrate…

mem0ai/mem0 · 207 tokens

open-source

Documentation reference for writing Python code using the browser-use open-source library. Use this skill whenever the user needs help with Agent, Browser, or Tools configuration, is writing code that imports from browseruse, asks about @sandbox deployment, supported LLM models, Actor API, custom tools, lifecycle…

browser-use/browser-use · 137 tokens

mem0-oss-to-platform

Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…

mem0ai/mem0 · 217 tokens

stripe-projects

Use after E2B sandbox/API access has been provisioned through Stripe Projects and the user needs to use the resulting E2B API key with the E2B CLI, JavaScript SDK, Python SDK, or Code Interpreter SDK.

e2b-dev/E2B · 51 tokens