Skip to main content

NetSuite ERP MCP Server

Create a powerful Model Context Protocol (MCP) server for NetSuite ERP in minutes with our AI Gateway. This guide walks you through setting up seamless enterprise resource planning integration with comprehensive financial management and instant OAuth authentication.

About NetSuite ERP API

NetSuite ERP is a comprehensive cloud-based business management suite that provides financial management, order management, production management, supply chain management, and warehouse and fulfillment capabilities. The API enables deep integration with core business processes.

Key Capabilities

  • Financial Management: GL, AP, AR, and financial reporting
  • Order Management: Sales orders, purchase orders, fulfillment
  • Inventory Management: Multi-location inventory tracking
  • Manufacturing: Work orders, assemblies, BOMs
  • Project Management: Resource planning and tracking
  • Fixed Assets: Asset lifecycle management
  • Billing: Subscription and usage-based billing
  • Multi-Company: Subsidiary management

API Features

  • RESTlet API: Custom REST endpoints
  • SOAP Web Services: Full platform access
  • SuiteScript: Server-side customization
  • OAuth 2.0: Secure authentication
  • SuiteTalk: Web services integration
  • Real-time Events: Webhooks support
  • Bulk Operations: Mass data handling
  • Custom Records: Extensible data model

What You Can Do with NetSuite ERP MCP Server

The MCP server transforms NetSuite ERP API into a natural language interface, enabling AI agents to:

Financial Management

  • General Ledger

    • "Show trial balance for Q4"
    • "Create journal entry for accrual"
    • "Post recurring journals"
    • "Generate financial statements"
  • Accounts Payable

    • "Process vendor invoices"
    • "Schedule payment runs"
    • "Manage vendor credits"
    • "Track outstanding bills"
  • Accounts Receivable

    • "Create customer invoices"
    • "Apply payments to invoices"
    • "Generate aging reports"
    • "Process credit memos"

Order Management

  • Sales Orders

    • "Create sales order for customer"
    • "Check order status"
    • "Update shipping details"
    • "Generate pick tickets"
  • Purchase Orders

    • "Create PO from requisition"
    • "Approve purchase orders"
    • "Track PO receipts"
    • "Match invoices to POs"
  • Fulfillment

    • "Process shipments"
    • "Print packing slips"
    • "Update tracking numbers"
    • "Handle returns"

Inventory Management

  • Stock Control

    • "Check inventory levels"
    • "Transfer between locations"
    • "Adjust inventory counts"
    • "Set reorder points"
  • Costing

    • "Update item costs"
    • "Calculate landed costs"
    • "Run cost rollups"
    • "Analyze margins"
  • Lot/Serial Tracking

    • "Track serial numbers"
    • "Manage lot expiration"
    • "Trace item history"
    • "Handle recalls"

Manufacturing

  • Work Orders

    • "Create production orders"
    • "Release work orders"
    • "Track WIP status"
    • "Complete assemblies"
  • Bill of Materials

    • "Maintain BOM structures"
    • "Calculate material needs"
    • "Update revisions"
    • "Cost BOMs"
  • Planning

    • "Run MRP calculations"
    • "Generate planned orders"
    • "Check capacity"
    • "Schedule production"

Project Management

  • Project Setup

    • "Create new projects"
    • "Assign resources"
    • "Set milestones"
    • "Define budgets"
  • Time & Expense

    • "Log time entries"
    • "Submit expense reports"
    • "Approve timesheets"
    • "Bill to projects"
  • Project Accounting

    • "Track project costs"
    • "Recognize revenue"
    • "Monitor profitability"
    • "Generate project reports"

Reporting & Analytics

  • Financial Reports

    • "Generate P&L statements"
    • "Create balance sheets"
    • "Run cash flow reports"
    • "Produce board packages"
  • Operational Reports

    • "Sales analysis"
    • "Inventory turnover"
    • "Customer profitability"
    • "Vendor performance"
  • Custom Analytics

    • "Build saved searches"
    • "Create KPI dashboards"
    • "Schedule reports"
    • "Export to Excel"

Multi-Entity Management

  • Subsidiary Operations

    • "Consolidate financials"
    • "Manage intercompany"
    • "Handle eliminations"
    • "Multi-currency reporting"
  • Global Business

    • "Currency conversions"
    • "Tax compliance"
    • "Transfer pricing"
    • "Local reporting"
  • Entity Structure

    • "Create subsidiaries"
    • "Define hierarchies"
    • "Set exchange rates"
    • "Map accounts"

Integration & Automation

  • Data Import/Export

    • "Import CSV data"
    • "Export to data warehouse"
    • "Sync with external systems"
    • "Schedule data feeds"
  • Workflow Automation

    • "Create approval workflows"
    • "Automate notifications"
    • "Trigger actions"
    • "Route documents"
  • API Integration

    • "RESTlet endpoints"
    • "SOAP operations"
    • "Webhook events"
    • "Bulk processing"

Prerequisites

  • Access to Cequence AI Gateway
  • NetSuite account with API access
  • Integration credentials
  • Required permissions

Step 1: Set Up NetSuite Integration

