Skip to main content
Glama

Paymenter MCP Server πŸš€

TIP

🌐Language Selection / Chọn NgΓ΄n Ngα»― TΓ i Liệu:
πŸ‡ΊπŸ‡Έ English (README.md) β€’ πŸ‡»πŸ‡³ TiαΊΏng Việt (README_VI.md)

License: MIT Node.js Version Model Context Protocol Zero Dependencies Paymenter Version JSON:API Specification GitHub Stars GitHub Forks GitHub Issues

Enterprise Model Context Protocol (MCP) Server and Agent Skill for Paymenter (v1.2.0+).
Empowers AI Agents (Google Antigravity, Claude Desktop, Cursor, Cline) to autonomously govern cloud hosting infrastructure, provision VPS/servers, orchestrate client billing, automate support helpdesks, and manage wallet credits.


πŸ“‘ Table of Contents


Related MCP server: Plesk MCP Server

🌐 Translations / Đa Ngôn Ngữ

This documentation is available in multiple languages:

Language

Document Link

Description

πŸ‡ΊπŸ‡Έ English

README.md

Official documentation (Default)

πŸ‡»πŸ‡³ TiαΊΏng Việt

README_VI.md

BαΊ£n dα»‹ch tΓ i liệu Δ‘αΊ§y Δ‘α»§ & chi tiαΊΏt 100%


πŸ›οΈ Architecture Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                    
β”‚AgentRequestβ”‚                    
β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                    
β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           
β”‚MCP Router (35 Tools)β”‚           
β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           
β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚Lazy Schema Validator (draft-07)β”‚
β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”           
β”‚Paymenter HTTP Clientβ”‚           
β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           
β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      
β”‚JSON:API Sideload Hydratorβ”‚      
β””β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      
β”Œβ–½β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                   
β”‚AgentResponseβ”‚                   
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                   

πŸ’‘ Why Paymenter MCP?

Capability

Manual API Integration

Paymenter MCP Server

Agent Discovery

Requires feeding 180KB OpenAPI JSON into context (~45k tokens)

Lazy-Loaded Tool Schemas: Zero token bloat at startup (~85% savings)

Relational Data

Raw JSON:API with scattered included array (requires manual lookup)

Automatic Hydration: Seamlessly maps nested entities into single coherent objects

Runtime Portability

Complex dependencies or Docker wrappers

Zero Dependencies: Pure Node.js built-ins (http, readline), starts in <50ms

Error Handling

Unformatted 422 HTTP validation crashes

Standard MCP { isError: true } with clear parameter diagnostics

Verification

Blind runtime calls

Built-in offline test ratchet suite (--test flag)


