netsuite-mcp-server
v1.0.2
Published
NetSuite MCP Server with OAuth 1.0, Multi-User, Multi-Environment Support
Maintainers
Readme
NetSuite MCP Server
Model Context Protocol (MCP) server for NetSuite integration with OAuth 1.0 authentication.
Features
- Multi-User & Multi-Environment Support
- OAuth 1.0 Token-Based Authentication
- 8 Specialized Tools (4 AP Inquiry + 4 AR Credit Analyst)
- SOAP/REST API Integration
- Currency Mapping (internal IDs → ISO codes)
Installation
Install via npm:
npm install -g netsuite-mcp-serverVerify installation:
which netsuite-mcp-serverQuick Start
1. Get NetSuite OAuth Credentials
Create Integration:
Setup > Integration > Manage Integrations > New- Enable Token-Based Authentication
- Save Consumer Key & Secret
Create Access Token:
Setup > Users/Roles > Access Tokens > New- Select your integration and user/role
- Save Token ID & Secret
Get Account ID:
- Sandbox:
{number}_SB1or{number}_SB2 - Production: Numeric account ID
- Sandbox:
2. Configure Your IDE
- Cursor IDE: See
CURSOR_SETUP.md - VS Code: See
VS_CODE_SETUP.md
3. Configuration Example
Both IDEs use the same configuration format:
{
"mcpServers": {
"netsuite": {
"command": "netsuite-mcp-server",
"env": {
"NS_ACCOUNT_ID": "123456_SB1",
"NS_URL_SUBDOMAIN": "123456-sb1",
"NS_CONSUMER_KEY": "your_consumer_key",
"NS_CONSUMER_SECRET": "your_consumer_secret",
"NS_TOKEN_ID": "your_token_id",
"NS_TOKEN_SECRET": "your_token_secret",
"NS_ENVIRONMENT_ID": "sandbox"
}
}
}
}Available Tools
AP Inquiry Agent (4 tools)
get_po_receipt_status- Get PO receipt/fulfillment statuscalculate_vendor_aging_summary- Calculate AP aging for vendorget_vendor_open_bills- Get open vendor billssupplier_performance_summary- Get supplier KPIs
AR Credit Analyst Agent (4 tools)
evaluate_customer_risk_score- Calculate customer risk scoreget_customer_aging_summary- Calculate AR aging for customerget_customer_credit_limit_status- Get credit limit & statusget_recent_customer_payments- Get recent payment history
Usage Examples
- "Get aging summary for vendor ABC Supplies"
- "What's the risk score for customer Acme Corp?"
- "Show open bills for vendor XYZ"
- "Get credit limit status for customer Acme"
Environment Variables
| Variable | Required | Description |
|----------|----------|-------------|
| NS_ACCOUNT_ID | ✅ | NetSuite account ID (e.g., 123456_SB1) |
| NS_URL_SUBDOMAIN | ✅ | URL subdomain (e.g., 123456-sb1) |
| NS_CONSUMER_KEY | ✅ | OAuth consumer key |
| NS_CONSUMER_SECRET | ✅ | OAuth consumer secret |
| NS_TOKEN_ID | ✅ | Access token ID |
| NS_TOKEN_SECRET | ✅ | Access token secret |
| NS_ENVIRONMENT_ID | ❌ | Environment identifier (default: sandbox) |
Troubleshooting
401 Unauthorized
- Verify Token-Based Authentication is enabled in NetSuite
- Check integration is enabled
- Verify user account is active
- Ensure access token hasn't expired (sandbox tokens expire after refresh)
Common Issues
- Wrong URL Subdomain: Use
123456-sb1(hyphen, lowercase) not123456_SB1 - Account ID Mismatch: Account ID and Realm must match exactly
- Sandbox Refresh: Regenerate tokens after sandbox refresh
Getting Help
- Verify npm installation:
which netsuite-mcp-server - Check credentials are set correctly in IDE configuration
- Restart your IDE after configuration changes
- See setup guides for your IDE:
CURSOR_SETUP.mdorVS_CODE_SETUP.md
Updating
To update to the latest version:
npm update -g netsuite-mcp-serverLicense
MIT