1.1 Enable Features

  1. Go to Setup > Company > Enable Features
  2. Under SuiteCloud tab, enable:
    • Token-Based Authentication
    • REST Web Services
    • OAuth 2.0

1.2 Create Integration Record

  1. Navigate to Setup > Integration > Manage Integrations
  2. Click New
  3. Configure:
    • Name: "AI Gateway ERP Integration"
    • State: Enabled
    • OAuth 2.0: Check

1.3 Configure OAuth 2.0

  1. Select scopes:
    • REST Web Services
    • RESTlets
    • SuiteScript
  2. Set callback URL from AI Gateway
  3. Note credentials:
    • Client ID
    • Client Secret

1.4 User Permissions

  1. Create integration role
  2. Assign necessary permissions
  3. Link to integration user

Step 2-4: Standard Setup

Follow standard steps to access AI Gateway, find NetSuite ERP API, and create MCP server.

Step 5: Configure API Endpoints

  1. Account ID: Your NetSuite account ID
  2. Base URL: https://{accountId}.suitetalk.api.netsuite.com
  3. Select endpoints:
    • Financial endpoints
    • Order endpoints
    • Inventory endpoints
    • Project endpoints
  4. Click Next

Step 6: MCP Server Configuration

  1. Name: "NetSuite ERP"
  2. Description: "Enterprise resource planning"
  3. Configure production mode
  4. Click Next

Step 7: Configure Authentication

  1. Authentication Type: OAuth 2.0
  2. Authorization URL:
    https://{accountId}.app.netsuite.com/app/login/oauth2/authorize.nl
  3. Token URL:
    https://{accountId}.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token
  4. Enter Client ID and Secret

Available NetSuite ERP API Scopes

Financial Management

  • General Ledger

    • Journal entries
    • Account management
    • Period close
    • Financial reporting
  • Billing & Revenue

    • Invoice management
    • Payment processing
    • Revenue recognition
    • Billing schedules

Operations Management

  • Supply Chain

    • Purchase orders
    • Vendor management
    • Receiving
    • Drop shipping
  • Inventory

    • Item management
    • Stock counts
    • Transfers
    • Adjustments

Reporting & Analytics

  • Financial Reports

    • Standard reports
    • Custom reports
    • Saved searches
    • KPI dashboards
  • Analytics

    • Real-time data
    • Historical analysis
    • Predictive insights
    • Trend analysis

For Finance Teams:

Financial Management (Full)
Reporting (Read)
Approvals (Write)
Audit (Read)

For Operations:

Inventory Management (Full)
Order Management (Full)
Supply Chain (Full)
Reporting (Read)

Step 8-10: Complete Setup

Configure security, choose deployment, and deploy.

Using Your NetSuite ERP MCP Server

With Claude Desktop

{
"servers": {
"netsuite-erp": {
"url": "your-mcp-server-url",
"auth": {
"type": "oauth2",
"client_id": "your-client-id",
"client_secret": "your-client-secret",
"account_id": "your-account-id"
}
}
}
}

Natural Language Commands

  • "Show me the trial balance for December"
  • "Create a purchase order for office supplies"
  • "What's our current inventory level for SKU-12345?"
  • "Generate aged receivables report"
  • "Process month-end closing entries"

API Integration Example

// Initialize MCP client
const mcpClient = new MCPClient({
serverUrl: 'your-mcp-server-url',
auth: {
type: 'oauth2',
clientId: 'your-client-id',
clientSecret: 'your-client-secret',
accountId: 'your-account-id'
}
});

// Financial operations
const trialBalance = await mcpClient.netsuite.erp.getTrialBalance({
periodId: 'lastmonth',
subsidiary: 'all',
includeInactive: false
});

console.log('Trial Balance Summary:');
console.log(`Total Debits: $${trialBalance.totalDebits.toLocaleString()}`);
console.log(`Total Credits: $${trialBalance.totalCredits.toLocaleString()}`);
console.log(`In Balance: ${trialBalance.isBalanced}`);

// Create journal entry
const journalEntry = await mcpClient.netsuite.erp.createJournalEntry({
subsidiary: 1,
currency: 'USD',
tranDate: new Date(),
memo: 'Month-end accrual',
lines: [
{
account: 620, // Salary Expense
debit: 50000,
department: 10,
class: 100
},
{
account: 240, // Accrued Expenses
credit: 50000,
department: 10,
class: 100
}
]
});

// Inventory management
const inventoryStatus = await mcpClient.netsuite.erp.getInventoryStatus({
itemId: 'SKU-12345',
location: 'all',
includeOnOrder: true
});

console.log(`\nInventory Status for SKU-12345:`);
console.log(`Available: ${inventoryStatus.quantityAvailable}`);
console.log(`On Hand: ${inventoryStatus.quantityOnHand}`);
console.log(`On Order: ${inventoryStatus.quantityOnOrder}`);
console.log(`Reorder Point: ${inventoryStatus.reorderPoint}`);

if (inventoryStatus.quantityAvailable < inventoryStatus.reorderPoint) {
// Create purchase order
const purchaseOrder = await mcpClient.netsuite.erp.createPurchaseOrder({
vendor: 1234, // Vendor ID
tranDate: new Date(),
items: [{
item: 'SKU-12345',
quantity: inventoryStatus.reorderQuantity,
rate: inventoryStatus.lastPurchasePrice,
expectedReceiptDate: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000)
}]
});