✨ Key Features

  • ⚑ Zero External Dependencies: 100% native Node.js (http, https, readline). Works out-of-the-box on Node.js 18+ without running npm install.

  • 🎯 35 Specialized Tools: Comprehensive management across 7 business domains (Users, Orders, Services, Invoices, Credits, Tickets, Catalog).

  • πŸ“¦ JSON:API Compound Document Hydration: Automatically resolves references between data.relationships and the included array so LLMs receive rich, context-complete payloads.

  • 🧠 Modern Antigravity Lazy-Loading: Includes 35 standalone JSON Schema Draft-07 files (schemas/*.json) and an operational instructions.md, preventing context window saturation.

  • πŸ›‘οΈ Self-Test Ratchet Suite: Run node server.js --test anytime to execute 9 offline test suites with guaranteed Exit Code 0.


🧰 35 Tools Catalog

Category

Tool Name

Description

System & Health

paymenter_health_check

Verify API connectivity, latency, auth token validity, and Paymenter server version.

paymenter_search

Global cross-entity search across Users, Orders, Services, Tickets, and Invoices.

paymenter_get_dashboard_summary

Executive metrics (active services count, unpaid invoices, pending tickets, users).

User Management

paymenter_list_users

List & filter users (filter[email], first_name, last_name, pagination, sort).

paymenter_get_user

Fetch single user profile by ID (sideload role, credits).

paymenter_create_user

Create new client account (email, password, first_name, last_name, role_id).

paymenter_update_user

Update client details, email verification status, or role.

paymenter_delete_user

Permanently remove client account from database.

paymenter_get_user_overview

360Β° client snapshot in 1 call (Profile + Credits + Services + Invoices + Tickets).

Orders & Services

paymenter_list_orders

List client orders (filter[id], currency_code, sideload services, user).

paymenter_get_order

Retrieve order details and constituent service instances.

paymenter_create_order

Generate new order (user_id, currency_code).

paymenter_delete_order

Cancel and delete order.

paymenter_list_services

List hosting/VPS instances (filter[status], expires_at, price, subscription_id).

paymenter_get_service

Detailed service configuration, package specs, and expiry date.

paymenter_create_service

Provision new service instance (product_id, plan_id, user_id, quantity, price).

paymenter_update_service

Modify service attributes, expiration, or billing cycle.

Lifecycle Actions

paymenter_suspend_service

Lock/suspend active service instance with reason.

paymenter_unsuspend_service

Re-activate suspended service instance.

paymenter_renew_service

Extend expiration date (expires_at) and create renewal invoice.

paymenter_cancel_service

Terminate and mark service as cancelled.

Billing & Credits

paymenter_list_invoices

List invoices (filter[user_id], status: pending/paid/cancelled).

paymenter_get_invoice

Fetch invoice breakdown and line items (include=items).

paymenter_create_invoice

Generate new billing invoice (user_id, currency_code, status, due_at).

paymenter_update_invoice

Update invoice status or due date.

paymenter_delete_invoice

Delete invoice from billing system.

paymenter_create_invoice_item

Add line item to invoice (invoice_id, description, price, quantity).

paymenter_manage_credit

Add or debit client prepaid wallet credit (user_id, amount, currency_code).

Support Desk

paymenter_list_tickets

List tickets (filter[status], filter[priority], filter[department]).

paymenter_get_ticket

View ticket discussion thread (include=messages).

paymenter_create_ticket

Open new support ticket (subject, user_id, priority, department).

paymenter_reply_ticket

Post message reply and optionally update status (replied/closed).

Catalog & Affiliates

paymenter_list_products

Browse hosting packages, server specifications, and pricing.

paymenter_list_categories

Browse product service categories.

paymenter_manage_affiliate

Manage referral affiliate codes (code), rewards, and commission rates.


πŸš€ Quickstart & Verification

1. Prerequisites

  • Node.js: v18.0.0 or higher.

  • Paymenter Instance: v1.2.0 or higher with an API Bearer token.

2. Environment Variables

export PAYMENTER_URL="https://billing.yourdomain.com/api"
export PAYMENTER_API_TOKEN="your_paymenter_api_bearer_token_here"

3. Run Built-in Verification Suite

node server.js --test

Output Evidence:

=== Paymenter MCP Server Self-Test Suite ===
1. Testing method "initialize"... PASSED
2. Testing method "ping"... PASSED
3. Testing notification "notifications/initialized"... PASSED
4. Testing method "tools/list"... PASSED (Exactly 35 tools registered)
5. Verifying schema structure of all 35 tools... PASSED
6. Testing "tools/call" for "paymenter_health_check"... PASSED
7. Testing "tools/call" error handling for non-existent tool... PASSED
8. Testing "tools/call" error handling for missing arguments... PASSED
9. Testing JSON:API compound document hydration... PASSED
>>> All 9 MCP Self-Tests Passed Successfully! Exit Code 0. <<<

πŸ”Œ Client Configurations

Google Antigravity CLI / IDE

Add to your ~/.gemini/antigravity-cli/settings.json (or project .agents/settings.json):

{
  "mcpServers": {
    "paymenter": {
      "command": "node",
      "args": ["/path/to/paymenter-mcp/server.js"],
      "env": {
        "PAYMENTER_URL": "https://billing.yourdomain.com/api",
        "PAYMENTER_API_TOKEN": "your_api_token"
      }
    }
  }
}

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "paymenter": {
      "command": "node",
      "args": ["/path/to/paymenter-mcp/server.js"],
      "env": {
        "PAYMENTER_URL": "https://billing.yourdomain.com/api",
        "PAYMENTER_API_TOKEN": "your_api_token"
      }
    }
  }
}

Cursor IDE

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "paymenter": {
      "command": "node",
      "args": ["/path/to/paymenter-mcp/server.js"],
      "env": {
        "PAYMENTER_URL": "https://billing.yourdomain.com/api",
        "PAYMENTER_API_TOKEN": "your_api_token"
      }
    }
  }
}

πŸ“¦ JSON:API Sideload Hydration

Paymenter utilizes the JSON:API v1.0 standard where related objects reside in an included array. Paymenter MCP Server intercepts and hydrates these relationships client-side:

// Example: Querying service with user and order relations
// Raw JSON:API separates data.relationships and included array.
// Paymenter MCP Server returns unified, hydrated data:
{
  "id": "104",
  "type": "services",
  "attributes": {
    "status": "active",
    "expires_at": "2027-01-01T00:00:00Z"
  },
  "hydrated_relationships": {
    "user": {
      "id": "42",
      "email": "customer@example.com",
      "first_name": "Jane"
    },
    "order": {
      "id": "89",
      "currency_code": "USD"
    }
  }
}

❓ Frequently Asked Questions (FAQ)

Q1: What version of Paymenter is supported?

A: Paymenter MCP Server officially supports Paymenter v1.2.0 and higher, which features the modern Laravel JSON:API administrative backend.

Q2: Does this work if Paymenter is running in Docker?

A: Yes! As long as your Paymenter container exposes its web port (e.g. http://localhost:8000/api or https://billing.domain.com/api), the MCP server will interact seamlessly via standard HTTP.

Q3: What API token permissions are required?

A: The Bearer token should be generated with Administrator privileges inside the Paymenter admin control panel to access administrative routes (/v1/admin/*).

Q4: Why is this written in Zero-Dependency Node.js?

A: To maximize portability, reliability, and speed. AI coding assistants (Antigravity CLI, Claude Desktop, Cursor) can launch server.js instantly without risking broken dependencies or needing an active internet connection to run npm install.

Q5: Can I use this alongside the Antigravity Agent Skill?

A: Yes! The included skill/ directory contains SKILL.md and reference guides designed specifically for Antigravity, providing deep domain knowledge while the MCP server executes the API operations.

Q6: How are rate limits handled?

A: Paymenter MCP Server gracefully handles HTTP 429 Too Many Requests responses, returning formatted error diagnostics with retry suggestions directly to the calling LLM.


πŸ“ Repository Structure

paymenter-mcp/
β”œβ”€β”€ package.json                          # Node.js project manifest (zero dependencies)
β”œβ”€β”€ server.js                             # Standalone MCP server (JSON-RPC 2.0 stdio, 35 tools)
β”œβ”€β”€ schemas/                              # Modern Antigravity Lazy-Loaded JSON schemas
β”‚   β”œβ”€β”€ instructions.md                   # Operational guidelines & relationship rules
β”‚   β”œβ”€β”€ paymenter_health_check.json
β”‚   β”œβ”€β”€ paymenter_list_users.json
β”‚   └── ... (all 35 draft-07 schemas)
β”œβ”€β”€ skill/                                # Antigravity agent skill module
β”‚   β”œβ”€β”€ SKILL.md                          # Comprehensive agent skill guide
β”‚   β”œβ”€β”€ references/
β”‚   β”‚   β”œβ”€β”€ api-endpoints.md              # 22 endpoints technical reference
β”‚   β”‚   └── jsonapi-conventions.md        # JSON:API v1.0 specifications
β”‚   └── scripts/
β”‚       └── paymenter_client.py           # Standalone Python client SDK
β”œβ”€β”€ .github/                              # GitHub templates
β”‚   └── ISSUE_TEMPLATE/
β”‚       β”œβ”€β”€ bug_report.md
β”‚       └── feature_request.md
β”œβ”€β”€ CONTRIBUTING.md                       # Contribution guidelines
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE                               # MIT License
└── README.md                             # Documentation & user guide

🀝 Contributing & Community

Contributions are welcomed! Please read our Contributing Guidelines and check out our Bug Report and Feature Request templates.

If you find this project useful, please give it a Star ⭐ on GitHub to support open-source AI infrastructure!


πŸ“„ License

This repository is licensed under the MIT License.
Copyright (c) 2026 Do Ngoc Anh (dongocanh0501).


Available Tools

35 tools
paymenter_cancel_serviceC

Cancel a service gracefully.

Inputs: service_id (required), reason.

paymenter_create_invoiceC

Create a new invoice for a customer.

Inputs: user_id (required), currency_code (required), due_at, status.

paymenter_create_invoice_itemC

Add a line item or charge to an existing invoice.

Inputs: price (required), quantity (required), invoice_id (required), description (required), +2 more.

paymenter_create_orderC

Create a new order for a user.

Inputs: user_id (required), currency_code (required).

paymenter_create_serviceC

Provision and assign a new digital/hosting service to a customer.

Inputs: price (required), status (required), plan_id (required), user_id (required), +7 more.

paymenter_create_ticketC

Open a new customer support ticket.

Inputs: status (required), subject (required), user_id (required), priority (required), +1 more.

paymenter_create_userC

Register and create a new customer account in Paymenter.

Inputs: email (required), password (required), role_id, last_name, +2 more.

paymenter_delete_invoiceB

Permanently delete an invoice record.

Inputs: invoice_id (required).

paymenter_delete_orderB

Permanently delete an order by ID.

Inputs: order_id (required).

paymenter_delete_userA

Permanently delete a user account from Paymenter (irreversible).

Inputs: user_id (required).

paymenter_get_dashboard_summaryB

Fetch key operational metrics and statistics: total users, active services, pending invoices, open tickets.

Inputs: no named parameters.

paymenter_get_invoiceB

Get invoice details and line items by invoice ID.

Inputs: invoice_id (required), include.

paymenter_get_orderC

Get order details by order ID.

Inputs: order_id (required), include.

paymenter_get_serviceC

Get detailed service provision record by ID.

Inputs: service_id (required), include.

paymenter_get_ticketA

Get ticket details and message thread by ticket ID.

Inputs: ticket_id (required), include.

paymenter_get_userC

Retrieve detailed profile information for a specific user by ID.

Inputs: user_id (required), include.

paymenter_get_user_overviewA

Fetch consolidated user overview including active services, open tickets, recent invoices, and credit balance.

Inputs: user_id (required).

paymenter_health_checkA

Check connectivity to Paymenter API and verify administrative API token authentication.

Inputs: check_connectivity.

paymenter_list_categoriesC

List product categories in Paymenter.

Inputs: name, page, slug, sort, +3 more.

paymenter_list_invoicesC

List invoices with status, user filtering, and pagination.

Inputs: page, sort, status, include, +3 more.

paymenter_list_ordersB

List customer orders with pagination, sorting, and relations.

Inputs: page, sort, include, per_page, +1 more.

paymenter_list_productsC

List available products/plans in the catalog.

Inputs: name, page, slug, sort, +4 more.

paymenter_list_servicesC

List provisioned hosting/digital services.

Inputs: page, sort, status, include, +3 more.

paymenter_list_ticketsB

List customer support tickets with filters.

Inputs: page, sort, status, include, +4 more.

paymenter_list_usersB

List customer accounts with pagination, sorting, and filtering.

Inputs: page, sort, email, include, +3 more.

paymenter_manage_affiliateC

Manage affiliate partner accounts: list, get, create, update, or delete.

Inputs: action (required), code, reward, enabled, +2 more.

paymenter_manage_creditC

Manage user prepaid credits wallet: list, get, deposit, update, or delete balances.

Inputs: action (required), amount, user_id, credit_id, +1 more.

paymenter_renew_serviceC

Renew a service by extending its expiration date.

Inputs: service_id (required), new_expires_at (required).

paymenter_reply_ticketB

Post a reply message to an existing support ticket thread.

Inputs: message (required), user_id (required), ticket_id (required).

paymenter_suspend_serviceA

Suspend an active service (e.g. for overdue invoice or abuse).

Inputs: service_id (required), reason.

paymenter_unsuspend_serviceB

Reactivate a suspended service to active status.

Inputs: service_id (required).

paymenter_update_invoiceC

Update invoice status or due date.

Inputs: invoice_id (required), due_at, status, user_id, +1 more.

paymenter_update_serviceB

Update properties or metadata of a service.

Inputs: service_id (required), price, status, quantity, +2 more.

paymenter_update_userC

Update profile or credentials of an existing user.

Inputs: user_id (required), email, role_id, password, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 35 tools

    Disambiguation5/5

    Each tool targets a distinct resource and action; search vs. list tools are differentiated by query-based vs. filtered listing, and get_user vs. get_user_overview are clearly separate. No major overlaps or ambiguous pairs.

    Naming Consistency4/5

    All tools use the paymenter_ prefix and snake_case, mostly following a verb_noun pattern. Minor deviations: health_check is noun-based, and manage_credit/manage_affiliate bundle multiple actions unlike the per-action tools.

    Tool Count2/5

    With 35 tools, this exceeds the 25+ threshold for 'too many' under the rubric. While the billing domain is broad, many operations could be consolidated, especially since multi-action tools like manage_credit already exist elsewhere.

    Completeness3/5

    Core user, service, invoice, and affiliate/credit lifecycles are well covered. However, notable gaps exist: no ticket close/status update, no order update, and products/categories are read-only, which can block common admin workflows.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage Coolify infrastructure including servers, applications, databases, deployments, and 80+ one-click services through 98 comprehensive tools for both cloud and self-hosted instances.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to manage Plesk hosting environments through a set of standardized tools for security, health monitoring, DNS, email, backups, and service management.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to manage Cloudways infrastructure, including servers, applications, monitoring, and security via the Cloudways API.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to administrate WHMCS installations through the External API, providing ~50 tools for clients, billing, orders, services, domains, support, and aggregators with safety features and governance.
      58 npm
      3
      ISC