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.
- More: Monitor, Generate MCP Server and the Export formats
- Docs Branding sets the title, color, logo and footer of exported docs
- Right-click a collection in the sidebar for Generate SDK
API documentation
Section titled “API documentation”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.
-
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.
-
Optionally set the title, accent color, logo and footer on the collection’s Docs Branding tab, and click Preview to check them.
-
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.
-
Choose where to save the file (by default
Collection name docs.html).It opens in your browser when it’s saved.
What’s in the docs
Section titled “What’s in the docs”| 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.
Brand the docs
Section titled “Brand the docs”Docs Branding applies to every docs export of the collection.
- Title shown instead of the collection name
- Accent color for headings and links
- Logo: an https URL, or Choose… to embed an image
- Hide the Made with Cloak Proxy line
- Preview in your browser, or export
| 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.
Generate docs from the command line
Section titled “Generate docs from the command line”cloakctl docs "Petstore" --out ./site/index.htmlNAME 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.
Client SDKs
Section titled “Client SDKs”A client SDK wraps each request in the collection in a method, so developers call api.getPet(1) instead of building URLs by hand.
-
In the sidebar, right-click the collection and choose Generate SDK › TypeScript…, Python… or Swift….
-
Choose a folder and click Generate Here.
Cloak Proxy creates a folder named
<collection>-<language>-sdkinside it, for examplepetstore-typescript-sdk, and shows it in Finder.
How requests become methods
Section titled “How requests become methods”| 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
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)takesbaseUrl,token,headers(added to every request) andfetch(your own fetch implementation).- Each method returns
Promise<ApiResponse>withstatus,headersanddata. - Errors are thrown as an
Errorwithstatusanddataproperties. npm run buildcompiles it with TypeScript (typescriptis the only dev dependency).
Directorypetstore-python-sdk/
- petstore_client.py
- README.md
from petstore_client import PetstoreClient
api = PetstoreClient(token="...")print(api.get_pet(1))PetstoreClient(base_url=..., token=None, headers=None, timeout=30).- Methods return the parsed JSON, or the text when the response isn’t JSON.
- Errors raise
ApiErrorwithstatusanddata. - Uses only the standard library (
urllib), so there’s nothing to install.
Directorypetstore-swift-sdk/
- Package.swift
DirectorySources/
DirectoryPetstoreClient/
- PetstoreClient.swift
- README.md
let api = PetstoreClient(token: "...")let response = try await api.getPet(petId: "1")let pet = try response.decode(Pet.self)- A Swift package for macOS 12 and iOS 15 or later, with no dependencies.
PetstoreClient(baseURL:token:session:); methods areasync throwsand returnAPIResponsewithstatus,headers,dataanddecode(_:).- Errors throw
APIErrorwithstatusanddata.
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.
MCP servers
Section titled “MCP servers”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.
-
Open the collection and choose More › Generate MCP Server…, or right-click the collection and choose Generate MCP Server….
-
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.
-
Unzip it and install the dependencies (Node.js 18 or later):
Terminal cd petstorenpm installcp .env.example .env -
Fill in
.envwith your token and any other values. -
Add the server to your MCP client. The project’s
README.mdhas 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.
What’s in the project
Section titled “What’s in the project”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.
How requests become tools
Section titled “How requests become tools”| 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.
Run the server
Section titled “Run the server”Most desktop MCP clients start the server themselves and talk to it over stdio:
node index.js{ "mcpServers": { "petstore": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/petstore/index.js"], "env": { "API_TOKEN": "<your API_TOKEN>", "baseUrl": "https://api.example.com/v1" } } }}Run it as a local HTTP server and point the client at /mcp:
node index.js --http --port 3000The server listens on http://127.0.0.1:3000/mcp. Set PORT and HOST environment variables to change where it listens. npm run start:http starts it on the default port.
.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.
From the command line and AI assistants
Section titled “From the command line and AI assistants”| 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.