API Keys
API keys let you authenticate with the MDtoLink API from scripts, CI/CD pipelines, and MCP server integrations without an interactive login.
Creating an API key
Section titled “Creating an API key”- Go to your account settings
- Scroll to API Keys
- Click Create API Key and give it a name
- Copy the key immediately — it’s only shown once
API keys use the format mdtolink_xxxxxxxxxxxx.
Using your API key
Section titled “Using your API key”MCP server
Section titled “MCP server”Pass the key as an environment variable in your MCP client configuration:
{ "mcpServers": { "mdtolink": { "command": "mdtolink-mcp", "env": { "MDTOLINK_API_KEY": "mdtolink_xxxxxxxxxxxx" } } }}Direct API calls
Section titled “Direct API calls”Include the key in the x-api-key header:
curl -H "x-api-key: mdtolink_xxxxxxxxxxxx" \ https://api.mdtolink.com/api/documentsEnvironment variable
Section titled “Environment variable”Set it in your shell for scripts and automation:
export MDTOLINK_API_KEY=mdtolink_xxxxxxxxxxxxManaging keys
Section titled “Managing keys”From your account settings you can:
- View all active keys (only the prefix is shown after creation)
- Delete keys you no longer need
Deleting a key immediately revokes access. Any MCP server or script using that key will stop working.
Security
Section titled “Security”- Never commit API keys to version control
- Use environment variables or secret managers
- Create separate keys for different integrations so you can revoke them independently
- Keys don’t expire by default, but you can delete and recreate them at any time