KnowBe4 MCP Server
Enables AI assistants to interact with KnowBe4 security awareness training data via the KnowBe4 Reporting REST API.
README
KnowBe4 MCP Server
A Model Context Protocol (MCP) server for the KnowBe4 Reporting REST API. This server enables AI assistants to interact with your KnowBe4 security awareness training platform data.
Created by Mirage Security
Features
This MCP server provides access to all KnowBe4 Reporting API endpoints:
Account
- Get account and subscription data
- Get account risk score history
Users
- List all users (with filtering by status, group)
- Get specific user details
- Get users in a specific group
- Get user risk score history
Groups
- List all groups
- Get specific group details
- Get group risk score history
Phishing
- Get phishing campaigns
- Get phishing security tests (PSTs)
- Get PST recipient results
- Get specific recipient details
Training
- Get store purchases
- Get policies
- Get training campaigns
- Get training enrollments
Prerequisites
- Node.js 18 or higher
- A KnowBe4 account with Platinum or Diamond subscription
- KnowBe4 API key (available in your Account Settings)
Installation
- Clone or download this repository
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
Configuration
Getting Your API Key
- Log in to your KnowBe4 console
- Navigate to Account Settings
- Find the API section
- Copy your API key or generate a new one if needed
Important: Keep your API key secure and do not share it publicly.
Environment Variables
The server requires the following environment variables:
KNOWBE4_API_KEY(required): Your KnowBe4 API keyKNOWBE4_REGION(optional): Your server region -us,eu,ca,uk, orde(default:us)
Determine your region based on your KnowBe4 login URL:
- US:
training.knowbe4.com→ useus - EU:
eu.knowbe4.com→ useeu - CA:
ca.knowbe4.com→ useca - UK:
uk.knowbe4.com→ useuk - DE:
de.knowbe4.com→ usede
Usage with Claude Desktop
Add this server to your Claude Desktop configuration file:
macOS
Edit: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows
Edit: %APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"knowbe4": {
"command": "node",
"args": ["/absolute/path/to/knowbe4-mcp-server/build/src/index.js"],
"env": {
"KNOWBE4_API_KEY": "your-api-key-here",
"KNOWBE4_REGION": "us"
}
}
}
}
Replace:
/absolute/path/to/knowbe4-mcp-serverwith the actual path to this projectyour-api-key-herewith your actual KnowBe4 API keyuswith your region if different
Available Tools
Once configured, Claude will have access to these tools:
Account Tools
get_account- Get account and subscription informationget_account_risk_score_history- Get historical risk scores
User Tools
get_users- List all users with optional filtersget_user- Get specific user by IDget_group_members- Get users in a groupget_user_risk_score_history- Get user risk score history
Group Tools
get_groups- List all groupsget_group- Get specific groupget_group_risk_score_history- Get group risk score history
Phishing Tools
get_phishing_campaigns- List all phishing campaignsget_phishing_campaign- Get phishing campaign detailsget_phishing_security_tests- List all PSTsget_campaign_security_tests- Get PSTs from specific campaignget_phishing_security_test- Get specific PSTget_pst_recipients- Get recipient results for PSTget_pst_recipient- Get specific recipient result
Training Tools
get_store_purchases- List store purchasesget_store_purchase- Get specific store purchaseget_policies- List policiesget_policy- Get specific policyget_training_campaigns- List training campaignsget_training_campaign- Get specific training campaignget_training_enrollments- List training enrollmentsget_training_enrollment- Get specific enrollment
Example Prompts
Once configured, you can ask Claude things like:
- "What is my organization's current risk score?"
- "Show me all active users in my account"
- "Get the results from phishing security test ID 12345"
- "List all training campaigns"
- "Show me users with the highest phish-prone percentage"
- "Get all groups and their current risk scores"
API Rate Limits
KnowBe4 API has the following limits:
- 2,000 requests per day plus the number of licensed users
- Maximum 4 requests per second
- Burst limit of 50 requests per minute
Pagination
Most list endpoints support pagination with these parameters:
page- Page number (default: 1)per_page- Results per page (default: 100, max: 500)
The server automatically handles these parameters for you.
Development
Watch Mode
Run TypeScript compiler in watch mode:
npm run watch
Testing
The project includes comprehensive integration tests using Node.js built-in test runner.
Run all tests:
KNOWBE4_API_KEY=your-key npm test
Run tests in watch mode:
KNOWBE4_API_KEY=your-key npm run test:watch
Test Coverage:
- 30 integration tests across 5 endpoint categories
- Account endpoints (3 tests)
- User endpoints (5 tests)
- Group endpoints (5 tests)
- Phishing endpoints (8 tests)
- Training endpoints (9 tests)
Tests make real API calls and validate response structure and data. See tests/README.md for detailed testing documentation.
Security Notes
- Never commit your API key to version control
- Store your API key securely
- Use environment variables for configuration
- KnowBe4 API keys provide access to sensitive security training data
- Anonymous accounts cannot retrieve anonymized data
Troubleshooting
"KNOWBE4_API_KEY environment variable is required"
Make sure you've set the KNOWBE4_API_KEY in your Claude Desktop config.
"401 Unauthorized"
Your API key is incorrect or expired. Generate a new one in KnowBe4 Account Settings.
"404 Not Found"
Check that you're using the correct region for your account.
"429 Too Many Requests"
You've exceeded the rate limit. Wait before making more requests.
About
This MCP server was created by Mirage Security to enable seamless integration between AI assistants and the KnowBe4 security awareness training platform.
License
MIT
Resources
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。