digistore24-mcp-server

digistore24/digistore24-mcp-server

3.2

If you are the rightful owner of digistore24-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 henry@mcphub.com.

The Digistore24 MCP Server is a Model Context Protocol server that enables AI assistants to interact with the Digistore24 e-commerce platform through its API.

Digistore24 MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with access to the Digistore24 API. This server allows AI tools like Claude Desktop, Cursor, and other MCP clients to interact with Digistore24's e-commerce platform programmatically.

šŸš€ Features

  • Complete Digistore24 API Coverage: Access to all Digistore24 API endpoints
  • Secure Authentication: Stateless API key authentication via Authorization headers
  • Multiple Transport Modes: Both stdio (local) and HTTP (hosted) support
  • Production Ready: Built for hosting as a public service
  • Customer-Friendly: Easy setup for customers with their own API keys

šŸ“‹ Table of Contents

šŸš€ Quick Start

For Customers (Using Hosted Service)

If you're a Digistore24 customer wanting to use this with your AI assistant:

{
  "mcpServers": {
    "digistore24": {
      "type": "http",
      "url": "https://mcp.digistore24.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_DIGISTORE24_API_KEY"
      }
    }
  }
}

šŸ“– See for detailed setup instructions

For Developers (Local Development - Internal Use Only)

# Clone and install
git clone https://github.com/digistore24/digistore24-mcp-server.git
cd digistore24-mcp-server
npm install

# Set your API key
echo "API_KEY_APIKEYAUTH=your_api_key_here" > .env

# Run locally with Claude Desktop
npm start

# Or run as HTTP server
npm start -- --http

šŸ“¦ Installation

Prerequisites

  • Node.js 20+
  • npm or yarn
  • Digistore24 API key

Local Installation

git clone https://github.com/digistore24/digistore24-mcp-server.git
cd digistore24-mcp-server
npm install
npm run build

Environment Setup

Create a .env file:

# Required for local development
API_KEY_APIKEYAUTH=your_digistore24_api_key

# Optional
PORT=3000
NODE_ENV=development

šŸ”§ Usage

Available Commands

# Build the project
npm run build

# Run with stdio transport (for Claude Desktop)
npm start

# Run with HTTP transport (for hosting)
npm start -- --http
npm start -- --transport=streamable-http

# Run on specific port
PORT=3001 npm start -- --http

Available Tools

Once connected, you have access to 60+ Digistore24 API endpoints:

Order Management
  • PostCreateorder - Create new orders
  • PostCreatebillingondemand - Create billing on demand
  • PostAddbalancetopurchase - Add balance to purchases
  • GetPurchases - Get purchase information
Product Management
  • PostCopyproduct - Copy products
  • PostCreateimage - Create product images
  • GetProducts - Get product listings
Customer & Member Management
  • PostLogmemberaccess - Log member access
  • GetPurchases - Get customer purchases
Validation & Verification
  • validateAffiliate - Validate affiliate relationships
  • validateCouponCode - Validate discount codes
  • validateEticket - Validate e-tickets
  • validateLicenseKey - Validate license keys
Analytics & Reporting
  • Various reporting and analytics endpoints

šŸ“– See the full API documentation in your MCP client after connecting

🌐 Hosted Service

This server is hosted by Digistore24 as a public service, allowing customers to connect their AI assistants to Digistore24 using their own API keys.

Architecture

  • Stateless Authentication: No server-side storage of customer API keys
  • Per-Request Auth: API key required and validated on every request
  • Session Isolation: Each customer connection is completely isolated
  • Maximum Security: API keys never persist in server memory
  • Hosted Only: Customers use the service at mcp.digistore24.com

šŸ“š API Reference

Health Check

GET /health

Returns server status and version information.

API Key Testing

GET /test-api-key?api_key=YOUR_KEY
GET /test-api-key
Authorization: Bearer YOUR_KEY

Validates an API key against Digistore24.

MCP Endpoint

POST /mcp
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Main MCP communication endpoint for all tool interactions.

āš™ļø Configuration

Environment Variables

VariableRequiredDescriptionDefault
API_KEY_APIKEYAUTHFor local devYour Digistore24 API key-
PORTNoServer port3000
NODE_ENVNoEnvironmentdevelopment

MCP Client Configuration

Claude Desktop

Add to ~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "digistore24": {
      "type": "http",
      "url": "https://mcp.digistore24.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
Cursor

Add to your MCP configuration:

{
  "mcpServers": {
    "digistore24": {
      "type": "http", 
      "url": "https://mcp.digistore24.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

šŸ“– See for Cursor-specific instructions

šŸ”’ Security

Customer API Keys

  • āœ… Stateless: No server-side storage of API keys
  • āœ… HTTPS Only: All communication encrypted in transit
  • āœ… Per-Request Auth: API key validated on every request
  • āœ… Isolated Sessions: Each customer connection independent
  • āœ… No Persistence: API keys discarded after each request

Best Practices

  • Always use HTTPS in production
  • Never commit API keys to version control
  • Rotate API keys regularly
  • Monitor API usage for anomalies
  • Use environment variables for sensitive data

šŸ—ļø Development

Project Structure

digistore24-mcp-server/
ā”œā”€ā”€ Dockerfile             # Production Docker image
ā”œā”€ā”€ .dockerignore          # Docker build optimization
ā”œā”€ā”€ docker-compose.yml     # Development/testing setup
ā”œā”€ā”€ .github/               # GitHub Actions workflows
│   └── workflows/
│       ā”œā”€ā”€ build-docker.yml    # Docker build & publish
│       ā”œā”€ā”€ cleanup-cache.yml   # Cache cleanup
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts           # Main MCP server logic
│   └── streamable-http.ts # HTTP transport implementation
ā”œā”€ā”€ build/                 # Compiled JavaScript
ā”œā”€ā”€ docs/                  # Documentation
│   ā”œā”€ā”€ CUSTOMER_SETUP_GUIDE.md
│   ā”œā”€ā”€ CURSOR_SETUP_GUIDE.md
│   └── ARCHITECTURE_SUMMARY.md
└── README.md              # This file

Building

npm run build

Docker Setup

Using Pre-built Image (Recommended)
# Pull and run the latest image from GitHub Container Registry
docker run -d \
  -p 3000:3000 \
  -e NODE_ENV=production \
  --restart unless-stopped \
  --name digistore24-mcp \
  ghcr.io/digistore24/digistore24-mcp-server:latest
Development/Testing
# Development with docker compose
docker compose up -d

# Or build locally
docker build -t digistore24-mcp-server .
docker run -d \
  -p 3000:3000 \
  -e NODE_ENV=production \
  --restart unless-stopped \
  digistore24-mcp-server
Available Image Tags
  • latest - Latest stable release from main branch
  • main - Latest commit from main branch
  • v* - Specific version releases (e.g., v1.0.0)

Testing (Internal Development Only)

# Test health endpoint
curl http://localhost:3000/health

# Test API key validation
curl -H "Authorization: Bearer test" http://localhost:3000/test-api-key

# Test MCP endpoint
curl -X POST http://localhost:3000/mcp \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2024-11-05",
      "capabilities": {"tools": {}},
      "clientInfo": {"name": "test-client", "version": "1.0.0"}
    }
  }'

šŸ“– Documentation

  • - Start here! How customers connect their AI assistants
  • - Specific instructions for Cursor users
  • - Internal deployment guide (for Digistore24 team)
  • - Technical overview and design decisions

šŸ¤ Support

šŸ“„ License

This project is licensed under the MIT License - see the file for details.