Postman Tool Generation
STDIOGenerates AI agent tools from Postman collections and requests for type-safe code generation.
Generates AI agent tools from Postman collections and requests for type-safe code generation.
An MCP server that generates AI agent tools from Postman collections and requests. This server integrates with the Postman API to convert API endpoints into type-safe code that can be used with various AI frameworks.
Model Context Protocol (MCP) is a new, standardized protocol for managing context between large language models (LLMs) and external systems. In this repository, we provide an installer as well as an MCP Server for Postman Tool Generation API.
This lets you use Claude Desktop, or any MCP Client like Cline, to use natural language to accomplish things on your Postman account, e.g.:
Create an AI tool for: collectionID: 12345-abcde requestID: 67890-fghij typescript openai
npm install
npm run build
cline_mcp_settings.json
):{ "mcpServers": { "postman-ai-tools": { "command": "node", "args": [ "/path/to/postman-tool-generation-server/build/index.js" ], "env": { "POSTMAN_API_KEY": "your-postman-api-key" }, "disabled": false, "autoApprove": [] } } }
The server provides a single tool called generate_ai_tool
with the following parameters:
{ collectionId: string; // The Public API Network collection ID requestId: string; // The public request ID language: "javascript" | "typescript"; // Programming language to use agentFramework: "openai" | "mistral" | "gemini" | "anthropic" | "langchain" | "autogen"; // AI framework }
// Using the tool through MCP const result = await use_mcp_tool({ server_name: "postman-ai-tools", tool_name: "generate_ai_tool", arguments: { collectionId: "your-collection-id", requestId: "your-request-id", language: "typescript", agentFramework: "openai" } });
The tool generates type-safe code that includes:
npm install
Make changes to src/index.ts
Build the server:
npm run build
POSTMAN_API_KEY
: Your Postman API key (required)The server includes comprehensive error handling for:
Error responses include detailed messages to help diagnose issues.
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License