mcpField
A
agentskin

agentskin

Local
github.com/Shawn5centsAI & Agents1Updated 4w ago

About agentskin

AgentSkin is context middleware for AI agents that prunes low-value API, JSON, terminal, and text output before it reaches model context. It combines automatic input detection with URL-specific rules and safeguards for fetching public URLs.

Key features

  1. 01Auto-detect JSON, CLI output, or text
  2. 02Prune structured API data with URL rules
  3. 03Fetch and optimize public URLs
  4. 04Reduce terminal output
  5. 05Token estimation and diagnostic tools
  6. 06SSRF checks and request limits

Use cases

  1. 01Reduce noisy API data before model processing
  2. 02Compact terminal output for agent context
  3. 03Fetch public URLs with semantic pruning

MCP support

AgentSkin runs as a Node.js MCP server over stdio and exposes tools for compressing, fetching, and reducing content, along with compatibility and diagnostic tools.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"shawn5cents-agentskin": {
"command": "npx",
"args": [
"-y",
"agentskin"
],
"env": {
"BRAVE_SEARCH_API_KEY": "<BRAVE_SEARCH_API_KEY>",
"SERPER_API_KEY": "<SERPER_API_KEY>",
"TAVILY_API_KEY": "<TAVILY_API_KEY>",
"APILAYER_KEY": "<APILAYER_KEY>"
}
}
}
}
Run commandnpx -y agentskin
Environment variables to set
BRAVE_SEARCH_API_KEYSecretBrave Search API Key
SERPER_API_KEYSecretSerper.dev Search API Key
TAVILY_API_KEYSecretTavily Search API Key
APILAYER_KEYSecretMediaStack API Key

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmagentskin4.0.1

Tools

2

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
urlstringYesThe raw API or JSON URL to fetch.
headersobjectNoOptional: Custom HTTP headers (e.g. {'API-Key': 'your_key'}) for private data access.
signalsarrayNoOptional: Specific keys you are looking for (e.g. ['price', 'status']).

Details

From the project README

AgentSkin

npm version License: MIT

Context middleware for AI agents. AgentSkin removes low-value API, JSON, and terminal noise before it enters model context.

The frozen AgentSkin 5.1 offline core evaluation also has an accepted Sparse Env execution path. AgentSkin preserves the workload correctness contract while Sparse Env owns cold/warm environment selection and lifecycle; see agentskin/docs/SPARSE_ENV.md.

What it does

AgentSkin has three primary workflows:

  • compress — one front door that auto-detects JSON, CLI output, or plain text.
  • fetch_optimized_data — fetches a public URL and applies URL-specific pruning rules when available.
  • reduce — compacts terminal output using Tokenjuice's rule-driven reducers.

Five advanced tools remain for compatibility and diagnostics: apply_json_semantic, classify_url, strip_ansi, estimate_tokens, and skin_reasoning.

Quick start

npx -y agentskin@latest

MCP config:

{
  "mcpServers": {
    "agentskin": {
      "command": "npx",
      "args": ["-y", "agentskin@latest"]
    }
  }
}

Design rule

Fidelity first, compression second. Explicit signals and URL rules are authoritative. Generic keys such as id, name, and url are only fallback signals when no explicit rule exists.

A reduction is useful only when the information required by the task survives it.

Current verification

The release gate runs the AgentSkin-owned test suite, including MCP startup/security and live HTTP integration tests. Run it with:

cd agentskin
npm ci
npm test

Benchmarks are workload-specific. The test suite prints measured reductions for its fixtures instead of claiming one universal savings percentage.

Runtime

  • Node.js MCP server over stdio
  • Tokenjuice is a normal npm dependency for CLI reduction
  • URL-specific semantic pruning rules for structured APIs
  • SSRF checks for fetches, response-size limits, rate limiting, Zod validation, and processing timeouts

Development

The npm package lives in agentskin/ inside this repository.

cd agentskin
npm ci
npm test
npm run lint
npm pack --dry-run

Credits

AgentSkin semantic pruning and MCP integration: Shawn Nichols Sr. / Nichols Transco LLC.

CLI reduction uses Tokenjuice by Vincent Koc under its MIT license.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.