How do I use Model Context Protocol (MCP) with Web API?
Learn how to connect an MCP client to Web API.
MCP is optional. Your existing requests to Web API keep working, and you can connect the MCP server whenever you want an AI agent to call Web API directly.
Connect to the Oxylabs MCP server
The remote MCP server is hosted and maintained by Oxylabs, so there is nothing to install.
In the dashboard, create a Web API instance and copy its API key.
Add your API key to the environment:
Add the server to your MCP client.
claude mcp add --transport http --scope user oxylabs-web-api \
https://mcp.oxylabs.io/web-api-mcp \
--header "Authorization: Bearer ${OXYLABS_WEB_API_KEY}"codex mcp add oxylabs-web-api \
--url https://mcp.oxylabs.io/web-api-mcp \
--bearer-token-env-var OXYLABS_WEB_API_KEYFor any client that supports remote MCP servers with custom headers, add the server URL and an Authorization header to the client's MCP configuration. For Cursor mcp.json:
{
"mcpServers": {
"oxylabs-web-api": {
"url": "https://mcp.oxylabs.io/web-api-mcp",
"headers": {
"Authorization": "Bearer ${env:OXYLABS_WEB_API_KEY}"
}
}
}
}Field names can differ between clients – check your client's documentation for how to add a remote MCP server with headers.
🧠 For configuration, self-hosting, and the full tool list, see MCP server documentation and GitHub.
Last updated
Was this helpful?