@attackforge/mcp-server
v0.2.6
Published
AttackForge MCP Server
Readme
AttackForge MCP Server
An MCP (Model Context Protocol) server that enables Claude AI to interact with AttackForge. This server acts as a proxy, forwarding tool requests from Claude to your AttackForge instance.
Installation
From npm
npm install -g @attackforge/mcp-serverFrom source
git clone https://github.com/AttackForge/af-mcp-server.git
cd af-mcp-server
npm install
npm run buildConfiguration
The server requires the following environment variables:
| Variable | Required | Description |
|----------|----------|-------------|
| AF_HOSTNAME | Yes | Your AttackForge server hostname (e.g., your-instance.attackforge.com) |
| AF_USER_KEY | Yes | Your AttackForge API user key for authentication |
| AF_PORT | No | Custom port if your AttackForge server uses a non-standard HTTPS port |
Usage
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"attackforge": {
"command": "af-mcp-server",
"env": {
"AF_HOSTNAME": "your-instance.attackforge.com",
"AF_USER_KEY": "your-api-key"
}
}
}
}Claude Code
Add to your Claude Code settings:
{
"mcpServers": {
"attackforge": {
"command": "af-mcp-server",
"env": {
"AF_HOSTNAME": "your-instance.attackforge.com",
"AF_USER_KEY": "your-api-key"
}
}
}
}Running directly
AF_HOSTNAME=your-instance.attackforge.com AF_USER_KEY=your-api-key af-mcp-serverHow It Works
This MCP server implements the Model Context Protocol and proxies requests to your AttackForge instance:
- Claude connects to the server via stdio transport
- When Claude lists available tools, the server fetches them from
https://{AF_HOSTNAME}/mcp/tools/list - When Claude calls a tool, the server forwards the request to
https://{AF_HOSTNAME}/mcp/tools/call - All requests are authenticated using the
x-user-keyheader
The tools available to Claude are determined by your AttackForge instance configuration.
Development
# Install dependencies
npm install
# Build
npm run build
# Clean build artifacts
npm run clean
# Clean and rebuild
npm run rebuildRequirements
- Node.js 22 or later
- An AttackForge instance with MCP support enabled
- A valid AttackForge API user key
License
MIT