console.log(`Created PO #${purchaseOrder.tranId}`);
}

// Sales order processing
const salesOrder = await mcpClient.netsuite.erp.createSalesOrder({
customer: 5678,
tranDate: new Date(),
items: [
{
item: 'PROD-001',
quantity: 10,
price: 'base',
commitInventory: 'available'
}
],
shipMethod: 'fedexGround',
terms: 'net30'
});

// Project tracking
const projectStatus = await mcpClient.netsuite.erp.getProjectStatus({
projectId: 789,
includeTimeEntries: true,
includeExpenses: true
});

console.log(`\nProject: ${projectStatus.name}`);
console.log(`Status: ${projectStatus.status}`);
console.log(`% Complete: ${projectStatus.percentComplete}%`);
console.log(`Budget: $${projectStatus.budget.toLocaleString()}`);
console.log(`Actual: $${projectStatus.actualCost.toLocaleString()}`);
console.log(`Variance: $${(projectStatus.budget - projectStatus.actualCost).toLocaleString()}`);

// Manufacturing operations
const workOrder = await mcpClient.netsuite.erp.createWorkOrder({
assemblyItem: 'ASSY-100',
quantity: 50,
location: 'factory',
scheduledDate: new Date(Date.now() + 3 * 24 * 60 * 60 * 1000),
priority: 'high'
});

// Run MRP
const mrpResults = await mcpClient.netsuite.erp.runMRP({
planningHorizon: 90, // days
includeForecasts: true,
safetyStockDays: 7
});

console.log(`\nMRP Results:`);
console.log(`Planned Orders: ${mrpResults.plannedOrders.length}`);
console.log(`Suggested POs: ${mrpResults.suggestedPurchases.length}`);
console.log(`Shortage Alerts: ${mrpResults.shortages.length}`);

// Financial reporting
const financialStatements = await mcpClient.netsuite.erp.generateFinancialStatements({
period: 'lastQuarter',
statements: ['incomeStatement', 'balanceSheet', 'cashFlow'],
comparative: true,
consolidate: true
});

// Multi-company consolidation
const consolidation = await mcpClient.netsuite.erp.consolidateFinancials({
period: 'currentMonth',
subsidiaries: 'all',
eliminateIntercompany: true,
currency: 'USD'
});

// Approval workflow
const pendingApprovals = await mcpClient.netsuite.erp.getPendingApprovals({
types: ['purchaseOrder', 'expenseReport', 'journalEntry'],
approver: 'current'
});

for (const approval of pendingApprovals) {
console.log(`\nPending: ${approval.type} - ${approval.tranId}`);
console.log(`Amount: $${approval.amount.toLocaleString()}`);
console.log(`Requester: ${approval.requester}`);

// Auto-approve within limits
if (approval.amount <= 10000) {
await mcpClient.netsuite.erp.approveTransaction({
transactionId: approval.id,
comments: 'Auto-approved within limit'
});
}
}

// Advanced analytics
const analytics = await mcpClient.netsuite.erp.runAnalytics({
analysis: 'customerProfitability',
period: 'ytd',
metrics: ['revenue', 'margin', 'costs', 'profitability'],
groupBy: ['customer', 'product', 'region']
});

// Real-time monitoring
const monitor = await mcpClient.netsuite.erp.startMonitoring({
events: ['orderCreated', 'paymentReceived', 'inventoryLow', 'approvalRequired'],
filters: {
amount: { min: 10000 },
priority: 'high'
}
});

monitor.on('event', async (event) => {
console.log(`Event: ${event.type}`);
console.log(`Details: ${JSON.stringify(event.data)}`);

if (event.type === 'inventoryLow') {
await handleLowInventory(event.data);
}
});

Common Use Cases

Financial Management

  • Period-end closing
  • Financial consolidation
  • Multi-currency accounting
  • Revenue recognition

Supply Chain

  • Purchase order automation
  • Vendor management
  • Inventory optimization
  • Demand planning

Manufacturing

  • Production planning
  • Work order management
  • BOM maintenance
  • Cost accounting

Business Intelligence

  • Real-time dashboards
  • Predictive analytics
  • Custom reporting
  • KPI monitoring

Security Best Practices

  1. Access Control:

    • Role-based permissions
    • IP restrictions
    • Session management
    • Audit trails
  2. Data Security:

    • Field-level encryption
    • Data masking
    • Secure APIs
    • Compliance controls
  3. Integration Security:

    • OAuth 2.0 only
    • Token rotation
    • Webhook validation
    • Rate limiting

Troubleshooting

Common Issues

  1. Authentication Errors

    • Verify account ID
    • Check OAuth setup
    • Validate permissions
    • Review IP restrictions
  2. Performance Issues

    • Optimize searches
    • Use async operations
    • Implement caching
    • Monitor API limits
  3. Data Integrity

    • Validate mappings
    • Check dependencies
    • Review workflows
    • Test in sandbox

Getting Help