Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
NetSuite Mcp integration with custom AI Agent, Need Assistant!
Hi everyone,
I’m trying to integrate NetSuite MCP Server with my custom AI Agent, but I keep running into authentication issues. Here’s what I’ve tried so far:
- OAuth 2.0 Setup
- Created an OAuth 2.0 credential in NetSuite.
- From the terminal, I successfully requested an access token.
- However, when I used that access token in a request with
Bearer <token>, I always received a 401 Unauthorized response.
headers = {
"Authorization": f"Bearer {ACCESS_TOKEN}",
"Content-Type": "application/json"
}
response = requests.post(
f"https://{ACCOUNT_ID}.app.netsuite.com/services/mcp/v1/all",
headers=headers,
json={
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {}
},
"id": 1
0