dipanjanc-dev/tdmp-mcp-server
If you are the rightful owner of tdmp-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The TDMP-MCP Server is a Model Context Protocol server designed for seamless integration with the Test Data Management Platform, enabling AI assistants to interact with Postman collections, generate test framework code, and execute HTTP requests with intelligent authentication handling.
TDMP-MCP Server
A Model Context Protocol (MCP) server for Test Data Management Platform integration. Enables AI assistants to interact with Postman collections, generate test framework code, and execute HTTP requests with intelligent authentication handling.
✨ Features
- 🔐 Dual Authentication Patterns: Supports both direct auth endpoints and gateway routing
- 🌍 Multi-Language Code Generation: Generate HTTP client code for Java, JavaScript, and Python
- 🚀 Smart Execution Engine: Automatic authentication flow management and request chaining
- 📝 Rich Context Generation: Provides comprehensive context objects to LLMs for intelligent code formatting
- 🔧 Variable Management: Full Postman variable support including dynamic variables
- ⚡ Auto-Loading: Collections are automatically loaded on startup
🚀 Quick Start
NPX Installation (Recommended)
# Install and run with npx (no local installation needed)
npx tdmp-mcp-server
# Or install globally
npm install -g tdmp-mcp-server
tdmp-mcp-server
Development Setup
# Clone and setup for development
git clone <repository-url>
cd tdmp-mcp
# Install dependencies
npm install
# Build the server
npm run build
# Start development server
npm run dev
🔐 Authentication Setup
Set up environment variables in your Copilot configuration:
{
"mcpServers": {
"tdmp-mcp": {
"command": "npx",
"args": ["tdmp-mcp-server"],
"env": {
"TDMP_USERNAME": "your_auth_username",
"TDMP_PASSWORD": "your_auth_password",
"TDMP_AUTH_HUB_URL": "https://your-auth-hub.example.com",
"TDMP_GATEWAY_URL": "https://your-gateway.example.com"
}
}
}
}
Alternative configurations:
// Using global installation
{
"mcpServers": {
"tdmp-mcp": {
"command": "tdmp-mcp-server",
"env": { /* environment variables */ }
}
}
}
// Using custom collections directory
{
"mcpServers": {
"tdmp-mcp": {
"command": "npx",
"args": ["tdmp-mcp-server"],
"env": {
"TDMP_COLLECTIONS_DIR": "/path/to/your/collections",
"TDMP_USERNAME": "your_username",
"TDMP_PASSWORD": "your_password",
"TDMP_AUTH_HUB_URL": "https://auth-hub.example.com",
"TDMP_GATEWAY_URL": "https://gateway.example.com"
}
}
}
}
🤖 GitHub Copilot Usage
Once configured, use natural language prompts in Copilot Chat:
Explore Available APIs
@tdmp-mcp What API clients are available?
Generate Client Code
@tdmp-mcp Generate Python requests code for the testDataPlatform client with proper authentication
Execute API Tests
@tdmp-mcp Execute the full authentication and API call flow for testDataPlatform with test data
Check Setup
@tdmp-mcp Check my authentication setup
🛠️ Available Tools
Status & Information Tools
| Tool | Purpose | Parameters | Example Use |
|---|---|---|---|
get_collection_status | Show current collection and available clients | None | Check what's loaded |
get_environment_status | Check auth variable setup and configuration | None | Debug configuration |
get_auth_status | Check current authentication token status | None | Verify if auth is valid |
Collection Management Tools
| Tool | Purpose | Parameters | Example Use |
|---|---|---|---|
load_collection | Load a Postman collection from file | collection_name (string) | Load specific collection |
list_data_categories | List all data categories (folders) and overview | None | See available data categories |
list_data_scenarios | List data scenarios with optional filtering | data_category?, client_name?, auth_required?, include_schema? | Find specific scenarios |
get_data_category_scenarios | Get all scenarios for specific data category | data_category (string) | Get Customer/Services scenarios |
get_data_scenario_info | Get detailed scenario information | client_name (string) | Get schema and example data |
Code Generation Tools
| Tool | Purpose | Parameters | Example Use |
|---|---|---|---|
generate_code | Generate code context for LLM | language (java/javascript/python), client_name (string), framework? (string) | Generate HTTP client code |
Execution Tools
| Tool | Purpose | Parameters | Example Use |
|---|---|---|---|
execute_auth_flow | Execute authentication flow | None | Get access token |
execute_client_call | Execute single API call | client_name (string), form_data (object) | Test specific endpoint |
execute_full_flow | Execute auth + API call sequence | client_name (string), form_data (object) | End-to-end testing |
Variable Management Tools
| Tool | Purpose | Parameters | Example Use |
|---|---|---|---|
get_variables | Show all loaded variables | None | Debug variable resolution |
set_variable | Set a variable in specified scope | key (string), value (string), scope? (collection/environment/runtime) | Set custom variables |
💻 Code Generation
Supported Languages & Frameworks
- Java: OkHttp, RestTemplate, Apache HttpClient
- JavaScript: Axios, Fetch, Node-fetch
- Python: Requests, HTTPx, urllib
Generated Context Structure
The generate_code tool returns comprehensive context including:
- Authentication flow patterns
- Language-specific conventions
- Client configuration
- Error handling examples
- Framework best practices
🎯 Basic Usage Examples
1. Check Status
User: "What's the current status?"
Tool: get_collection_status → Shows loaded collection and available clients
2. Generate Code
User: "Generate Python code for testDataPlatform"
Tool: generate_code → Returns context for LLM to generate proper client code
3. Test APIs
User: "Test the testDataPlatform API with sample data"
Tool: execute_full_flow → Executes auth + API call with real data
4. Debug Setup
User: "Check my authentication configuration"
Tool: get_environment_status → Shows environment variables status
🏠️ Collection Management
Collection Directory Priority
The server looks for collections in this order:
- Environment Variable:
TDMP_COLLECTIONS_DIR - User Directory:
~/.tdmp-mcp/collections/(created on first install) - Development Directory:
./collections/(for local development)
Adding Your Collections
# Copy your Postman collections to user directory
cp your-collection.json ~/.tdmp-mcp/collections/
# Or set a custom directory
export TDMP_COLLECTIONS_DIR="/path/to/your/collections"
Collection Structure
The server auto-loads Postman collections with support for:
- Authentication requests with basic auth or OAuth
- Gateway clients with JSON body structure
{ "clientName": "...", "formData": {...} } - Variable resolution including
{{username}},{{password}}, dynamic variables - Multiple environments with variable precedence
- Folder-based organization (Customer, Services, etc.)
Important: FormData Format
The gateway API expects formData as an escaped JSON string, not a regular object:
// ✅ Correct format (as sent to gateway)
{
"clientName": "testDataPlatform",
"formData": "{\"userId\":\"user_123\",\"action\":\"create\"}"
}
// ❌ Incorrect format (will cause API errors)
{
"clientName": "testDataPlatform",
"formData": {
"userId": "user_123",
"action": "create"
}
}
When using the MCP tools:
- Provide formData as a regular object in tool parameters
- The server automatically converts it to escaped JSON for API calls
- Response includes both the actual request sent (
requestBody) and your original input (formDataProvided) for reference - Generated code examples show proper JSON.stringify() usage
📁 Project Structure
tdmp-mcp/
├── collections/ # Postman collections (auto-loaded)
│ └── sample.json # Example collection
├── src/ # TypeScript source
├── dist/ # Built JavaScript
📦 Publishing
NPM Publishing
# Build for production
npm run build
# Update version
npm version patch|minor|major
# Publish to npm/artifactory
npm publish
Artifactory Configuration
For publishing to a private artifactory:
# Set registry
npm config set registry https://your-artifactory.com/artifactory/api/npm/npm-local/
# Login to artifactory
npm login
# Publish
npm publish
🔧 Development
# Type checking
npm run type-check
# Build
npm run build
# Development with hot reload
npm run dev
# Clean build artifacts
npm run clean
📄 License
MIT License - see LICENSE file for details.
Ready to start?
- Quick Start:
npx tdmp-mcp-server --infoto check setup - Configure: Add to your MCP client with
npx tdmp-mcp-server - Collections: Copy your Postman collections to
~/.tdmp-mcp/collections/
🚀 Happy testing!