openapi-to-mcp
Build and deploy an MCP server from an OpenAPI / Swagger spec using the mcp-use TypeScript SDK. Use this skill whenever the user wants to "turn this OpenAPI spec into an MCP server", "make this API usable from Claude/ChatGPT", "wrap this Swagger doc as MCP tools", "expose this REST API to an LLM", "generate MCP tools from a spec", or pastes/attaches an `openapi.yaml`, `openapi.json`, or `swagger.json` and asks for a Claude-compatible version. Trigger even if the user doesn't say "MCP" — if they describe an existing HTTP API (REST endpoints, an internal service, a third-party API they have a key for) and want an LLM to call it, this is the right skill. Covers spec ingestion (file path, URL, or pasted), operation-to-tool mapping, auth wiring (apiKey, bearer, basic, OAuth bearer), scaffolding with `create-mcp-use-app`, tool generation with proper zod schemas, live testing in the mcp-use inspector, and deploying to Manufact / mcp-use cloud.
What this skill does
# Build an MCP server from an OpenAPI spec
Turn an existing REST API — described by an OpenAPI 3.x or Swagger 2.0 document — into an MCP server. Each operation in the spec becomes one MCP tool the LLM can call. The server runs locally for testing and ships to Manufact / mcp-use cloud with one command.
This skill is the end-to-end recipe: scope → ingest spec → map operations → scaffold → generate tools → wire auth → test → deploy.
## Core philosophy: the spec is the contract
The OpenAPI document is the source of truth. Tool names, descriptions, parameter shapes, and auth requirements all come from the spec — they should not be invented. This matters because:
- **The LLM trusts descriptions.** If the spec says `summary: "Get current weather for a city"`, that's exactly what the LLM will read when deciding whether to call the tool. Hand-rolled summaries drift; spec-derived summaries stay in sync if the API changes.
- **Zod schemas mirror OpenAPI schemas.** Every parameter — path, query, body — becomes a field in one zod object. Required/optional, enums, min/max, and descriptions all carry over. The LLM uses the schema to figure out what to ask the user for.
- **Auth lives outside the spec.** OpenAPI declares the auth scheme but never the secret. Secrets come from env vars; the spec tells you which env vars to require.
When in doubt, prefer mechanical fidelity to the spec over creativity. The LLM is doing the creative part — talking to the user — and only needs a faithful, well-typed handle on the API.
## Process
### 1. Scope the request (use AskUserQuestion)
Before writing code, lock five things via the `AskUserQuestion` tool. All five are about the API and what to build — deployment is a separate question we ask later in step 10, when the user can actually evaluate it against a working server.
- **Spec source**: a file path in the workspace, a URL (e.g., `https://api.example.com/openapi.json`), or pasted into chat. If pasted, save it to `openapi.yaml` or `openapi.json` first.
- **Server base URL**: take it from `servers[0].url` in the spec if present; otherwise ask. Multiple `servers` entries are common (prod / staging) — confirm which one.
- **Auth scheme**: read `components.securitySchemes`. If multiple, ask which to use. If the API needs an API key or token, ask which env var should hold it (`API_KEY`, `OPENAI_API_KEY`, etc.). Don't ask for the secret itself — never put it in the conversation or commit it.
- **Operation filter**: large specs (Stripe, GitHub) have hundreds of endpoints. Ask whether to expose all operations, a tag (`pets`, `users`), or a hand-picked list. Default to "all" for specs under ~30 operations; ask above that. See `references/mapping-rules.md` for filtering patterns.
- **Widgets**: ask whether any operations should render a widget in the chat (a React component shown inline next to the LLM's reply), or whether this is a pure tools-only server. The default for an OpenAPI wrapper is **tools-only** — the LLM reads JSON and talks. Pick widgets only when the user wants a richer UI for specific responses (a map for a geocoding endpoint, a chart for a metrics endpoint, a card list for a search result). **This answer drives the scaffold template in step 3**: tools-only → `--template blank`, any widgets → `--template mcp-apps` (which ships the `resources/` widget infrastructure pre-wired). If the user wants widgets on most operations, the `build-mcp-app` skill is usually a better fit than this one — flag that and confirm before proceeding.
Don't skip this step. Generating 200 tools the user doesn't need pollutes the LLM's tool list and slows it down.
### 2. Acquire and dereference the spec
Get the spec into a single dereferenced JSON object on disk. Dereferencing inlines `$ref`s so downstream code never has to chase pointers.
```bash
# In the scaffolded project root
npm install @apidevtools/swagger-parser
```
```ts
// scripts/load-spec.ts (run once, manually or as a build step)
import SwaggerParser from "@apidevtools/swagger-parser";
import { writeFileSync } from "node:fs";
const spec = await SwaggerParser.dereference("./openapi.yaml");
writeFileSync("./openapi.dereferenced.json", JSON.stringify(spec, null, 2));
```
For URL specs, swagger-parser accepts the URL directly. For pasted YAML, write it to `openapi.yaml` first, then dereference. If the spec is Swagger 2.0, run it through `swagger2openapi` first (`npx swagger2openapi --outfile openapi.yaml swagger.yaml`).
Sanity-check the dereferenced file: open it, search for `"$ref"` — there should be none. If there are, the spec has circular refs and swagger-parser keeps them as-is; treat those refs as opaque object types in zod.
### 3. Scaffold with `create-mcp-use-app`
Pick the template based on the widget answer from step 1:
```bash
# Tools-only (the default for an OpenAPI wrapper)
npx create-mcp-use-app@latest <project-name> --template blank
# Any widgets at all
npx create-mcp-use-app@latest <project-name> --template mcp-apps
```
Let the scaffold install dependencies and `git init` — both are useful (`npm install` runs `mcp-use generate-types` postinstall, and a git repo is required by `npm run deploy` later). The skill installs companion coding-agent skills by default too; that's fine.
Verify the template catalog with `npx create-mcp-use-app@latest --list-templates` if it's been a while — the available set is `blank`, `starter`, `mcp-apps` as of this writing. `starter` includes sample tools you'd rip out, so we don't recommend it here.
After scaffolding, add the two extra deps the OpenAPI flow needs:
```bash
cd <project-name>
npm install @apidevtools/swagger-parser dotenv
```
What you get from `blank` (`mcp-apps` is a superset with `resources/` + widget infrastructure):
- `index.ts` at the root with a configured `MCPServer` instance — `name`, `title`, `version`, `description`, `baseUrl`, `favicon`, and an `icons[]` array. Commented-out examples for tools, resources, and prompts. Listens on `process.env.PORT` (default 3000).
- `package.json` with scripts wired to the `mcp-use` CLI: `dev` (hot reload + inspector), `build`, `start`, `deploy`. `tsx`, `zod`, and `typescript` are already in dev/regular deps; don't reinstall them.
- `tsconfig.json` pre-configured for ESM (`"type": "module"`).
- `public/` with a favicon and an SVG icon — served as static assets.
- A `.git` directory and an initial commit.
The scaffold reserves the env var `MCP_URL` for the **MCP server's own public base URL** (used for widget asset URLs and similar). That is *not* the upstream API's base URL — name your upstream var `BASE_URL` (or `API_BASE_URL` if you want to be explicit) to avoid stepping on it.
### 4. Plan project structure
Keep the tree shallow and predictable. The point is that someone reading the project for the first time can find the OpenAPI client, the tool wiring, and the auth in three obvious files.
```
<project>/
├── index.ts # MCPServer + server.tool() registration loop
├── openapi.yaml # The original spec (committed)
├── openapi.dereferenced.json # Dereferenced spec (gitignored; regenerated)
├── src/
│ ├── client.ts # fetch-based HTTP client (base URL + auth + error handling)
│ ├── auth.ts # Reads env vars, builds the auth header
│ ├── operations.ts # Loads dereferenced spec, exposes operation metadata
│ └── schema.ts # OpenAPI schema → zod converter
├── scripts/
│ └── load-spec.ts # Dereference helper (step 2)
├── .env.example # Document required env vars (API_KEY, BASE_URL, etc.)
└── package.json
```
For tiny specs (<10 operations) you can inline `client.ts`, `auth.ts`, and `operations.ts` into `index.ts`. For anything bigger, split — the LLM works better when each file has one job.
### 5. Map operations to tools
For every operation in the spec, you produce one `server.tool({...}, handlerRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.