MCP Server Authentication Methods | Vendia

MCP Server Authentication Methods

Vendia MCP Gateway supports multiple authentication methods to accommodate different types of AI applications and integration tools. Choose the method that best fits your use case and technical requirements.

Authentication Method Comparison

Method OAuth Flow Service Credentials Programmatic Token Exchange
Setup Complexity Simple Simple Moderate
User Interaction Required Not required Not required
Best For Interactive AI apps No-code tools Custom applications
Token Management Automatic Automatic Manual
Security Level Highest Medium High
Credential Storage Secure token storage Headers (tool-dependent) Application managed

Authentication Methods

OAuth Flow (Recommended for Interactive Applications)

The standard authentication method for AI applications like Claude and other interactive tools. This method is recommended for applications where users can complete an interactive login flow.

How it works:

  1. Your AI application initiates authentication with Vendia MCP Gateway
  2. You’re redirected to authenticate in your browser
  3. After successful login, your application receives an access token
  4. The application uses this token for subsequent MCP requests

Best for:

Setup: See the Getting Started Guide for detailed OAuth configuration instructions.

Service Credentials via Headers (For No-Code Tools)

A simplified authentication method designed for no-code and low-code integration tools that cannot perform OAuth flows or programmatic token exchange. Pass your API credentials directly in request headers, and the MCP server handles token exchange automatically.

How it works:

  1. Create API credentials in Vendia (client ID and client secret)
  2. Configure your no-code tool to send credentials in custom headers
  3. The MCP server exchanges credentials for a JWT token automatically
  4. Your requests proceed with proper authentication

Best for:

When NOT to use:

Step 1: Create API Credentials

  1. Follow the API Authentication guide to create API credentials for your project
  2. Save your client_id and client_secret securely
  3. Note the permissions associated with your credentials (based on the assigned role). For MCP access, your credentials must include the DATA_READ permission for the specific project and workspace that your MCP server is attached to.

Step 2: Configure Request Headers

Configure your no-code tool or application to include the following custom headers with each MCP request:

X-Vendia-Client-Id: your-client-id-here

X-Vendia-Client-Secret: your-client-secret-here

Configuration Examples:

Most no-code and low-code platforms support adding custom headers to HTTP requests. The exact steps vary by platform, but generally you’ll look for settings such as:

Example: OpenAI Agent Builder

When configuring a custom action or connector in OpenAI Agent Builder:

  1. In the Headers section, add two custom headers:
Other Platforms

For other no-code/low-code platforms (e.g., Zapier, Make, n8n), add the same two headers (X-Vendia-Client-Id and X-Vendia-Client-Secret) using your platform’s header configuration interface. Consult your platform’s documentation for specific instructions on adding custom headers to HTTP requests.

Custom Applications:

If you’re building a custom integration, include the headers in your HTTP requests:

// Example using fetch API

const response = await fetch("YOUR_MCP_SERVER_URL", {
    
    method: "POST",
    
    headers: {
        "Content-Type": "application/json",
        
        "X-Vendia-Client-Id": "your-client-id-here",
        
        "X-Vendia-Client-Secret": "your-client-secret-here",
    },
    
    body: JSON.stringify({
        // Your MCP request payload
    }),
});
# Example using Python requests

import requests

response = requests.post(
    
    'YOUR_MCP_SERVER_URL',
    
    headers={
        'Content-Type': 'application/json',
        
        'X-Vendia-Client-Id': 'your-client-id-here',
        
        'X-Vendia-Client-Secret': 'your-client-secret-here'
    },
    
    json={
        # Your MCP request payload
    }
)

Step 3: Verify Authentication

Test your configuration by making a simple MCP request:

  1. Use your no-code tool to send a basic request to the MCP server
  2. Verify you receive a successful response
  3. Check that you can access expected data based on your credential permissions

Common Test Operations:

If authentication fails, verify:

Programmatic Token Exchange (For Custom Applications)

For building custom AI applications that need full control over authentication, you can implement the OAuth2 client credentials flow directly in your code.

How it works:

  1. Create API credentials in Vendia
  2. Your application exchanges credentials for a JWT access token
  3. Use the token in the Authorization: Bearer <token> header
  4. Implement token refresh logic when tokens expire

Best for:

Setup: See Advanced Connection Methods - Programmatic Access for detailed implementation.

Security Best Practices

Follow these best practices to keep your Vendia credentials and data secure:

Troubleshooting Authentication Issues

OAuth Flow Issues

Problem: Authentication redirect doesn’t work

Solutions:

Problem: Token expires frequently

Solutions:

Service Credentials Issues

Problem: Authentication fails with 401 Unauthorized

Solutions:

Problem: Headers not being sent

Solutions:

Problem: Credentials work in testing but fail in production

Solutions:

Programmatic Token Exchange Issues

Problem: Token exchange fails

Solutions:

Problem: Token refresh logic not working

Solutions:

General Authentication Issues

Problem: Intermittent authentication failures

Solutions:

Problem: Permission denied after successful authentication

Solutions:

Need Help?

If you encounter authentication issues or have questions:

Free Tier Support

Pro Tier Support

Enterprise Tier Support

The Vendia team is here to help you securely connect your AI applications to your data!