This MCP Server for Cortex serves as a bridge that exposes Cortex's powerful analysis capabilities to Model Context Protocol (MCP) clients, such as Claude. It enables language models to leverage Cortex analyzers for various threat intelligence tasks including IP analysis, URL scanning, and more.
Navigate to the GitHub Releases page
Download the appropriate binary for your operating system:
mcp-server-cortex-linux-amd64
mcp-server-cortex-macos-amd64
mcp-server-cortex-windows-amd64.exe
Prepare the binary:
/usr/local/bin
on Linux/macOS)chmod +x /path/to/your/mcp-server-cortex
PATH
if neededClone the repository:
git clone https://github.com/gbrigandi/mcp-server-cortex.git
cd mcp-server-cortex
Build the project:
cargo build
cargo build --release
Configure the server using these environment variables:
CORTEX_ENDPOINT
: The full URL to your Cortex API (e.g., http://localhost:9000/api
)CORTEX_API_KEY
: Your API key for authenticating with CortexRUST_LOG
(Optional): Controls logging level (e.g., info
or mcp_server_cortex=debug,cortex_client=info
)The following analyzers must be enabled and configured in your Cortex instance:
analyze_ip_with_abuseipdb
tool (requires AbuseIPDB API key)analyze_with_abusefinder
toolscan_url_with_virustotal
tool (requires VirusTotal API key)Ensure you enable these analyzers in your Cortex instance's "Organization" → "Analyzers" section and configure them with the necessary API keys.
For MCP clients like Claude Desktop:
claude_desktop_config.json
:{
"mcpServers": {
"cortex": {
"command": "/opt/mcp-servers/mcp-server-cortex",
"args": [],
"env": {
"CORTEX_ENDPOINT": "http://your-cortex-instance:9000/api",
"CORTEX_API_KEY": "your_cortex_api_key_here"
}
}
}
}
Analyzes an IP address using AbuseIPDB via Cortex.
Parameters:
ip
(string, required): The IP address to analyzeanalyzer_name
(string, optional): The specific analyzer instance. Defaults to AbuseIPDB_1_0
Analyzes various types of data using AbuseFinder via Cortex.
Parameters:
data
(string, required): The data to analyze (e.g., "1.1.1.1", "example.com")data_type
(string, required): The type of data. Must be one of: ip
, domain
, fqdn
, url
, mail
analyzer_name
(string, optional): The specific analyzer instance. Defaults to Abuse_Finder_3_0
Scans a URL using VirusTotal via Cortex.
Parameters:
url
(string, required): The URL to scananalyzer_name
(string, optional): The specific analyzer instance. Defaults to VirusTotal_Scan_3_1
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "cortex" '{"command":"/opt/mcp-servers/mcp-server-cortex","args":[],"env":{"CORTEX_ENDPOINT":"http://your-cortex-instance:9000/api","CORTEX_API_KEY":"your_cortex_api_key_here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cortex": {
"command": "/opt/mcp-servers/mcp-server-cortex",
"args": [],
"env": {
"CORTEX_ENDPOINT": "http://your-cortex-instance:9000/api",
"CORTEX_API_KEY": "your_cortex_api_key_here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"cortex": {
"command": "/opt/mcp-servers/mcp-server-cortex",
"args": [],
"env": {
"CORTEX_ENDPOINT": "http://your-cortex-instance:9000/api",
"CORTEX_API_KEY": "your_cortex_api_key_here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect