Authentication

Secure your RelayRail integration with API keys.

API Keys

RelayRail uses API keys to authenticate requests. Each agent has its own unique API key that starts with rr_.

Important: Keep your API key secret. Never commit it to version control or expose it in client-side code.

Using Your API Key

Pass your API key as an environment variable to the MCP server:

Environment Variable
RELAYRAIL_API_KEY=rr_your_api_key_here

Or in your MCP configuration:

{
  "mcpServers": {
    "relayrail": {
      "command": "npx",
      "args": ["@relayrail/server", "start"],
      "env": {
        "RELAYRAIL_API_KEY": "rr_your_api_key_here"
      }
    }
  }
}

Regenerating Keys

If your API key is compromised, you can regenerate it from your dashboard:

  1. Go to your Dashboard
  2. Select the agent
  3. Click Regenerate API Key
  4. Update your MCP configuration with the new key

Note: The old key will be immediately invalidated.

Key Format

RelayRail API keys follow this format:

rr_[32 character random string]

Example: rr_3yQIVzOFr4dvpfvPUe8DPqVuPAVEt2DD

Security Best Practices

  • 1.Use environment variables - never hardcode API keys
  • 2.Add .env files to your .gitignore
  • 3.Use different API keys for development and production
  • 4.Rotate keys periodically and after team member offboarding
  • 5.Monitor your dashboard for unusual activity