Skip to content

run

Generate docs, SDKs and MCP servers

Turn a collection into a self-contained HTML API reference, a TypeScript, Python or Swift client SDK, or a runnable Node.js MCP server for AI tools.

A collection already describes your API: its requests, parameters, bodies, auth and example responses. Cloak Proxy can turn it into three things you can hand to other people or tools. HTML documentation is one file you can host anywhere. A client SDK gives developers typed methods for each request. An MCP server lets AI assistants such as Claude call your API as tools. Everything is generated on your Mac, from the collection as it is now.

Output Formats Where to start
API documentation One HTML file More › Export API Documentation (HTML)…, or Docs Branding › Export HTML Docs…
Client SDK TypeScript, Python, Swift Right-click the collection › Generate SDK
MCP server Node.js project in a zip More › Generate MCP Server…

Only HTTP and GraphQL requests are included in SDKs and MCP servers. Docs list every request, with code samples for HTTP and GraphQL requests.

The More menu in a collection's header has the generators and exports.

  1. More: Monitor, Generate MCP Server and the Export formats
  2. Docs Branding sets the title, color, logo and footer of exported docs
  3. Right-click a collection in the sidebar for Generate SDK
The Petstore collection tab with Run, Load Test, Mock and More buttons in the header and an Overview tab showing 12 requests, 1 folder, 4 examples and 3 with tests

API documentation is a single, self-contained HTML file: no server, build step or external files. Host it on GitHub Pages, S3 or your own domain, or send it as an attachment.

  1. Write the docs you want readers to see: the collection’s Overview documentation, folder overviews and each request’s docs, all in Markdown. Save examples for the responses you want to show. See Examples and docs.

  2. Optionally set the title, accent color, logo and footer on the collection’s Docs Branding tab, and click Preview to check them.

  3. Open the collection and choose More › Export API Documentation (HTML)…. You can also right-click the collection and choose Export › API Documentation (HTML)…, or click Export HTML Docs… on the Docs Branding tab.

  4. Choose where to save the file (by default Collection name docs.html).

    It opens in your browser when it’s saved.

Part Contents
Navigation A sidebar with every folder and request in collection order, with colored method badges. On narrow screens it’s hidden and the page is a single column.
Introduction The collection’s documentation, an Authorization note naming the collection’s auth type (when it has one), and a Variables table with each enabled collection variable’s name, value and description. Secret variables are left out.
Folders A heading with the folder’s documentation.
Each request The method and name, the URL, the request’s documentation, then tables of Path variables, Query parameters (optional ones are marked) and Headers, and the Body (raw, form, multipart or GraphQL query and variables).
Code examples A snippet for each HTTP and GraphQL request in the language picked under Code examples: cURL, JavaScript, Python, NodeJS – Axios, Go, Swift, Java – OkHttp, C# – HttpClient, PHP – cURL or Ruby – Net::HTTP. The reader’s choice is remembered in their browser. Snippets keep {{variables}} as they are, so readers can see what to fill in.
Examples Each saved example with its name, status code and pretty-printed body.
Footer Your branding footer, and Made with Cloak Proxy with the date unless you hide it.

The page follows the reader’s light or dark mode. Markdown in docs supports headings, paragraphs, bold, italic, inline code, code blocks, bulleted and numbered lists, http and https links, quotes and horizontal rules.

Docs Branding applies to every docs export of the collection.

  1. Title shown instead of the collection name
  2. Accent color for headings and links
  3. Logo: an https URL, or Choose… to embed an image
  4. Hide the Made with Cloak Proxy line
  5. Preview in your browser, or export
The Docs Branding tab with the title Petstore API Reference, accent color #ff6c37, a logo field, a Markdown footer and a toggle to hide Made with Cloak Proxy
Field What it does
Title Replaces the collection name as the page title.
Accent color A CSS color such as #ff6c37, typed or picked with the color well. Used for the title, links and hover states. Only plain color syntax is accepted.
Logo An https:// URL, or Choose… to embed a PNG, JPEG, SVG or GIF under 512 KB in the file itself.
Footer (Markdown) Text at the bottom of the page, such as a copyright line and a link to your status page.
Hide “Made with Cloak Proxy” Removes the attribution line.

Branding is saved with the collection, so cloakctl docs uses it too. See Examples and docs for more on writing docs.

Terminal
cloakctl docs "Petstore" --out ./site/index.html

NAME can be a collection in the workspace, or a Postman collection or OpenAPI file. --out is required. Add --workspace DIR for a different workspace. This makes it easy to rebuild docs in CI whenever the collection changes. A spec’s Preview Docs button builds the same kind of page from an OpenAPI spec; see Specs.

A client SDK wraps each request in the collection in a method, so developers call api.getPet(1) instead of building URLs by hand.

  1. In the sidebar, right-click the collection and choose Generate SDK › TypeScript…, Python… or Swift….

  2. Choose a folder and click Generate Here.

    Cloak Proxy creates a folder named <collection>-<language>-sdk inside it, for example petstore-typescript-sdk, and shows it in Finder.

