Cisco Secure Access MCP Server
Enables AI agents to investigate threats, pull reports, manage security policies, and administer deployment infrastructure through the Cisco Secure Access REST API.
README
Cisco Secure Access MCP Server
A production-ready Model Context Protocol (MCP) server that wraps the Cisco Secure Access REST API. Enables AI agents to investigate threats, pull reports, manage security policies, and administer deployment infrastructure through a standardized interface.
Summary
Cisco Secure Access (formerly Cisco Umbrella / Secure Web Gateway) provides DNS-layer security, web filtering, and Zero Trust network access. This MCP server bridges that platform to AI agents, enabling:
- Threat Investigation -- Look up domains, IPs, URLs, and user activity observed by Cisco's DNS resolvers
- Security Reports -- Pull activity, threat, and destination analytics with flexible time ranges
- Policy Management -- Create/update destination lists, access rules, security profiles, and DLP policies
- Domain Blocking -- One-tool block/unblock domains with automatic list management
- VPN & Device Control -- List active VPN sessions, disconnect users, revoke device certificates
- Infrastructure Admin -- Manage sites, networks, connectors, tunnel groups, and identity endpoints
The server implements the Streamable HTTP transport per the MCP specification, runs as a single Python process, and handles OAuth 2.0 token management automatically.
Time Format (IMPORTANT)
Cisco Secure Access API uses Unix epoch timestamps in milliseconds. This server converts automatically.
All time-accepting tools support three input formats:
| Format | Example | Converted to |
|---|---|---|
| ISO 8601 | 2025-01-15T08:30:00Z |
1736928600000 |
| Relative | 24h, 7d, 30m, 900s |
epoch ms from now |
| Keyword | now |
current epoch ms |
| Epoch ms | 1735689600000 |
passed through |
Architecture
+-------------+ JSON-RPC 2.0 +------------------+ OAuth2 + REST +--------------------+
| MCP Client | <----------------> | MCP Server | <----------------> | Cisco Secure Access|
| (AI Agent) | Streamable HTTP | FastAPI + | api.sse.cisco.com| API |
| | POST /mcp | Tool Handlers | | |
+-------------+ +------------------+ +--------------------+
|
+------------+
| Token Cache|
| per session|
+------------+
Quick Start
Option 1: Docker Compose (Recommended)
cd cisco-secure-access-mcp
# Configure credentials
cp .env.example .env
# Edit .env with your Cisco API key and secret
# Build and run
docker compose up --build -d
# Check health
curl http://localhost:3000/health
Option 2: Direct Docker
docker build -t cisco-mcp-server .
docker run -d --name cisco-mcp \
-p 3000:3000 \
-e CISCO_API_KEY=your_key_here \
-e CISCO_API_SECRET=your_secret_here \
cisco-mcp-server
Option 3: Native Python
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export CISCO_API_KEY=your_key_here
export CISCO_API_SECRET=your_secret_here
python server.py
Configuration
| Variable | Required | Description | Default |
|---|---|---|---|
CISCO_API_KEY |
Yes | OAuth client ID from Cisco portal | -- |
CISCO_API_SECRET |
Yes | OAuth client secret | -- |
CISCO_ORG_ID |
No | Child org ID for multi-org setups | Parent org |
MCP_SERVER_PORT |
No | Listen port | 3000 |
MCP_SERVER_HOST |
No | Bind address | 0.0.0.0 |
LOG_LEVEL |
No | DEBUG, INFO, WARNING, ERROR | INFO |
Get credentials from the Cisco Secure Access portal: Admin > API Keys > Create New Key.
Available Tools (18)
Investigation & Forensics
| Tool | Description |
|---|---|
investigate_domain |
DNS query history, IPs, threats for a domain |
investigate_ip |
Domains, threats, geo-location for an IP address |
investigate_url |
Categorization, threat status for a specific URL |
investigate_user_activity |
Complete user history: DNS, web, blocks, threats |
Reports & Analytics
| Tool | Description |
|---|---|
get_activity_report |
DNS queries, web requests, connection data |
get_top_threats |
Most frequent threat categories and sources |
get_top_destinations |
Most visited domains, IPs, and URLs |
get_top_identities |
Most active users by request volume |
get_top_ips |
Most contacted external IP addresses |
get_summary_report |
Aggregate traffic volume and threat counts |
get_threat_types |
Breakdown: malware, phishing, C2, etc. |
get_report |
Generic handler: app_discovery, metering, api_usage, dlp_events |
Domain Blocking
| Tool | Description |
|---|---|
add_domain_to_block_list |
Block a domain (creates list if needed) |
remove_domain_from_block_list |
Unblock a domain from a list |
VPN & Device Management
| Tool | Description |
|---|---|
list_vpn_connections |
Current VPN user sessions |
disconnect_vpn_user |
Terminate a specific VPN session |
revoke_device_certificates |
Revoke device access certificates |
Generic Resource Management
| Tool | Description |
|---|---|
manage_resource |
CRUD for all Admin/Policies/Deployments resources |
manage_resource accepts:
domain:admin,policies,deploymentsresource: resource slug (see lists below)operation:list,create,update,deleteresource_id: required for update/deleteresource_params: attributes dict for create/updateparams: query parameters for list operations
Available resources per domain:
admin: api_keys, user_devices, vpn_connections, integrations, alert_rules, tenants, threat_intel_feeds, tenant_controls, s3_bucket_key
policies: destination_lists, application_lists, access_rules, network_objects, security_feeds, security_profiles, content_categories, application_categories, ips_profiles, dlp_rules, do_not_decrypt, private_resources
deployments: tunnel_groups, tunnel_regions, connector_groups, connectors, roaming_computers, swg_device_settings, internal_domains, sites, networks, internal_networks, network_devices, dns_forwarders, identity_endpoints, virtual_appliances
Usage Examples
Investigate a suspicious domain
{"tool": "investigate_domain", "arguments": {"domain": "suspicious-site.com", "limit": 20}}
Get threat report for last 7 days
{"tool": "get_top_threats", "arguments": {"start_time": "7d", "end_time": "now", "limit": 50}}
List all deployment sites
{"tool": "manage_resource", "arguments": {"domain": "deployments", "resource": "sites", "operation": "list"}}
Block a malware domain
{"tool": "add_domain_to_block_list", "arguments": {"domain": "malware.example.com"}}
Create a new site definition
{
"tool": "manage_resource",
"arguments": {
"domain": "deployments",
"resource": "sites",
"operation": "create",
"resource_params": {"name": "office-1", "ipAddresses": ["10.0.0.0/24"]}
}
}
Disconnect a compromised user VPN
{"tool": "disconnect_vpn_user", "arguments": {"user_id": "compromised-user"}}
Update a destination list
{
"tool": "manage_resource",
"arguments": {
"domain": "policies",
"resource": "destination_lists",
"operation": "update",
"resource_id": "list-abc123",
"resource_params": {"name": "blocked-sites", "entries": ["bad.com"]}
}
}
Error Handling
- 429 Rate Limited: Automatic exponential backoff retry (up to 3 attempts)
- 5xx Server Errors: Automatic retry with backoff (up to 3 attempts)
- 401/403 Auth Errors: Returned immediately with clear diagnostic message
- Token Expiry: Automatic refresh 5 minutes before TTL expires
- Connection Pooling: httpx client with 20 max connections, 10 keepalive
Best Practices
Security
- Never hardcode credentials. Always use
.envfiles or environment injection via Docker secrets, Kubernetes secrets, or cloud secret managers. - Rotate API keys regularly. Use
manage_resourcewith domain=admin, resource=api_keysto create/delete keys. - Use scoped API keys. Request only the permissions your use case needs.
- Run as non-root. The Docker image uses a dedicated
appuseraccount. - Restrict network access. Bind to
127.0.0.1if the MCP client runs locally, or use a VPN/firewall for remote access.
Deployment
- Use health checks. The
/healthendpoint enables container orchestration liveness checks. - Set resource limits. In docker-compose, add
deploy.resources.limitsfor CPU/memory. - Enable structured logging. Set
LOG_LEVEL=DEBUGfor troubleshooting,INFOfor production. - Monitor token usage. API key creation tracks scopes and usage patterns via
get_reportwithreport_type=api_usage.
Operational
- Prefer
manage_resourcefor CRUD. Covers 50+ endpoints with a single tool. Use dedicated tools only when convenience matters (e.g.,add_domain_to_block_list). - Use relative time offsets.
24h,7d,30mare simpler than ISO 8601 for most queries. - Paginate large result sets. Use
limitandoffsetparameters for list operations. - Handle rate limits gracefully. The server retries automatically, but design your workflow to space out high-volume queries.
- Backup destination lists. Before modifying block lists,
listthe current entries first.
Multi-Org Support
For organizations with child orgs, set CISCO_ORG_ID to the child organization's ID. The server adds the X-Umbrella-OrgId header automatically to all API requests.
Testing
pip install pytest pytest-asyncio
pytest test_server.py -v
Covers: epoch time conversion, tool registration, endpoint mapping, API retry logic, token caching, transport layer, and all 18 tool handlers.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。