Skip to content

Connect PortEden to Grok

Grok supports MCP through its custom connectors (xAI calls this "bring your own MCP"). This guide walks you through adding PortEden so Grok can securely access your email, calendar, drive, and task management tools, with every request passing through your PortEden access rules.

Tip

Adding PortEden uses OAuth, so there is no token to paste into Grok. When the PortEden token expires, Grok re-runs the sign-in in the background on the next tool call, so you are never interrupted.

Prerequisites

  • A PortEden account, sign up or sign in at my.porteden.com
  • At least one service connected inside PortEden (Gmail, Outlook, Google Calendar, Drive, Jira, etc.)
  • A Grok plan that includes connectors. Built-in and custom (bring-your-own-MCP) connectors are on Grok's paid tiers, so confirm what your plan includes with xAI.

Step 1: Open Grok Connectors

In Grok, open the connectors page. This is where you add the custom MCP connections Grok can use during conversations.

1

Go to the Connectors page

On the web, open grok.com/connectors. On mobile, go to Settings then Connectors.

2

Click New Connector

Select New Connector to start adding a new connection.

3

Choose Custom

Pick Custom (the bring-your-own-MCP option) so you can point Grok at the PortEden MCP server.

Step 2: Add a PortEden Connection

Give the connector a clear name (for example, Email) and paste the PortEden endpoint URL for the connection you want. For example, to add email access:

https://mcp.porteden.com/email

Save and enable the connector. Grok detects this is an MCP endpoint and opens the PortEden OAuth sign-in window. Sign in with your PortEden account and approve the connection. Grok stores the token securely, and you never paste a token into Grok yourself.

Note

Each PortEden connection is added as a separate Grok custom connector. You pick which ones you want, you don't need to add all six.

Step 3: Add More Connections

Repeat the process for each additional connection you want. Here are all six endpoint URLs:

ConnectionEndpoint URLWhat It Covers
Emailhttps://mcp.porteden.com/emailGmail and M365 email
Calendarhttps://mcp.porteden.com/calendarGoogle Calendar and Outlook Calendar
Drivehttps://mcp.porteden.com/driveGoogle Drive files and folders
Google Docshttps://mcp.porteden.com/google-docsSearch, read, and edit Docs
Google Sheetshttps://mcp.porteden.com/google-sheetsRead, write, and append to Sheets
Taskshttps://mcp.porteden.com/tasksMonday, Linear, Asana, Jira, Notion

Each connection you add triggers a separate OAuth sign-in. You only need to complete the sign-in once per connection.

Step 4: Test the Connection

Start a new conversation and try asking Grok something that uses your connected services:

Email"Show me my unread emails from today."
Calendar"What meetings do I have this week?"
Drive"Find the Q2 budget spreadsheet."
Docs"Read the planning doc and summarize it."
Sheets"Show me the first 10 rows of the sales tracker."
Tasks"Show me overdue items in the Product board."

If Grok responds with data from your connected services, the connection is working.

Building on the xAI API?

The steps above cover the Grok consumer app. If you are building your own product on Grok, the xAI API offers two paths to PortEden, both of which apply the same redaction, RBAC, and audit on every tool call:

  • Remote MCP. Point Grok's remote MCP tools at a PortEden MCP server URL, the same way the consumer app does.
  • Function-calling. Declare PortEden CLI commands as function tools. Grok calls them, your code runs the porteden binary, and redacted JSON flows back.

See the REST API reference and PortEden for Grok for the full xAI integration details.

Automatic Token Refresh

Grok handles token refresh automatically. When the PortEden access token expires, Grok re-runs the sign-in in the background on the next tool call. You won't see an "Authentication failed" message, the next request just works.

If you revoke the token at my.porteden.com, Grok will prompt you to re-authorize on the next tool call.

Managing Permissions

The access token that Grok receives through OAuth inherits the permissions you've configured at my.porteden.com. You can:

  • Restrict Grok to read-only access (no sending, no deleting)
  • Limit access to specific providers or accounts
  • Block contacts or domains from AI access
  • Set time windows (e.g., only see emails from the last 7 days)
  • Revoke the token at any time, takes effect immediately

See Permissions and Access Rules for full details.

Troubleshooting

Grok doesn't see the PortEden tools

Make sure the connector was added successfully on the Grok connectors page. Check that the endpoint URL is correct (e.g., https://mcp.porteden.com/email) and that you completed the OAuth sign-in.

"Permission denied"

The token doesn't have the required permission for the action Grok is trying to take. Go to my.porteden.com and check the token's permissions.

"Monthly quota exceeded"

Your access token has hit its monthly request limit. Check your usage at my.porteden.com or upgrade your plan for higher limits.

Connection works but then stops

If you revoked the token at my.porteden.com, Grok will prompt you to re-authorize. If the token simply expired, Grok handles the refresh automatically, just retry the request.