API Keys & Security Best Practices

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://apidocs.lwolf.com/doc/spacio-api/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Spacio API MCP server": {
    "url": "https://apidocs.lwolf.com/doc/spacio-api/mcp"
  }
}

Close

API Keys & Security

Protecting Your API Key

  1. Never expose in client-side code - Keep keys on your backend server
  2. Use environment variables - Store keys in .env files, never in source code
  3. Rotate regularly - Request new keys periodically from Spacio
  4. Use separate keys - Maintain different keys for dev, staging, and production
  5. Monitor usage - Track API usage to detect unauthorized access

Implementation Example

import os
from dotenv import load_dotenv

load_dotenv()
api_key = os.getenv('SPACIO_API_KEY')

# Use api_key in headers
headers = {'apikey': api_key}

IP Whitelisting

Contact support to enable IP whitelisting for additional security.

Rate Limiting

Your account has a 12,000 request/hour limit by default. Implement exponential backoff for retry logic.

Error Handling

Always check for 401 (Unauthorized) responses indicating compromised keys.