@attackforge/mcp-server 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -0
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# AttackForge MCP Server
|
|
2
|
+
|
|
3
|
+
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.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### From npm
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g @attackforge/mcp-server
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### From source
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git clone https://github.com/AttackForge/af-mcp-server.git
|
|
17
|
+
cd af-mcp-server
|
|
18
|
+
npm install
|
|
19
|
+
npm run build
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Configuration
|
|
23
|
+
|
|
24
|
+
The server requires the following environment variables:
|
|
25
|
+
|
|
26
|
+
| Variable | Required | Description |
|
|
27
|
+
|----------|----------|-------------|
|
|
28
|
+
| `AF_HOSTNAME` | Yes | Your AttackForge server hostname (e.g., `your-instance.attackforge.com`) |
|
|
29
|
+
| `AF_USER_KEY` | Yes | Your AttackForge API user key for authentication |
|
|
30
|
+
| `AF_PORT` | No | Custom port if your AttackForge server uses a non-standard HTTPS port |
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
### Claude Desktop
|
|
35
|
+
|
|
36
|
+
Add to your Claude Desktop configuration file:
|
|
37
|
+
|
|
38
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
39
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"attackforge": {
|
|
45
|
+
"command": "af-mcp-server",
|
|
46
|
+
"env": {
|
|
47
|
+
"AF_HOSTNAME": "your-instance.attackforge.com",
|
|
48
|
+
"AF_USER_KEY": "your-api-key"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Claude Code
|
|
56
|
+
|
|
57
|
+
Add to your Claude Code settings:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"mcpServers": {
|
|
62
|
+
"attackforge": {
|
|
63
|
+
"command": "af-mcp-server",
|
|
64
|
+
"env": {
|
|
65
|
+
"AF_HOSTNAME": "your-instance.attackforge.com",
|
|
66
|
+
"AF_USER_KEY": "your-api-key"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Running directly
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
AF_HOSTNAME=your-instance.attackforge.com AF_USER_KEY=your-api-key af-mcp-server
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## How It Works
|
|
80
|
+
|
|
81
|
+
This MCP server implements the [Model Context Protocol](https://modelcontextprotocol.io/) and proxies requests to your AttackForge instance:
|
|
82
|
+
|
|
83
|
+
1. Claude connects to the server via stdio transport
|
|
84
|
+
2. When Claude lists available tools, the server fetches them from `https://{AF_HOSTNAME}/mcp/tools/list`
|
|
85
|
+
3. When Claude calls a tool, the server forwards the request to `https://{AF_HOSTNAME}/mcp/tools/call`
|
|
86
|
+
4. All requests are authenticated using the `x-user-key` header
|
|
87
|
+
|
|
88
|
+
The tools available to Claude are determined by your AttackForge instance configuration.
|
|
89
|
+
|
|
90
|
+
## Development
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Install dependencies
|
|
94
|
+
npm install
|
|
95
|
+
|
|
96
|
+
# Build
|
|
97
|
+
npm run build
|
|
98
|
+
|
|
99
|
+
# Clean build artifacts
|
|
100
|
+
npm run clean
|
|
101
|
+
|
|
102
|
+
# Clean and rebuild
|
|
103
|
+
npm run rebuild
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Requirements
|
|
107
|
+
|
|
108
|
+
- Node.js 22 or later
|
|
109
|
+
- An AttackForge instance with MCP support enabled
|
|
110
|
+
- A valid AttackForge API user key
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|