GBL-AX2012-MCP

rweisssieker-xp/GBL-AX2012-MCP

3.2

If you are the rightful owner of GBL-AX2012-MCP 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 Model Context Protocol (MCP) Server for Microsoft Dynamics AX 2012 R3 is a production-ready server designed to facilitate AI assistants in automating the Order-to-Cash (O2C) process.

Tools
15
Resources
0
Prompts
0

GBL-AX2012-MCP

Model Context Protocol (MCP) Server for Microsoft Dynamics AX 2012 R3

A production-ready MCP server that enables AI assistants to interact with AX 2012 R3 for complete Order-to-Cash (O2C) automation.

Features

Tools - Full O2C Coverage

Phase 1: Order Capture
ToolDescriptionRole
ax_health_checkCheck server and AX connectivityRead
ax_get_customerGet customer by account or search by nameRead
ax_get_salesorderGet sales order by ID or list by customerRead
ax_check_inventoryCheck item availabilityRead
ax_simulate_priceSimulate pricing without creating orderRead
ax_create_salesorderCreate new sales orderWrite
Phase 2: Fulfillment
ToolDescriptionRole
ax_reserve_saleslineReserve inventory for order lineWrite
ax_post_shipmentPost shipment/packing slipWrite
Phase 3: Invoice & Dunning
ToolDescriptionRole
ax_create_invoiceCreate and post invoiceWrite
ax_get_customer_agingGet AR aging and open invoicesRead
Phase 4: Payment & Close
ToolDescriptionRole
ax_post_paymentPost customer paymentWrite
ax_settle_invoiceSettle invoice against paymentWrite
ax_close_salesorderClose completed orderWrite
Approval Workflow
ToolDescriptionRole
ax_request_approvalRequest approval for high-value operationsWrite
ax_get_approval_statusCheck approval statusRead
Batch Operations & Webhooks (NEW)
ToolDescriptionRole
ax_batch_operationsExecute multiple operations in a single callWrite
ax_subscribe_webhookSubscribe to MCP events via webhooksAdmin
ax_list_webhooksList all webhook subscriptionsAdmin
ax_unsubscribe_webhookUnsubscribe from a webhookAdmin
ax_get_roi_metricsGet ROI metrics for MCP operationsAdmin
ax_bulk_importImport data from CSV/JSONWrite
Self-Healing (NEW)
ToolDescriptionRole
ax_get_self_healing_statusGet status of self-healing componentsAdmin

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                        MCP Server (.NET 8)                      │
│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────────┐  │
│  │ Rate Limiter│  │Circuit Break│  │ Windows Authentication  │  │
│  └─────────────┘  └─────────────┘  └─────────────────────────┘  │
│  ┌─────────────────────────────────────────────────────────────┐│
│  │                         Tools                                ││
│  │  HealthCheck │ GetCustomer │ GetSalesOrder │ CheckInventory ││
│  │  SimulatePrice │ CreateSalesOrder │ BatchOps │ Webhooks     ││
│  └─────────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────────┘
                              │
        ┌─────────────────────┼─────────────────────┐
        ▼                     ▼                     ▼
┌───────────────┐    ┌───────────────┐    ┌──────────────────────┐
│ AIF Client    │    │ WCF Client    │    │ BC.Wrapper Service  │
│ HTTP/NetTcp   │    │ (Writes)      │    │ (.NET Framework)    │
│ (Reads)       │    │               │    │ → BC.NET → AX       │
└───────────────┘    └───────────────┘    └──────────────────────┘
        │                     │                     │
        └─────────────────────┼─────────────────────┘
                              ▼
                    ┌───────────────────┐
                    │  AX 2012 R3 AOS   │
                    └───────────────────┘

Features:

  • Automatic Fallback: HTTP → NetTcp for AIF
  • BC.Wrapper: .NET Framework bridge for BC.NET
  • Configuration Validation: Startup checks
  • Self-Healing: Automatic recovery

Multi-Channel Transport

TransportPortDescription
stdio-Standard MCP protocol for Claude Desktop
HTTP8080REST API for n8n, webhooks, custom integrations
Metrics9090Prometheus metrics endpoint

Quick Start

Prerequisites

  • .NET 8.0 SDK
  • Microsoft Dynamics AX 2012 R3 CU13
  • Windows Authentication configured

Build

dotnet restore
dotnet build

Run

dotnet run --project src/GBL.AX2012.MCP.Server

Test

dotnet test

HTTP API Usage

# List tools
curl http://localhost:8080/tools

# Call a tool
curl -X POST http://localhost:8080/tools/call \
  -H "Content-Type: application/json" \
  -d '{"tool": "ax_get_customer", "arguments": {"customerAccount": "CUST-001"}}'

# Health check
curl http://localhost:8080/health

# Prometheus metrics
curl http://localhost:9090/metrics

Configuration

Edit appsettings.json:

{
  "McpServer": {
    "ServerName": "gbl-ax2012-mcp",
    "ServerVersion": "1.6.0"
  },
  "AifClient": {
    "BaseUrl": "http://ax-aos:8101/DynamicsAx/Services",
    "Company": "DAT",
    "UseNetTcp": false,
    "NetTcpPort": 8201,
    "FallbackStrategy": "auto"
  },
  "BusinessConnector": {
    "ObjectServer": "ax-aos:2712",
    "Company": "DAT",
    "UseWrapper": true,
    "WrapperUrl": "http://localhost:8090"
  },
  "RateLimiter": {
    "RequestsPerMinute": 100
  },
  "CircuitBreaker": {
    "FailureThreshold": 3,
    "OpenDuration": "00:01:00"
  },
  "ConnectionStrings": {
    "AuditDb": "Server=localhost;Database=MCP_Audit;Trusted_Connection=True;TrustServerCertificate=True"
  }
}

New Features

NetTcp Support:

  • Automatic fallback from HTTP to NetTcp
  • Configurable via FallbackStrategy: "auto", "http", or "nettcp"
  • See docs/AIF-NETTCP-SETUP.md

BC.Wrapper:

  • .NET Framework service for Business Connector .NET
  • Required for .NET 8 compatibility
  • See docs/BC-WRAPPER-SETUP.md

Configuration Validation:

  • Automatic validation on startup
  • Checks database, AX connections, URLs
  • Application won't start if validation fails

Claude Desktop Integration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "ax2012": {
      "command": "dotnet",
      "args": ["run", "--project", "C:/path/to/GBL.AX2012.MCP.Server"]
    }
  }
}

Security

  • Authentication: Windows Authentication (NTLM/Kerberos)
  • Authorization: Role-based (MCP_Read, MCP_Write, MCP_Admin)
  • Rate Limiting: 100 requests/minute per user
  • Circuit Breaker: Opens after 3 failures, 60s recovery
  • Audit: All operations logged

Project Structure

GBL.AX2012.MCP/
├── src/
│   ├── GBL.AX2012.MCP.Core/          # Interfaces, Models, Options
│   ├── GBL.AX2012.MCP.Server/        # MCP Server, Tools, Middleware
│   ├── GBL.AX2012.MCP.AxConnector/   # AIF, WCF, BC.NET clients
│   └── GBL.AX2012.MCP.Audit/         # Audit services
├── tests/
│   ├── GBL.AX2012.MCP.Server.Tests/
│   └── GBL.AX2012.MCP.AxConnector.Tests/
└── docs/                              # Documentation

License

Proprietary - GBL Internal Use Only

Author

Reinerw - 2025