Code2Postman
БесплатноНе проверенAutomatically generates Postman collections from code directories by analyzing API endpoints and parameters, enabling easy testing, documentation, and sharing.
Описание
Automatically generates Postman collections from code directories by analyzing API endpoints and parameters, enabling easy testing, documentation, and sharing.
README
Code2Postman MCP - A Model Context Protocol (MCP) server implementation that automatically converts code directories into Postman collections.
Overview
Code2Postman MCP is an open-source tool that leverages the Model Context Protocol to help developers quickly generate Postman collections from their codebase. This tool analyzes your code files, identifies API endpoints, and creates structured Postman collections that you can use for testing, documentation, and sharing. It is an MCP that generate postman's collection from code and local repositories.
Features
- Code Analysis: Automatically scan your codebase to identify API endpoints and their parameters
- Collection Generation: Create complete Postman collections with proper structure
- Folder Organization: Organize endpoints logically in folders based on code structure
- Variables Support: Add and manage collection variables for greater flexibility
- Authentication Configuration: Set up authentication methods automatically based on code patterns
- Event Scripts: Generate pre-request and test scripts when applicable
Supported Tools
create_postman_collection- Create a new Postman collectionadd_postman_collection_item- Add a request item to a collectionread_postman_collection- Read an existing Postman collectionadd_postman_collection_info- Add metadata to a collectionadd_postman_collection_event- Add pre-request or test scriptsadd_postman_collection_variable- Add variables to a collectionadd_postman_collection_auth- Configure authentication for a collectionadd_postman_collection_protocol_behavior- Configure protocol behaviorsdelete_postman_collection_item- Remove items from a collectionupdate_postman_collection_variable- Update existing variablesadd_postman_collection_folder- Create folders for organizing requestsadd_item_to_folder- Add items to specific foldersget_tree_directory_from_path- Get a file tree structure from a directoryread_file- Read the contents of a specific file
Installation
pip install code2postman-mcp
Usage with Claude Desktop
- Add Code2Postman MCP to your
claude_desktop_config.jsonfile:
"code2postman-mcp": {
"command": "uvx",
"args": ["code2postman-mcp"]
}
- Launch Claude Desktop and start using the MCP tools to analyze your code and generate Postman collections.
Command Line Usage
You can also use Code2Postman MCP directly from the command line:
uvx code2postman-mcp
Examples
Creating a Postman Collection from Source Code
- First, analyze your codebase to identify API endpoints.
- Create a new Postman collection.
- Add identified endpoints as items to the collection.
- Configure authentication if needed.
- Add collection variables for flexibility.
- Export the collection as a JSON file that can be imported into Postman.
Adding to an Existing Collection
You can also extend existing Postman collections by:
- Reading an existing collection.
- Adding new items or folders.
- Updating variables or authentication methods.
- Saving the updated collection.
Development
To contribute to Code2Postman MCP:
Clone the repository:
git clone https://github.com/yourusername/code2postman-mcp.gitInstall development dependencies:
cd code2postman-mcp uv pip install -e .Run tests:
uv run pytest tests/
License
This project is licensed under the MIT License - see the LICENSE file for details.
Установить Code2Postman в Claude Desktop, Claude Code, Cursor
unyly install code2postman-mcpСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add code2postman-mcp -- uvx code2postman-mcpFAQ
Code2Postman MCP бесплатный?
Да, Code2Postman MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Code2Postman?
Нет, Code2Postman работает без API-ключей и переменных окружения.
Code2Postman — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Code2Postman в Claude Desktop, Claude Code или Cursor?
Открой Code2Postman на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Code2Postman with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
