Connecting NetSuite to ChatGPT and Claude via MCP
Learn how to connect your NetSuite account to AI assistants like ChatGPT and Claude using the Model Context Protocol (MCP). This guide covers NetSuite configuration, OAuth 2.0 setup, and step-by-step connection instructions.
Prerequisites
Before connecting NetSuite to an AI assistant, ensure you have the following:
- NetSuite account: Administrator-level access to configure features, integrations, and roles.
- Paid AI accounts: ChatGPT Plus/Enterprise or Claude Pro/Enterprise (free tiers don't support MCP connectors).
- Integration record: You'll create and configure a NetSuite AI Connector Service-specific integration record.
- Enabled features in NetSuite:
- Server SuiteScript
- OAuth 2.0
- REST Web Services
The Model Context Protocol (MCP) is a standard that allows AI assistants to securely connect to external data sources and services. NetSuite's MCP implementation enables AI assistants to query records, run saved searches, and even create/update data in your NetSuite account.
NetSuite Configuration
Enable Features
Navigate to enable the required SuiteCloud features:
- Server SuiteScript - Required for MCP server functionality
- OAuth 2.0 - Required for secure authentication
- REST Web Services - Required for API communication
Install SuiteApp
Install the official MCP SuiteApp from the SuiteApp Marketplace:
- Go to the SuiteApp section in your NetSuite account
- Search for "MCP"
- Install "MCP Standard Tools SuiteApp"
Configure Roles
Create a dedicated role for AI connections with least-privilege access:
Clone an existing role (e.g., AP Clerk) or create a new role from scratch. Name it something like "AI Connector Role".
- MCP server connection - Set to Full
- Login using OAuth 2.0 access token - Enable this permission
Only grant view/edit permissions for the specific record types the AI should access. Follow least-privilege principles.
Assign this role to the user(s) who will authenticate the AI connection.
The Administrator role cannot be used for AI connections. You must create a dedicated role with specific permissions.
Integration & Authentication
This is a critical step before connecting ChatGPT or Claude. You'll create an integration record that enables OAuth 2.0 authentication.
Create Integration Record
| Field | Value |
|---|---|
| Name | e.g., "AI Connector - ChatGPT" |
| State | Enabled |
| Authentication | OAuth 2.0 |
| Redirect URI | Callback URL from your AI client |
After saving, NetSuite generates a Client ID and Client Secret. Store these securely - the Client Secret is only shown once.
OAuth 2.0 Authorization Code Grant Flow
The authentication flow works as follows:
The AI client redirects you to NetSuite login for consent.
NetSuite returns a code to the Redirect URI after you approve.
The AI client sends the code, Client ID, and Client Secret to the token endpoint.
Access Token (used in API calls) and Refresh Token (renews Access Token) are issued.
Endpoints
Replace <ACCOUNT_ID> with your NetSuite account ID:
- Least privilege: Only grant access to required data and actions
- Subsidiary scope: Role restrictions limit visible data to assigned subsidiaries
- Token lifecycle: Implement refresh logic; access tokens expire
- Audit regularly: Review AI connector activity in the audit logs
ChatGPT Connection
Configure Connector
Under Advanced Settings, enable Developer Mode to access custom connectors.
Click "Create Connector" and name it (e.g., "NetSuite Connector").
Enter Details
- Account ID: Find at
- MCP server URL: Use the format provided in NetSuite AI Connector documentation, inserting your Account ID
Authenticate
- Method: OAuth 2.0
- Role: Select the custom role you configured earlier
Test
Try a simple prompt to verify the connection:
Verify the results match what you see in NetSuite.
Claude Connection
Configure Connector
- Web: Select "NetSuite AI Connector" from available connectors
- Custom connector: Create a custom connector (recommended for more control)
Use the same URL format as ChatGPT, inserting your Account ID.
Complete OAuth 2.0 authentication and select your custom role.
Create separate integration records for ChatGPT and Claude. This makes it easier to revoke access independently and track usage in audit logs.
Testing & Troubleshooting
| Issue | Solution |
|---|---|
| Role not visible during authentication | Verify permissions are set correctly, role is assigned to user, and try logging out/in to NetSuite |
| Permissions errors when creating/updating | Role may be view-only; add edit permissions for the specific record types |
| Data not appearing | Role may be restricted to specific subsidiaries; check subsidiary access settings |
| Token expired errors | Refresh tokens should auto-renew; if persistent, re-authenticate |
Review AI app settings to opt out of training data usage if desired. Both ChatGPT and Claude offer enterprise plans with stricter data handling policies.
Community Tools
In addition to the official SuiteApp and connectors, the following open-source project can help developers experiment and extend capabilities:
-
OpenSuiteMCP: https://github.com/opensuitemcp/opensuitemcp
- NetSuite MCP client with OAuth 2.0 (PKCE)
- Automatic token refresh
- Error handling
- LangChain integration
Review and vet open-source code before production use. Community tools are not officially supported by Oracle/NetSuite.
References
- NetSuite AI Connector Service: Oracle Help Documentation
- OAuth 2.0 Authorization Code Grant: Oracle Help Documentation
- NetSuite MCP Server Overview: Product Page
- Model Context Protocol: Getting Started Guide