Works with the AI Agents you already use
mcpsmith
Turn bloated OpenAPI specs into curated, token-efficient MCP servers for AI agents.
Free
mcpsmith
Example session with this skill installed
I have an openapi.yaml for my store API. I want to build a curated MCP server so an agent can search products and check stock levels, but I want to keep the delete and admin routes hidden.
- Read your context and instructions
- Compiled the mcpsmith
I have audited your OpenAPI spec and prepared the curation plan. The raw spec contains 45 operations which would consume ~12,000 tokens per turn. By curating this down to your specific stories, we can reduce this to 2 tools and ~800 tokens.
MCP Curation Plan: Store API
| Operation | Tool Name | Action | Description |
|---|---|---|---|
get_products_v1 | search_products | Include | Search store catalog with keyword filtering |
get_inventory_id | check_stock | Include | Verify real-time stock levels for a specific SKU |
delete_product | delete_product | Exclude | Blocked: Destructive operation |
post_admin_login | admin_login | Exclude | Blocked: Internal admin route |
# Generated mcp.yaml (partial)
auth:
type: api_key
tools:
get_products_v1:
include: true
name: search_products
description: "Search products. Use this to find IDs for stock checks."
args:
q: {rename: keyword}
limit: {hide: true, default: 10}
get_inventory_id:
include: true
name: check_stock
description: "Check inventory levels for a product ID."
delete_product:
include: false
Next steps
- Run
npx mcpsmith build openapi.yaml mcp.yaml -o store-serverto generate the code. - Add your
API_KEYto thestore-server/.envfile. - Use
npx mcpsmith connect store-serverto test the tools in your agent environment.
Connects securely to your tools. The creator never sees your data.
About this skill
Managing large REST APIs within an AI agent's context window is expensive and prone to hallucinations. A raw OpenAPI conversion can flood an agent with hundreds of tools, consuming thousands of tokens per turn and increasing the risk of unauthorized actions. This skill solves the bloat problem by providing a curation-first workflow for building Model Context Protocol (MCP) servers.
What it does
- Spec Auditing analyzes OpenAPI 3.x files to calculate token costs and identify risky or deprecated endpoints.
- Story-Driven Curation uses functional requirements to include only the operations an agent needs for specific tasks.
- Tool Optimization renames cryptic operation IDs to natural language and hides noisy or internal parameters.
- MCP Generation builds a shippable Node.js MCP server with built-in support for Bearer, API Key, and Login auth flows.
- Cloud Deployment automates the containerization and deployment of the curated server to Google Cloud Run.
How it works
- Audit the Spec to identify token bloat and potential security risks in the raw OpenAPI file.
- Define Agent Stories to determine which specific API capabilities are required for the intended use case.
- Draft the Curation File using
mcp.yamlto map, rename, and filter the API surface area. - Build and Test the server locally to validate the reduced tool list and ensure correct authentication handling.
Frameworks & tools
This skill utilizes Node.js (20+), the Model Context Protocol (MCP), and OpenAPI 3.x. It supports deployment via Google Cloud Run and can optionally use Gemini for AI-assisted curation.
Why this beats prompting it yourself
Writing a custom MCP wrapper by hand for a large API is error-prone and requires manual token management. This skill automates the boilerplate while enforcing a "security-by-default" approach that excludes risky operations unless explicitly whitelisted.
Use cases
- Convert a complex enterprise API into a lightweight toolset for Claude Code or Cursor.
- Bridge legacy REST services to AI agents with secure, short-lived token authentication.
- Reduce the token overhead of agents by filtering out 90% of unused API endpoints.
- Deploy private tool servers to Cloud Run with automated Secret Manager integration.
Known limitations
Supports OpenAPI 3.x only; Swagger 2.0 files must be converted first. Schemas nested deeper than six levels are automatically simplified to any-type objects.
OpenAPI 3.x only. No Swagger 2.0 support. Schemas deeper than 6 levels are simplified. Requires Node 20+. Deployments target Google Cloud Run.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 20 days ago
- Free with an Agensi account
Requires