Gatana Documentation

Examples

See these reference configurations to get more familiar with how to use Gatana

Google workspace-mcp

The workspace-mcp is a powerful MCP server which has a somewhat complex configuration requirement. It is fully supported in Gatana, and below is a step-by-step guide on how to configure it for full access to Gmail.

Guide was made for workspace-mcp v1.5.4

This version was made targeting workspace-mcp v1.5.4. Newer version might require different settings.

First, we need to configure an OAuth client.

  1. Navigate to https://console.cloud.google.com/auth/clients
  2. Create a new client of type Web Application with redirect uri https://gatana.ai/api/v1/mcp-servers/oauth/callback
  3. Remember the client ID and secret (Google will only show you the secret once)
  4. Grant the scopes https://mail.google.com/ openid .../auth/userinfo.email .../auth/userinfo.profile

Now, we are ready to create our server in Gatana.

  1. Go to Gatana App, navigate to Servers
  2. In the top-right corner, click Add Server
  3. Enter a name, e.g. Google Mail and select Transport Type: Local, and save the server
  4. After server creation, you will be redirected to the settings page of the server
  5. Configure:
    • Command: uvx workspace-mcp --transport streamable-http --tools gmail
    • Transport: Streaming HTTP
    • Listening Port: 8080
  6. Provide the environment variables:
    • MCP_ENABLE_OAUTH21 = true
    • EXTERNAL_OAUTH21_PROVIDER = true
    • WORKSPACE_MCP_STATELESS_MODE = true
    • MCP_REMOVE_USER_GOOGLE_EMAIL_ARG = true
    • WORKSPACE_MCP_PORT = 8080
    • GOOGLE_OAUTH_CLIENT_ID = Your Client ID we created above
    • GOOGLE_OAUTH_CLIENT_SECRET = Some non-empty string, e.g. "HELLO123" (its precense needed by workspace-mcp, but the value is never checked)
  7. Under Authorization, set
    • Credentials Scope: Server
    • Method: OAuth.
  8. Under OAuth Issuer enter Issuer: https://accounts.google.com, then click on Discover. This will automatically fill out the issuer configuration.
  9. Set Extra Parameters for Authorization Endpoint: consent=prompt&access_type=offline. This a proprietary requirement from the Google OAuth implementation for getting an access token which is long-lived
  10. Under OAuth Client, fill out the Client ID and Secret from the one you created above.
  11. Set
    • Scopes: https://mail.google.com/ openid https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile
    • Client Authentication Method: POST Body Parameters (Google does not support Basic Authentication)
    • Grant: Authorization Code

User-scoped credentials (multi-user)

If you want each Gatana user to have their own set of credentials for this server, go into Settings and set the Credentials Scope to User

Now, you can save the server. You will be redirected to the detail pages of the server. There is one final step left: providing the server-scoped credentials.

  1. In the top-right corner, click on Credentials
  2. Click on Authorize Server
  3. This will redirect you to Google to authorize this MCP Server

Complete the Google authorization flow, and finally, the server is ready. In the Tools section, click on Refresh to retrieve the available tools.

You can test the connectivity by clicking on the magnify button for a tool. An example is list_gmail_labels which does not require any arguments. It should return something similar:

{
  "result": {
    "content": [
      {
        "type": "text",
        "text": "Found 14 labels:\n\n📂 SYSTEM LABELS:\n  • CHAT (ID: CHAT)\n  • SENT (ID: SENT)\n  • INBOX (ID: INBOX)\n  • IMPORTANT (ID: IMPORTANT)\n  • TRASH (ID: TRASH)\n  • DRAFT (ID: DRAFT)\n  • SPAM (ID: SPAM)\n  • CATEGORY_FORUMS (ID: CATEGORY_FORUMS)\n  • CATEGORY_UPDATES (ID: CATEGORY_UPDATES)\n  • CATEGORY_PERSONAL (ID: CATEGORY_PERSONAL)\n  • CATEGORY_PROMOTIONS (ID: CATEGORY_PROMOTIONS)\n  • CATEGORY_SOCIAL (ID: CATEGORY_SOCIAL)\n  • STARRED (ID: STARRED)\n  • UNREAD (ID: UNREAD)\n"
      }
    ],
    "structuredContent": {
      "result": "Found 14 labels:\n\n📂 SYSTEM LABELS:\n  • CHAT (ID: CHAT)\n  • SENT (ID: SENT)\n  • INBOX (ID: INBOX)\n  • IMPORTANT (ID: IMPORTANT)\n  • TRASH (ID: TRASH)\n  • DRAFT (ID: DRAFT)\n  • SPAM (ID: SPAM)\n  • CATEGORY_FORUMS (ID: CATEGORY_FORUMS)\n  • CATEGORY_UPDATES (ID: CATEGORY_UPDATES)\n  • CATEGORY_PERSONAL (ID: CATEGORY_PERSONAL)\n  • CATEGORY_PROMOTIONS (ID: CATEGORY_PROMOTIONS)\n  • CATEGORY_SOCIAL (ID: CATEGORY_SOCIAL)\n  • STARRED (ID: STARRED)\n  • UNREAD (ID: UNREAD)\n"
    },
    "isError": false
  }
}