Give your AI agent security data tools. One JSON config, or one command.
In Claude Desktop, open Settings, then Developer, then Edit Config. The file is ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows:
{
"mcpServers": {
"contrastapi": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.contrastcyber.com/mcp/"]
}
}
}Restart Claude Desktop. Done.
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"contrastapi": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.contrastcyber.com/mcp/"]
}
}
}Run this command in your terminal:
claude mcp add --transport http contrastapi https://api.contrastcyber.com/mcp/Or add a project file named .mcp.json in your project root:
{
"mcpServers": {
"contrastapi": {
"type": "http",
"url": "https://api.contrastcyber.com/mcp/"
}
}
}VS Code has its own MCP file. Add it as .vscode/mcp.json in your workspace. Its top-level key is servers, not mcpServers:
{
"servers": {
"contrastapi": {
"type": "http",
"url": "https://api.contrastcyber.com/mcp/"
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"contrastapi": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.contrastcyber.com/mcp/"]
}
}
}Run this command in your terminal (adds ContrastAPI to OpenClaw's gateway config):
openclaw mcp set contrastapi '{"url":"https://api.contrastcyber.com/mcp/","transport":"streamable-http"}'Or edit your OpenClaw config directly and add under mcp.servers:
{
"mcp": {
"servers": {
"contrastapi": {
"url": "https://api.contrastcyber.com/mcp/",
"transport": "streamable-http"
}
}
}
}Add to opencode.json in your project root, or to ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"contrastapi": {
"type": "remote",
"url": "https://api.contrastcyber.com/mcp/"
}
}
}Use the remote HTTP transport directly. The server answers plain JSON: no SSE stream, no session id.
POST https://api.contrastcyber.com/mcp/
Content-Type: application/json
Accept: application/json, text/event-stream
{"jsonrpc":"2.0","id":1,"method":"initialize",
"params":{"protocolVersion":"2025-11-25",
"capabilities":{},
"clientInfo":{"name":"my-app","version":"1.0"}}}Each snippet connects to the same server URL. Read the key from the environment. On the free tier, leave out the line that sets the Authorization header.
OpenAI Agents SDK (Python):
import os
from agents import Agent
from agents.mcp import MCPServerStreamableHttp
server = MCPServerStreamableHttp(
name="contrastapi",
params={
"url": "https://api.contrastcyber.com/mcp/",
"headers": {"Authorization": f"Bearer {os.environ['CONTRASTAPI_API_KEY']}"},
},
)
# Use it as: async with server: agent = Agent(name="Analyst", mcp_servers=[server])LangChain (langchain-mcp-adapters):
import os
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"contrastapi": {
"transport": "http",
"url": "https://api.contrastcyber.com/mcp/",
"headers": {"Authorization": f"Bearer {os.environ['CONTRASTAPI_API_KEY']}"},
}
})
tools = await client.get_tools()Vercel AI SDK (TypeScript):
import { createMCPClient } from '@ai-sdk/mcp';
const mcpClient = await createMCPClient({
transport: {
type: 'http',
url: 'https://api.contrastcyber.com/mcp/',
headers: { Authorization: `Bearer ${process.env.CONTRASTAPI_API_KEY}` },
},
});
const tools = await mcpClient.tools();n8n: add the MCP Client Tool node to an AI Agent node. Enter the server URL in the Endpoint field, choose the HTTP Streamable transport, and choose Bearer authentication for a key.
Dify: install the ContrastAPI tool plugin from the Dify Marketplace.
Free tier (30 credits/hr) works without a key. Add a Pro key to unlock 500 credits/hr and the monitoring tools watchlist_edit and watchlist_events.
The server reads the key from Authorization: Bearer or X-API-Key.
stdio transport (Claude Desktop, Cursor, Windsurf, Cline):
pass the key via mcp-remote's --header flag; env holds the raw value:
{
"mcpServers": {
"contrastapi": {
"command": "npx",
"args": [
"-y", "mcp-remote", "https://api.contrastcyber.com/mcp/",
"--header", "Authorization: Bearer ${CONTRASTAPI_API_KEY}"
],
"env": { "CONTRASTAPI_API_KEY": "contrastapi_..." }
}
}
}HTTP transport (OpenClaw, generic HTTP clients):
add headers:
{
"mcpServers": {
"contrastapi": {
"url": "https://api.contrastcyber.com/mcp/",
"headers": { "Authorization": "Bearer contrastapi_..." }
}
}
}Claude Code: add --header to the command:
claude mcp add --transport http contrastapi https://api.contrastcyber.com/mcp/ \
--header "Authorization: Bearer $CONTRASTAPI_API_KEY"VS Code: ask for the key with an input variable, so it is not stored in the file:
{
"inputs": [
{ "type": "promptString", "id": "contrastapi-key", "description": "ContrastAPI key", "password": true }
],
"servers": {
"contrastapi": {
"type": "http",
"url": "https://api.contrastcyber.com/mcp/",
"headers": { "Authorization": "Bearer ${input:contrastapi-key}" }
}
}
}OpenCode: read the key from the environment, and set oauth to
false so a refused key is not taken for an OAuth prompt:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"contrastapi": {
"type": "remote",
"url": "https://api.contrastcyber.com/mcp/",
"oauth": false,
"headers": { "Authorization": "Bearer {env:CONTRASTAPI_API_KEY}" }
}
}
}