AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Openapi Context

mcp-djankies-openapi-context · by djankies

Docker-powered MCP server to parse your OpenAPI specs without polluting context windows.

No reviews yet
0 installs
34 views
0.0% view→install

Install

$ agentstack add mcp-djankies-openapi-context

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-djankies-openapi-context)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
stale · 1y ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Openapi Context? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

OpenAPI Context MCP Server

Stop drowning your LLM in API documentation. This MCP server gives LLMs intelligent, progressive access to OpenAPI specs without overwhelming their context windows.

🚀 Quick Start

{
  "openapi-context": { // name it whatever you want
    "command": "docker",
    "args": [
      "run", "--rm", "-i",
      "-v", "/path/to/your/openapi.yaml:/app/spec:ro", // filepath + :/app/spec:ro
      "djankies/openapi-context:latest"
    ]
  }
}

That's it. Your LLM now has API hotwheels.

🎯 Why This Exists

I wanted to create a tool that was more effective at helping LLMs efficiently navigate and retrieve laser-scoped information from OpenAPI specs without overwhelming their context windows. LLMs start with high-level overviews, then drill down only into what they need, being naturally guided by the tools the whole way.

The Problem

  • 📄 Full OpenAPI specs can be 1000s of lines
  • 🤯 LLMs get overwhelmed with unnecessary details
  • 💸 Wastes context tokens on irrelevant information
  • 🔄 LLMs don't know how to use openapi tools correctly

The Solution

  • 🔍 Progressive exploration that guides LLMs naturally
  • 🧠 Built-in intelligence that helps LLMs make correct tool choices
  • 📦 Automatic simplification without losing essential information
  • 🎯 Error messages that guide LLMs to the right next step

✨ Key Features for LLM Success

🧠 Intelligent LLM Guidance

Self-Documenting Tools

Every tool description is dynamically generated to include context about the loaded API:

list_operations: "List all endpoints from Petstore API v1.0.0"
get_operation_details: "Get details for operations in Petstore API v1.0.0"

LLMs always know which API they're working with and what tools are relevant.

Error Messages That Guide

Every error includes the exact next step:

**Operation Not Found**

Operation not found: createUser

💡 Use `list_operations()` to see available operations or call `help()` for usage guidance.

LLMs never get stuck - they always know how to recover.

Progressive Discovery Flow

The tool design naturally guides LLMs through efficient exploration:

  1. list_tags → See API structure
  2. get_operation_summary → Quick overview without schemas
  3. get_request_schema → Details only when needed

📊 Context-Efficient Design

Automatic Schema Simplification
  • Collapses duplicate examples
  • Simplifies UUID patterns: [0-9a-f]{8}-[0-9a-f]{4}-...uuid
  • Flattens complex allOf structures
  • Removes redundant descriptions
Flexible Output Control
// LLM can request minimal info
get_operation_details({ operation_id: "createUser", detail_level: "minimal" })

// Or specific fields only
get_operation_details({ operation_id: "createUser", fields: ["parameters"] })

// Or compact schemas
get_request_schema({ operation_id: "createUser", compact: true })
// Returns: "Type: object { name: string, email: string (email) }"

🔄 Never Get Stuck

Pagination with Clear Navigation

Large schemas include navigation hints:

Page 1 of 3 (showing 0-2000 of 5432 chars)
Use index=2000 to continue reading.
Helpful Parameter Validation
**Missing Parameters**

Please provide either `operation_id` or both `method` and `path`.

💡 Need help with tool usage? Call the `help` tool for detailed parameter guidance.
Built-in Health Check

The ping helps the llm verify the server is actually responsive when receiving errors. This prevents extraneous calls to the tool.

**Server Status**

Status: Ready
OpenAPI Spec: Loaded (Petstore API v1.0.0)
Ready to process queries.

🛠 Available Tools

Discovery Tools (LLMs Start Here)

  • 🏷️ list_tags - See API categories with operation counts
  • 📜 list_operations - List endpoints with filtering and compact mode
  • 🔍 search_operations - Find endpoints by keyword
  • 📋 get_operation_summary - Quick overview without full schemas

Detail Tools (Use When Needed)

  • 🩻 get_operation_details - Full endpoint info with customizable detail levels
  • 📤 get_request_schema - Request schemas with pagination and compact mode
  • 📥 get_response_schema - Response schemas by status code
  • 📝 get_operation_examples - Example payloads when available
  • 🔐 get_auth_requirements - Authentication details with examples
  • ℹ️ get_server_info - API metadata and statistics

Utility Tools

  • 🛜 ping - Check server responsiveness
  • help - Comprehensive guidance with current context

📖 How LLMs Navigate Efficiently

Natural Discovery Pattern

// 1. Understand API structure (3 lines)
list_tags()
// → "Users (12 operations), Orders (8 operations), Auth (3 operations)"

// 2. Find relevant operations (10 lines)
list_operations({ filter: "Users", compact: true })
// → "GET /users - List users\nPOST /users - Create user..."

// 3. Get overview before diving deep (5 lines)
get_operation_summary({ operation_id: "createUser" })
// → "POST /users\nParameters: body: required\nRequired: name, email\nAuth: api_key"

// 4. Get details only when needed (1 line with compact mode)
get_request_schema({ operation_id: "createUser", compact: true })
// → "Type: object { name: string, email: string (email), age?: number }"

Adaptive Detail Levels

The server provides three detail levels that LLMs can choose based on their needs:

  • minimal: Just operation signatures and required fields
  • standard: Simplified schemas without patterns (default)
  • full: Complete details including patterns and examples

Automatic Pagination Handling

When schemas are large, LLMs receive clear continuation instructions:

Page 1 of 3 (showing 0-2000 of 5432 chars)
...content...
Use index=2000 to continue reading.

🐳 Docker Configuration

Basic Setup

{
  "openapi-context": {
    "command": "docker",
    "args": [
      "run", "--rm", "-i",
      "-v", "/path/to/your/spec.yaml:/app/spec:ro",
      "djankies/openapi-context:latest"
    ]
  }
}

Multiple APIs

Each API gets its own instance with dedicated tool contexts:

{
  "users-api": {
    "command": "docker",
    "args": [
      "run", "--rm", "-i",
      "-v", "/path/to/users-api.yaml:/app/spec:ro",
      "djankies/openapi-context:latest"
    ]
  },
  "orders-api": {
    "command": "docker",
    "args": [
      "run", "--rm", "-i",
      "-v", "/path/to/orders-api.yaml:/app/spec:ro",
      "djankies/openapi-context:latest"
    ]
  }
}

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | LOG_LEVEL | Logging verbosity (error, warn, info, debug) | info | | MAX_SPEC_SIZE | Maximum OpenAPI spec file size in MB | 10 | | MCP_MODE | Server mode (stdio for MCP, http for debugging) | stdio |

🧪 HTTP Mode (Development & Debugging)

Test the server independently:

docker run --rm -p 3000:3000 \
  -e MCP_MODE=http \
  -v "/path/to/spec.yaml:/app/spec:ro" \
  djankies/openapi-context:latest

Access health check at http://localhost:3000/health

🏗 Development

# Install dependencies
npm install

# Run tests
npm test

# Development mode
npm run dev

# Full CI pipeline
npm run ci

📋 Supported Formats

  • OpenAPI 3.1 specifications
  • File extensions: .yaml, .yml, .json
  • Auto-detects format from content

📝 License

MIT License - see [LICENSE](LICENSE) file for details.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.