curl-gen-mcp
v1.0.0
Published
MCP server that auto-generates curls, .http files, and pushes API collections to Postman — straight from your backend code.
Maintainers
Readme
curl-gen-mcp
MCP server that auto-generates curls, .http files, and pushes API collections to Postman - straight from your backend code.
The pain: You build APIs with Claude → then manually write curls → paste into Postman → save. For every. single. endpoint.
The fix: Add this MCP → say "sync to postman" → done. All endpoints, with bodies, headers, everything.
Quick Setup (2 minutes)
1. Add to Claude Code
# With Postman auto-sync (recommended)
claude mcp add -e POSTMAN_API_KEY=your-key-here -- curl-gen npx curl-gen-mcp@latest
# Without Postman (just curls + .http files)
claude mcp add curl-gen -- npx curl-gen-mcp@latestGet your Postman API key at: https://web.postman.co/settings/me/api-keys
2. Use it
Just talk to Claude naturally:
"sync my project to postman"
"generate curls for all my APIs"
"create an api.http file for this project"
"scan what routes exist in my codebase"That's it. No config, no manual work.
What it does
When you say "sync to postman", it:
- Scans your entire project directory
- Finds all route files (routes/, controllers/, app.ts, etc.)
- Parses every endpoint with method, path, body schema
- Pushes directly to your Postman account as a collection
Works with Express, FastAPI, Flask, Spring Boot — auto-detects the framework.
Tools
| Tool | What it does |
|------|-------------|
| sync_to_postman | Scan project → push all routes to Postman |
| sync_postman_collection | Scan project → save Postman collection JSON file |
| sync_http_file | Scan project → save .http file (VS Code REST Client) |
| sync_curls | Scan project → generate all curl commands |
| scan_routes | Scan project → list all detected endpoints |
| generate_curls | Single file → curl commands |
| generate_http_file | Single file → .http file |
| generate_postman_collection | Single file → Postman collection JSON |
Supported Frameworks
| Framework | Patterns detected |
|-----------|------------------|
| Express / Hono / Koa | app.get(), router.post(), authRouter.delete() |
| FastAPI | @app.get(), @router.post() |
| Flask | @app.route("/path", methods=["GET"]) |
| Spring Boot | @GetMapping, @PostMapping, @RequestMapping |
Auto-detects framework from imports and code patterns. Also infers request body fields from req.body destructuring (Express), Pydantic models (FastAPI), and @RequestBody DTOs (Spring).
Setup with other MCP clients
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"curl-gen": {
"command": "npx",
"args": ["curl-gen-mcp"],
"env": {
"POSTMAN_API_KEY": "your-key-here"
}
}
}
}Cursor / Windsurf / any MCP client
Same stdio config — just point command to npx and args to ["curl-gen-mcp"].
How body inference works
curl-gen doesn't just find routes — it reads your handler code to figure out what the request body looks like:
Express: Finds const { name, email, password } = req.body → generates body with those fields
FastAPI: Finds Pydantic model referenced in function params → extracts fields with correct types
Spring Boot: Finds @RequestBody UserDTO → reads the DTO class fields
License
MIT
