tdmp-mcp-server

dipanjanc-dev/tdmp-mcp-server

3.2

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.

Tools
8
Resources
0
Prompts
0

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

ToolPurposeParametersExample Use
get_collection_statusShow current collection and available clientsNoneCheck what's loaded
get_environment_statusCheck auth variable setup and configurationNoneDebug configuration
get_auth_statusCheck current authentication token statusNoneVerify if auth is valid

Collection Management Tools

ToolPurposeParametersExample Use
load_collectionLoad a Postman collection from filecollection_name (string)Load specific collection
list_data_categoriesList all data categories (folders) and overviewNoneSee available data categories
list_data_scenariosList data scenarios with optional filteringdata_category?, client_name?, auth_required?, include_schema?Find specific scenarios
get_data_category_scenariosGet all scenarios for specific data categorydata_category (string)Get Customer/Services scenarios
get_data_scenario_infoGet detailed scenario informationclient_name (string)Get schema and example data

Code Generation Tools

ToolPurposeParametersExample Use
generate_codeGenerate code context for LLMlanguage (java/javascript/python), client_name (string), framework? (string)Generate HTTP client code

Execution Tools

ToolPurposeParametersExample Use
execute_auth_flowExecute authentication flowNoneGet access token
execute_client_callExecute single API callclient_name (string), form_data (object)Test specific endpoint
execute_full_flowExecute auth + API call sequenceclient_name (string), form_data (object)End-to-end testing

Variable Management Tools

ToolPurposeParametersExample Use
get_variablesShow all loaded variablesNoneDebug variable resolution
set_variableSet a variable in specified scopekey (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:

  1. Environment Variable: TDMP_COLLECTIONS_DIR
  2. User Directory: ~/.tdmp-mcp/collections/ (created on first install)
  3. 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?

  1. Quick Start: npx tdmp-mcp-server --info to check setup
  2. Configure: Add to your MCP client with npx tdmp-mcp-server
  3. Collections: Copy your Postman collections to ~/.tdmp-mcp/collections/

🚀 Happy testing!