Skip to content
apikeg avatar

API Keg — Spec Slice (OpenAPI & GraphQL Subgraph Extractor)

com.apikeg/spec-slice

Extracts minimal OpenAPI and GraphQL subgraphs from specs, keeping only referenced schemas and types.

CCM score
67 of 100
tools
2
transport
HTTP
last updated
Nov 30, 2026
Open website

Own this MCP server? Claim it

What it does

  • Slices OpenAPI 3.0/3.1 and Swagger 2.0 with slice_openapi_spec, matching queries, operationIds, or path patterns, and returning a valid mini-spec
  • Prunes GraphQL SDL with slice_graphql_schema, selecting root fields by query or explicit names and keeping their transitive type closure
  • Requires no signup for pay-per-request use over x402 with USDC on Base, or a monthly Bearer API key; dry_run checks requests free
  • Designed for agents that need a smaller spec in context, such as narrowing a large API before generating code or calls

Install

$ npx -y add-mcp https://spec-slice.apikeg.com/mcp --name spec-slice -y

Adds the server to every agent config it finds in this project.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add --transport http spec-slice https://spec-slice.apikeg.com/mcp

Run in your terminal. Add --scope user to make it available in every project.

Tools

Verified live · 2 tools

Verified live against the running server on Dec 1, 2026.

slice_openapi_specSelects OpenAPI/Swagger endpoints matching a natural-language query, operationIds, or pathPatterns, retains all transitively referenced component schemas, and returns a valid mini-spec plus optional curl and fetch examples. Pricing: $0.001 USD per OpenAPI/Swagger subgraph slic...8 params

Selects OpenAPI/Swagger endpoints matching a natural-language query, operationIds, or pathPatterns, retains all transitively referenced component schemas, and returns a valid mini-spec plus optional curl and fetch examples. Pricing: $0.001 USD per OpenAPI/Swagger subgraph slic...

Parameters* required
compactDescriptionsboolean
Strip verbose prose descriptions, examples, and externalDocs while keeping spec-valid response descriptions.default: false
includeSnippetsboolean
Generate ready-to-use curl and TypeScript fetch code snippets for each selected operation.default: true
maxOperationsinteger
Maximum number of matched operations to retain in the sliced OpenAPI spec.default: 5
methodsarray
Optional HTTP method allowlist.
operationIdsarray
Explicit operationId values to extract (case-insensitive).
pathPatternsarray
Explicit path templates or 'METHOD /v1/path/*' glob patterns to extract (e.g. 'POST /v1/invoices/*/refund').
querystring
Natural-language task intent (e.g. 'create credit note and refund invoice') matched against operationId, summary, tags, and path segments.
spec*value
OpenAPI 3.0/3.1 or Swagger 2.0 specification provided as either a parsed JSON object or a serialized JSON string (up to 5 MiB).
slice_graphql_schemaParses GraphQL Schema Definition Language (`Query`, `Mutation`, `Subscription`, `type`, `input`, `interface`, `union`, `enum`, `scalar`), scores root fields against `query` or explicit `rootFields`, and emits a valid mini-SDL containing only selected root fields and the transi...6 params

Parses GraphQL Schema Definition Language (`Query`, `Mutation`, `Subscription`, `type`, `input`, `interface`, `union`, `enum`, `scalar`), scores root fields against `query` or explicit `rootFields`, and emits a valid mini-SDL containing only selected root fields and the transi...

Parameters* required
compactDescriptionsboolean
Strip triple-quoted and single-line descriptions from the emitted mini-SDL.default: false
maxRootFieldsinteger
Maximum number of matched root fields to retain in the mini-SDL.default: 5
operationTypesarray
Optional filter restricting root operation containers.
querystring
Natural-language task intent scored against root Query, Mutation, and Subscription fields.
rootFieldsarray
Explicit root field names to extract (e.g. 'createCreditNote' or 'Mutation.refundInvoice').
sdl*string
Full GraphQL Schema Definition Language (SDL) string.

Details

Website
spec-slice.apikeg.com/llms.txt
Transport
HTTP
Registry
MCP registry, active
Resources
3
Prompts
2
Tools verified
Dec 1, 2026

More from apikeg

All 12