From the collection In the SDK
Collection name The client class: Petstore → PetstoreClient.
baseUrl collection variable The default base URL. Without one, the scheme and host of the first absolute request URL. You can override it when creating the client.
Request name The method name in camelCase (Get pet → getPet), or snake_case in Python (get_pet). Names that clash with language keywords get a Request suffix, and duplicates get a number.
Path variables (:id) and {{variable}} path segments Required arguments, URL-encoded into the path.
Query params An optional query argument with those keys.
Body An optional body argument, sent as JSON, for requests with a raw or GraphQL body and for every POST, PUT and PATCH.
First line of the request’s docs The method’s doc comment.

Every client sends Accept: application/json, adds Authorization: Bearer <token> when you pass a token, parses JSON responses, and raises an error for status codes outside 2xx. Other auth types from the collection aren’t carried over; pass extra headers yourself where the language supports it.

  • Directorypetstore-typescript-sdk/
    • Directorysrc/
      • index.ts
    • package.json
    • tsconfig.json
    • README.md
Usage
import { PetstoreClient } from "./src/index";
const api = new PetstoreClient({ token: process.env.API_TOKEN });
const result = await api.getPet(1);
console.log(result.status, result.data);
  • new PetstoreClient(options) takes baseUrl, token, headers (added to every request) and fetch (your own fetch implementation).
  • Each method returns Promise<ApiResponse> with status, headers and data.
  • Errors are thrown as an Error with status and data properties.
  • npm run build compiles it with TypeScript (typescript is the only dev dependency).

Each SDK’s README.md has a usage example and lists every method with its HTTP method and path. Generating again into the same folder overwrites the files.

An MCP server lets AI assistants call your API. Cloak Proxy generates a small Node.js project, using the official MCP TypeScript SDK, with one tool per request in the collection. This is like Postman’s MCP Generator. It’s different from Cloak Proxy’s own MCP server, which lets AI tools control Cloak Proxy itself.

  1. Open the collection and choose More › Generate MCP Server…, or right-click the collection and choose Generate MCP Server….

  2. Choose where to save the zip (by default <collection>-mcp.zip). The dialog says how many tools it contains.

    The zip is shown in Finder. It holds one folder named after the collection.

  3. Unzip it and install the dependencies (Node.js 18 or later):

    Terminal
    cd petstore
    npm install
    cp .env.example .env
  4. Fill in .env with your token and any other values.

  5. Add the server to your MCP client. The project’s README.md has ready-made configuration for Claude Desktop, Claude Code, Cursor and VS Code.

If the collection has no HTTP or GraphQL requests, Cloak Proxy shows Add at least one request to generate an MCP server.

  • Directorypetstore/
    • package.json dependencies, start scripts and a bin entry
    • index.js the server and its tool definitions
    • .env.example every environment variable the server reads
    • README.md tools, setup and client configuration
    • .gitignore ignores node_modules and .env

The project depends only on @modelcontextprotocol/sdk and zod.

From the request In the tool
Name The tool name in lowercase with underscores (Get pet → get_pet), made unique. The original name is the tool’s title.
Docs The tool description. Without docs, the method and URL.
Path variables Required arguments, filled into the URL.
Query params Arguments added to the query string. Required when the param is turned on.
Top-level fields of a flat JSON body Optional arguments, typed from the example value (string, integer, number, boolean, array or object). A GraphQL request sends its query as a JSON query field.
Enabled headers Sent with every call.
Collection or folder auth Bearer Token → Authorization: Bearer {{API_TOKEN}}. API Key in a header → that header with {{API_KEY}}. Basic Auth → Authorization: Basic {{BASIC_AUTH}} (put the Base64-encoded user:password in BASIC_AUTH). Other auth types, and API keys in the query string, aren’t carried over.

Any other {{variable}} left in a URL, header or body is read from an environment variable with the same name. Non-secret collection variables, such as baseUrl, become defaults in index.js and .env.example. Secret variables are never copied into the project.

When a tool runs, it sends the request (with a 30-second timeout) and returns HTTP status and the response body, pretty-printed when it’s JSON and cut off after 100,000 characters. A response outside 2xx is reported to the AI client as an error. If a needed environment variable is missing, the tool returns Missing environment variable NAME. Set it in .env or your MCP client config.

Most desktop MCP clients start the server themselves and talk to it over stdio:

Terminal
node index.js
Claude Desktop: claude_desktop_config.json
{
"mcpServers": {
"petstore": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/petstore/index.js"],
"env": { "API_TOKEN": "<your API_TOKEN>", "baseUrl": "https://api.example.com/v1" }
}
}
}

.env next to index.js is loaded automatically on Node.js 20.12 and later; real environment variables take precedence. Test the server with the MCP Inspector: npx @modelcontextprotocol/inspector node index.js.

Output Command line MCP server tool
HTML docs cloakctl docs NAME --out FILE.html generate_docs
Client SDK — generate_sdk
MCP server — generate_mcp_server (writes a zip when the path ends in .zip, otherwise a folder)
OpenAPI spec — generate_openapi

See MCP tools reference for the arguments of each tool.