generate_ai_tool
Generate code for an AI agent tool using a Postman collection and request
Turn a Postman request into agent-ready code — pick the collection, the request, the language and the framework, and get a typed tool back.
LABSCO SUMMARY
Most of the work in wrapping an API as an agent tool is writing down the shapes that someone already recorded in Postman: the parameters, the headers, the response body. Generating from the collection means the tool matches the request that was actually tested, and switching from LangChain to the OpenAI function format is a rerun rather than a rewrite. The generated code is a starting point you review, not something to paste unread.
An MCP server over Postman's Tool Generation API. Point it at a request that already exists in a Postman collection and it returns code for calling that endpoint as an agent tool, shaped for the framework you name.
generate_ai_tooljavascript or typescriptopenai, mistral, gemini, anthropic, langchain or autogenA Postman API key in POSTMAN_API_KEY, and the collection id and request id of a request in the Public API Network. The npm package name is postman-tools-server (0.1.0) and it is marked private, so build from a clone with npm install and npm run build, then point your client at the built index.js.
One command plus a key — npx -y github:giovannicocco/mcp-server-postman-tool-generation, then supply credentials
USE CASES
Take the request your team already keeps in Postman and generate a typed TypeScript tool for it, instead of transcribing the parameters by hand.
Regenerate the same request for a different target — LangChain, AutoGen, the OpenAI function format — rather than rewriting the wrapper.
Generate from a documented public request to get request and response types and error handling written out, then edit down to what you need.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
generate_ai_toolGenerate code for an AI agent tool using a Postman collection and request
BEFORE YOU INSTALL
1 tool when we connected. Language is javascript or typescript, and agentFramework is one of openai, mistral, gemini, anthropic, langchain or autogen. It reads a collection and request and returns code; nothing writes to your Postman account.
The documented client runs the server on your machine.
CONTEXT COST
Rated by the size of the one tool definition that rides along on every turn
INSTALLATION
git clone https://github.com/giovannicocco/mcp-server-postman-tool-generation
cd mcp-server-postman-tool-generation
npm install
npm run buildnpx -y github:giovannicocco/mcp-server-postman-tool-generation{
"mcpServers": {
"postman-ai-tools": {
"command": "node",
"args": [
"<YOUR_PATH_TO_POSTMAN_TOOL_GENERATION_SERVER>/build/index.js"
],
"env": {
"POSTMAN_API_KEY": "<YOUR_POSTMAN_API_KEY>"
},
"disabled": false,
"autoApprove": []
}
}
}This block runs the build from the steps above: <YOUR_PATH_TO_POSTMAN_TOOL_GENERATION_SERVER> is the full path to your mcp-server-postman-tool-generation clone.