Skip to content

Commit 2879f3e

Browse files
MCP Server, specs and documentation
1 parent 2b37cbe commit 2879f3e

61 files changed

Lines changed: 13941 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,7 @@ group :test do
5353
gem 'allure-rspec'
5454
# Manipulate Time.now in specs
5555
gem 'timecop'
56+
# stub and set expectations on HTTP requests
57+
gem 'webmock', '~> 3.18'
5658
end
5759

Gemfile.lock

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ PATH
4242
jsobfu
4343
json
4444
lru_redux
45+
mcp (= 0.13.0)
4546
metasm
4647
metasploit-concern
4748
metasploit-credential (>= 6.0.21)
@@ -223,6 +224,9 @@ GEM
223224
concurrent-ruby (1.3.5)
224225
connection_pool (2.5.4)
225226
cookiejar (0.3.4)
227+
crack (1.0.1)
228+
bigdecimal
229+
rexml
226230
crass (1.0.6)
227231
csv (3.3.2)
228232
daemons (1.4.1)
@@ -281,6 +285,7 @@ GEM
281285
gyoku (1.4.0)
282286
builder (>= 2.1.2)
283287
rexml (~> 3.0)
288+
hashdiff (1.2.1)
284289
hashery (2.1.2)
285290
hrr_rb_ssh (0.4.2)
286291
hrr_rb_ssh-ed25519 (0.4.2)
@@ -304,6 +309,9 @@ GEM
304309
jsobfu (0.4.2)
305310
rkelly-remix
306311
json (2.15.1)
312+
json-schema (6.2.0)
313+
addressable (~> 2.8)
314+
bigdecimal (>= 3.1, < 5)
307315
language_server-protocol (3.17.0.5)
308316
license_finder (5.11.1)
309317
bundler
@@ -322,6 +330,8 @@ GEM
322330
crass (~> 1.0.2)
323331
nokogiri (>= 1.12.0)
324332
lru_redux (1.1.0)
333+
mcp (0.13.0)
334+
json-schema (>= 4.1)
325335
memory_profiler (1.1.0)
326336
metasm (1.0.5)
327337
metasploit-concern (5.0.5)
@@ -649,6 +659,10 @@ GEM
649659
useragent (0.16.11)
650660
warden (1.2.9)
651661
rack (>= 2.0.9)
662+
webmock (3.26.2)
663+
addressable (>= 2.8.0)
664+
crack (>= 0.3.2)
665+
hashdiff (>= 0.4.0, < 2.0.0)
652666
webrick (1.9.1)
653667
websocket-driver (0.7.7)
654668
base64
@@ -699,6 +713,7 @@ DEPENDENCIES
699713
simplecov (= 0.18.2)
700714
test-prof
701715
timecop
716+
webmock (~> 3.18)
702717
yard
703718

704719
BUNDLED WITH

config/mcp_config.yaml.example

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Metasploit RPC API connection (MessagePack)
2+
msf_api:
3+
type: messagepack
4+
host: localhost
5+
port: 55553
6+
ssl: true
7+
endpoint: /api/
8+
user: msfuser
9+
password: CHANGEME
10+
auto_start_rpc: true # Automatically start the RPC server if not running (default: true)
11+
12+
# MCP server configuration
13+
mcp:
14+
transport: stdio # stdio (default) or http
15+
# MCP server network configuration (for HTTP transport only)
16+
host: localhost # Host to bind to (default: localhost)
17+
port: 3000 # Port to listen on (default: 3000)
18+
19+
# Rate limiting (optional - defaults shown)
20+
rate_limit:
21+
enabled: true
22+
requests_per_minute: 60
23+
# If the `burst_size` is greater than `requests_per_minute`, a user will be allowed to exceed the rate limit temporarily.
24+
# For example, with `requests_per_minute=5` and `burst_size=10`, a user could make 10 requests in a short period,
25+
# but then would be limited to 5 requests per minute thereafter.
26+
burst_size: 10
27+
28+
# Logging (optional - defaults shown)
29+
logging:
30+
enabled: false
31+
level: INFO # DEBUG, INFO, WARN, ERROR, FATAL
32+
log_file: msfmcp.log
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Metasploit RPC API connection (JSON-RPC)
2+
msf_api:
3+
type: json-rpc
4+
host: localhost
5+
port: 8081
6+
ssl: true
7+
endpoint: /api/v1/json-rpc
8+
token: YOUR_BEARER_TOKEN_HERE
9+
# auto_start_rpc is not supported for JSON-RPC (only MessagePack)
10+
11+
# MCP server configuration
12+
mcp:
13+
transport: stdio # stdio (default) or http
14+
# MCP server network configuration (for HTTP transport only)
15+
host: localhost # Host to bind to (default: localhost)
16+
port: 3000 # Port to listen on (default: 3000)
17+
18+
# Rate limiting (optional - defaults shown)
19+
rate_limit:
20+
enabled: true
21+
requests_per_minute: 60
22+
# If the `burst_size` is greater than `requests_per_minute`, a user will be allowed to exceed the rate limit temporarily.
23+
# For example, with `requests_per_minute=5` and `burst_size=10`, a user could make 10 requests in a short period,
24+
# but then would be limited to 5 requests per minute thereafter.
25+
burst_size: 10
26+
27+
# Logging (optional - defaults shown)
28+
logging:
29+
enabled: false
30+
level: INFO # DEBUG, INFO, WARN, ERROR, FATAL
31+
log_file: msfmcp.log

0 commit comments

Comments
 (0)