xsiam-mcp

xsiam-mcp

Exposes the entire Palo Alto Cortex XSIAM REST API (129 operations across 26 categories) as MCP tools, plus composite tools like xql_query for AI agents to search and investigate security data.

Category
访问服务器

README

xsiam-mcp

A Model Context Protocol server for the Palo Alto Cortex XSIAM REST API.

It exposes the entire XSIAM REST API (129 operations across 26 categories — Incidents, Alerts, Endpoints, Response Actions, XQL, Scripts, IOCs/BIOCs, Assets, Datasets, Dashboards, Playbooks, Correlation Rules, and more) as MCP tools, auto-generated from the official OpenAPI spec so coverage stays complete and accurate. On top of that it adds a few composite tools designed for how AI agents actually work.

  • No Docker. Pure Python, launched over stdio by your MCP client.
  • Full coverage. One tool per API operation, with resolved JSON Schemas and a ready-to-use request example baked into every tool description.
  • Agent-friendly. xsiam_health to sanity-check auth, xsiam_list_operations to discover tools by category, and xql_query that runs an XQL query and polls to completion in a single call.

Install

Using uv (recommended — zero global install):

git clone <this-repo> xsiam-mcp && cd xsiam-mcp
uv venv && uv pip install -e .

Or with pip:

pip install -e .

Verify the tool catalog was generated (no credentials needed):

uv run xsiam-mcp --count      # e.g. "129 generated XSIAM tools (+3 composite)."
uv run xsiam-mcp --list       # print all tools grouped by category

Configuration

All configuration is via environment variables.

Variable Required Description
XSIAM_API_KEY The API key secret.
XSIAM_API_KEY_ID The numeric key ID (sent as x-xdr-auth-id).
XSIAM_FQDN ✅* Tenant FQDN, e.g. myco.xdr.us.paloaltonetworks.com. Base URL becomes https://api-<fqdn>.
XSIAM_BASE_URL ✅* Full API gateway URL; overrides XSIAM_FQDN.
XSIAM_AUTH_TYPE standard (default) or advanced.
XSIAM_TOOLSETS Comma-separated tag names to expose (default: all). e.g. Incidents,XQL query,Response Action.
XSIAM_TIMEOUT Per-request timeout in seconds (default 60).
XSIAM_VERIFY_TLS false to disable TLS verification (default true).

* Provide either XSIAM_FQDN or XSIAM_BASE_URL.

Getting credentials

In the XSIAM console go to Settings → Configurations → Integrations → API Keys, click New Key, choose Standard or Advanced, assign a role, and save. Copy the API Key (secret) and its ID, and grab the FQDN from the same page.

  • Standard key → set XSIAM_AUTH_TYPE=standard (default). The key is sent directly in the Authorization header.
  • Advanced key → set XSIAM_AUTH_TYPE=advanced. The server generates a nonce + timestamp and sends Authorization as the SHA-256 of api_key + nonce + timestamp, per XSIAM's advanced auth scheme.

The API key's assigned role determines which operations succeed. A read-only key will get 403 on write operations — that's expected.

MCP client configuration

Claude Desktop / Claude Code (claude_desktop_config.json or .mcp.json)

{
  "mcpServers": {
    "xsiam": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/xsiam-mcp", "run", "xsiam-mcp"],
      "env": {
        "XSIAM_API_KEY": "your-api-key-secret",
        "XSIAM_API_KEY_ID": "42",
        "XSIAM_FQDN": "myco.xdr.us.paloaltonetworks.com",
        "XSIAM_AUTH_TYPE": "standard"
      }
    }
  }
}

To scope the toolset down (fewer tools = easier for the agent), add e.g. "XSIAM_TOOLSETS": "Incidents,Response Action,XQL query" to env.

XSIAM_TOOLSETS is a visibility filter — it controls which tools are advertised to the agent to reduce noise. It is not a security boundary: the API key's assigned role is what authorises each call server-side. Scope permissions with the key's role, not this variable.

Usage tips for agents

  1. Call xsiam_health first to confirm connectivity and auth.
  2. Use xsiam_list_operations (optionally with a tag filter like "incident" or "endpoint") to find the right tool.
  3. For data investigation, prefer xql_query — it starts the query and polls for results in one shot.
  4. Every generated tool's description contains a concrete example body. Most list/read endpoints accept {"request_data": {}} to return everything.

Development

uv pip install -e ".[dev]"
uv run pytest -q

The API surface is defined by src/xsiam_mcp/data/openapi.json. To update coverage when the XSIAM spec changes, drop in a new spec file — tools regenerate automatically, no code changes required.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选