Skip to content
Last updated

Model Context Protocol (MCP)

Overview

The Creditsafe MCP (Model Context Protocol) server provides AI-powered access to Creditsafe Connect API documentation, enabling intelligent assistance for API integration, workflow design, and code generation. By connecting to our MCP server, you can leverage AI tools like GitHub Copilot, Cursor, and other MCP-compatible assistants to get context-aware help directly within your development environment.


Important: Documentation Access Only

The Creditsafe MCP provides access to API documentation, specifications, and integration guidance only. It does not provide access to Creditsafe services or API credentials.

To execute any code generated with MCP assistance or to make calls to Creditsafe Connect APIs, you must:

  • ✅ Have a valid Creditsafe account
  • ✅ Possess valid API credentials (username and password)
  • ✅ Have appropriate product subscriptions and permissions
  • ✅ Have sufficient credits for the operations you intend to perform

The MCP helps you learn how to integrate with Creditsafe APIs and generates integration code, but you are responsible for obtaining and managing your own credentials and API access.


Benefits of Using Creditsafe MCP

Intelligent API Discovery

  • Semantic search across all Creditsafe Connect APIs
  • Instant endpoint lookup with detailed parameter information
  • OpenAPI specification access for any product or endpoint

Accelerated Development

  • Generate integration code for your preferred language
  • Create test scripts with real API examples
  • Build workflow automation using Arazzo specifications

Context-Aware Assistance

  • Error troubleshooting with API-specific guidance
  • Authentication help with token management examples
  • Best practices for API integration patterns

Documentation Integration

  • Always up-to-date API specifications
  • Direct access to security schemes and data models
  • Comprehensive endpoint documentation including request/response examples

Installation

VS Code

  1. Open the command palette (Ctrl + Shift + P on Windows/Linux or Cmd + Shift + P on macOS)
  2. Select MCP: Add Server
  3. Choose HTTP as the server type
  4. Enter the server URL: https://doc.creditsafe.com/mcp
  5. Provide a name for the connection (e.g., "Creditsafe Connect APIs")
  6. Complete the setup (no authentication required)

Manual Configuration (VS Code)

If you prefer to configure manually, add the following to your .vscode/mcp.json file:

{
  "servers": {
    "Creditsafe Connect APIs": {
      "url": "https://doc.creditsafe.com/mcp",
      "type": "http"
    }
  },
  "inputs": []
}

Cursor

  1. Open the command palette (Ctrl + Shift + P on Windows/Linux or Cmd + Shift + P on macOS)
  2. Select Open MCP settings
  3. Select Add custom MCP to edit your MCP configuration
  4. Add the server configuration (see below)

Manual Configuration (Cursor)

Add the following to your MCP settings file:

{
  "mcpServers": {
    "Creditsafe Connect APIs": {
      "url": "https://doc.creditsafe.com/mcp"
    }
  }
}

Verification

After installation, verify the connection is working:

  1. Open your AI assistant (GitHub Copilot Chat, Cursor Chat, etc.)
  2. Ask: "List available Creditsafe APIs"
  3. You should see a response listing products like KYC Protect, Bank Validation, Company Reports, etc.

If the connection is successful, you're ready to start using the MCP server!


Example Usage

Example 1: API Discovery

Prompt:

Can you show me the available endpoints for the KYC Protect API?

What the AI will do:

  • Query the MCP server for KYC Protect endpoints
  • Display all available operations with descriptions
  • Show HTTP methods and paths

Example 2: Generate Integration Code

Prompt:

Can you help create a test script for integrating KYC Protect basic workflow in Python?

What the AI will do:

  • Fetch the KYC Protect OpenAPI specification
  • Review the authentication requirements
  • Access the Arazzo workflow definition
  • Generate a complete Python script with:
    • Authentication handling
    • Profile creation
    • AML search execution
    • Search linking
    • Error handling
    • Example request/response handling

Expected Output:

import requests
import json

class KYCProtectClient:
    def __init__(self, username, password, base_url="https://connect.creditsafe.com/v1"):
        self.base_url = base_url
        self.token = None
        self.authenticate(username, password)
    
    def authenticate(self, username, password):
        """Authenticate and obtain JWT token"""
        url = f"{self.base_url}/authenticate"
        payload = {
            "username": username,
            "password": password
        }
        response = requests.post(url, json=payload)
        response.raise_for_status()
        self.token = response.json()["token"]
        return self.token
    
    def create_profile(self, profile_data):
        """Create a KYC profile"""
        url = f"{self.base_url}/compliance/kyc-protect/profiles"
        headers = {
            "Authorization": f"Bearer {self.token}",
            "Content-Type": "application/json"
        }
        response = requests.post(url, headers=headers, json=profile_data)
        response.raise_for_status()
        return response.json()
    
    def run_aml_search(self, search_criteria):
        """Run AML screening search"""
        url = f"{self.base_url}/compliance/kyc-protect/searches/aml"
        headers = {
            "Authorization": f"Bearer {self.token}",
            "Content-Type": "application/json"
        }
        response = requests.post(url, headers=headers, json=search_criteria)
        response.raise_for_status()
        return response.json()
    
    def link_search_to_profile(self, profile_id, search_id):
        """Link search to profile"""
        url = f"{self.base_url}/compliance/kyc-protect/profiles/{profile_id}/searches"
        headers = {
            "Authorization": f"Bearer {self.token}",
            "Content-Type": "application/json"
        }
        payload = {"searchId": search_id}
        response = requests.post(url, headers=headers, json=payload)
        response.raise_for_status()
        return response.json()

