MCP Hub
Back to servers

Cortex XSIAM SDK

A specialized MCP server for security automation developers that provides semantic search over the Demisto content library and full lifecycle management for Cortex XSIAM/XSOAR content packs.

Stars
1
Tools
28
Updated
Dec 20, 2025

Cortex XSIAM SDK MCP Tools

CI CodeQL License Lifecycle: Alpha Python

MCP server that helps LLM coding assistants develop Cortex XSIAM/XSOAR content by providing:

  • Pattern search: Find relevant playbooks, scripts, integrations, and XQL rules from the official demisto/content library using natural language
  • SDK operations: Scaffold, format, validate, and lint content using demisto-sdk
  • Remote operations: List, download, and upload content to your XSIAM/XSOAR tenant

Stability & Support

  • Alpha: interfaces may change between releases
  • Remote write tools are production-impacting: upload_content, run_command, run_playbook
  • Community project — not officially supported by Palo Alto Networks

Documentation

Common Tasks

TaskToolsPrompt
Find enrichment patternsfind_similar_playbooksUse find_similar_playbooks to find playbooks that enrich IP addresses from multiple threat intel sources.
Find XQL parsing examplesfind_xql_examplesUse find_xql_examples to find parsing rules that extract authentication events from Windows Security logs.
Find integration patternsfind_integration_patternsUse find_integration_patterns to find integrations that use OAuth2 with token refresh.
Find script examplesfind_similar_scriptsUse find_similar_scripts to find scripts that parse email headers and extract sender information.
Create from patternsfind_similar_playbooks, init_packUse find_similar_playbooks to find phishing playbooks, then create a pack called AcmePhishing with a similar structure.
Scaffold + validateinit_pack, format_content, validate_contentCreate a pack called Acme_ServiceNow, scaffold an integration, then run format_content and validate_content.
Pre-PR checksvalidate_content, lint_contentRun validate_content and lint_content on Packs/MyPack. Summarise errors and propose fixes.

See docs/SAMPLE_PROMPTS.md for comprehensive examples.

Installation

1. Install demisto-sdk

The demisto-sdk must be installed separately (conflicting pydantic requirements).

# Using pipx (recommended)
pipx install demisto-sdk

# Or using pip in a separate environment
python3.11 -m venv ~/.demisto-sdk-venv
~/.demisto-sdk-venv/bin/pip install demisto-sdk
export PATH="$HOME/.demisto-sdk-venv/bin:$PATH"  # Add to ~/.zshrc

2. Install the MCP Server

git clone https://github.com/ciaran-finnegan/cortex-xsiam-sdk-mcp-tools.git
cd cortex-xsiam-sdk-mcp-tools
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e .

3. Install the Pattern Index

The pattern index enables semantic search over 4,700+ playbooks, scripts, integrations, and XQL rules.

Option A: Download pre-built index (fastest)

mkdir -p ~/.xsiam-patterns
curl -L https://github.com/ciaran-finnegan/cortex-xsiam-sdk-mcp-tools/releases/latest/download/pattern-index.tar.gz \
  | tar -xz -C ~/.xsiam-patterns/

Option B: Build from source

git clone --depth 1 https://github.com/demisto/content.git ~/content
xsiam-build-index --source ~/content

4. Configure Content Path (Recommended)

When you search for patterns, the tools return metadata (name, description, pack). To also fetch the full source code (YAML, Python, XQL), set the path to your local clone of the demisto/content repository:

# Clone the official content repo (if you haven't already)
git clone https://github.com/demisto/content.git ~/Documents/Dev/content

# Add to ~/.zshrc (or ~/.bashrc) - adjust path to your clone location
export DEMISTO_SDK_CONTENT_PATH="$HOME/Documents/Dev/content"

Keep your clone updated to get the latest patterns:

cd ~/Documents/Dev/content && git pull

This enables prompts like: "Find playbooks that enrich IP addresses and show me the full YAML"

Without this variable, pattern search still works but returns metadata only.

5. Configure Credentials

See docs/CREDENTIALS.md for secure credential storage (macOS Keychain, Windows Credential Manager, GitHub Actions secrets).

6. Configure Your MCP Client

See docs/MCP_CLIENTS.md for setup instructions.

Tools

ToolDescription
Pattern Search
search_patternsSearch all content types with natural language
find_similar_playbooksFind playbooks matching a description
find_similar_scriptsFind scripts with similar functionality
find_integration_patternsFind integration patterns (REST API, OAuth2, etc.)
find_xql_examplesFind XQL parsing/modeling rule examples
find_classifier_examplesFind event classifier examples
find_mapper_examplesFind field mapper examples
get_pattern_index_statsShow index statistics
SDK Operations
init_packCreate content pack structure
init_integrationScaffold integration
init_scriptScaffold script
format_contentStandardise YAML/Python formatting
validate_contentCheck content validity
lint_contentRun code quality checks
generate_docsCreate README documentation
generate_unit_testsGenerate test scaffolds
generate_test_playbookCreate test playbook
generate_outputsGenerate context paths from JSON
find_dependenciesAnalyse pack dependencies
update_release_notesVersion management
zip_packsCreate distributable archives
openapi_codegenGenerate from OpenAPI spec
postman_codegenGenerate from Postman collection
Remote Operations
list_filesList custom content items (read-only)
download_contentDownload content from tenant
upload_contentDeploy content to tenant ⚠️
run_commandExecute command on tenant ⚠️
run_playbookRun playbook on tenant ⚠️

⚠️ = Production-impacting

Content Types Indexed

TypeSource
PlaybooksPacks/*/Playbooks/*.yml
ScriptsPacks/*/Scripts/**/*.yml
IntegrationsPacks/*/Integrations/**/*.yml
ClassifiersPacks/*/Classifiers/classifier-*.json
MappersPacks/*/Classifiers/*mapper*.json
Parsing RulesPacks/*/ParsingRules/**/*.xif
Modeling RulesPacks/*/ModelingRules/**/*.xif

Development

source .venv/bin/activate
pip install -e ".[dev]"
pre-commit install
ruff check mcp_demisto_sdk tests
mypy mcp_demisto_sdk
pytest

Related Resources

Licence

MIT - See LICENSE.


Community project, not officially supported by Palo Alto Networks.

Reviews

No reviews yet

Sign in to write a review