# Example usage
if __name__ == "__main__":
    # Initialize client
    client = KYCProtectClient(
        username="your-username",
        password="your-password"
    )
    
    # Create business profile
    profile = client.create_profile({
        "profileType": "business",
        "name": "Example Corp Ltd",
        "registrationNumber": "12345678"
    })
    print(f"Profile created: {profile['id']}")
    
    # Run AML search
    search = client.run_aml_search({
        "name": "Example Corp Ltd",
        "country": "GB"
    })
    print(f"Search completed: {search['searchId']}")
    
    # Link search to profile
    link = client.link_search_to_profile(profile['id'], search['searchId'])
    print(f"Search linked successfully")

Example 3: Understand Authentication

Prompt:

How do I authenticate with the Creditsafe Connect API?

What the AI will do:

  • Retrieve authentication documentation
  • Explain the JWT token flow
  • Provide code examples for obtaining and using tokens
  • Show token refresh patterns

Example 4: Explore API Workflows

Prompt:

Show me the complete workflow for the Prospects API

What the AI will do:

  • Access the Prospects Arazzo workflow specification
  • Display the step-by-step process
  • Show input/output dependencies
  • Explain success and error handling criteria

Example 5: Debug API Errors

Prompt:

I'm getting a 403 error when creating a prospect order. What does this mean?

What the AI will do:

  • Search the Prospects API documentation for 403 errors
  • Explain common causes (insufficient credits, permissions)
  • Suggest troubleshooting steps
  • Provide example error response format

Example 6: Generate Request Examples

Prompt:

Can you show me an example request body for creating a Bank Validation order?

What the AI will do:

  • Fetch the Bank Validation OpenAPI schema
  • Generate a valid example request body
  • Include all required fields
  • Add optional fields with descriptions

Available MCP Tools

When connected, your AI assistant has access to the following capabilities:

ToolDescription
list-apisList all available Creditsafe Connect APIs with their descriptions and versions
get-endpointsGet all endpoints for a specific API, including HTTP methods and paths
get-endpoint-infoGet detailed information about a specific endpoint including parameters, request/response schemas, security requirements, and examples
get-full-api-descriptionGet complete OpenAPI specification for an API, including all schemas, components, and data models
get-security-schemesGet authentication and security details for API access
searchSemantic search across documentation to find relevant content for specific queries

Workflow Intelligence

A key advantage of the Creditsafe MCP is access to Arazzo workflow specifications that show how endpoints connect together in real-world integration patterns. Unlike basic API documentation that shows individual endpoints in isolation, the MCP understands:

  • Step-by-step integration flows - How to chain multiple API calls together (e.g., authenticate → create profile → run search → link search → enable monitoring)
  • Data dependencies - Which outputs from one endpoint are needed as inputs for the next step
  • Success and failure criteria - When to proceed to the next step and how to handle errors at each stage
  • Conditional logic - Which steps are optional or country-dependent
  • Complete end-to-end workflows - From authentication through to final data export or monitoring setup

This workflow intelligence enables the AI to generate production-ready integration code that properly sequences API calls, passes data between steps, and implements comprehensive error handling - not just isolated endpoint examples.

Example workflows available:

  • KYC Protect: Basic Integration, Full Integration, Monitoring Setup
  • Prospects: Complete Order Workflow, List Orders Workflow
  • Bank Validation: Standard Validation Flow
  • Company Reports: Search and Retrieve Workflow

Best Practices

1. Be Specific in Your Prompts

Instead of asking "How do I use the API?", ask:

  • "How do I create a KYC profile for a business entity?"
  • "What are the required fields for a Prospects order?"
  • "Show me how to authenticate and retrieve a company report"

2. Reference Specific Products

When asking questions, mention the product name:

  • "KYC Protect"
  • "Bank Validation"
  • "Prospects"
  • "Company Reports"

3. Request Complete Examples

Ask for end-to-end examples:

  • "Generate a complete workflow for..."
  • "Create a test script that handles errors..."
  • "Show me the full integration process for..."

4. Leverage Workflow Documentation

For complex integrations, reference the workflows:

  • "Follow the Prospects complete order workflow"
  • "Use the KYC Protect basic integration workflow"
  • "Implement the Bank Validation standard workflow"

Troubleshooting

Connection Issues

If you cannot connect to the MCP server:

  1. Verify the URL: Ensure you're using https://doc.creditsafe.com/mcp
  2. Check network access: Confirm your network allows HTTPS connections
  3. Restart your IDE: Close and reopen VS Code or Cursor
  4. Check MCP extension: Ensure the MCP extension is installed and enabled

No Response from AI

If your AI assistant doesn't respond to API queries:

  1. Verify connection: Ask "List available Creditsafe APIs"
  2. Check MCP settings: Confirm the server is enabled in your MCP configuration
  3. Restart the AI assistant: Close and reopen the chat window

Outdated Information

The MCP server provides real-time access to documentation. If information seems outdated:

  1. Check the API version: Ensure you're asking about the correct version
  2. Refresh the connection: Restart your IDE to reload MCP data
  3. Contact support: Report issues via Connect API Support

Additional Resources


Support

For questions or issues with the Creditsafe MCP server: