Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AIPentest CyberStrikeAI External MCP Connectivity Validation

From Leeroopedia
Knowledge Sources
Domains MCP, Tool_Federation
Last Updated 2026-10-19 04:10 GMT

Overview

Concrete external tool for validating external MCP server connectivity provided by the cmd/test-external-mcp harness.

Description

cmd/test-external-mcp is a standalone Go binary that loads a config file path (CLI arg), creates an ExternalMCPManager, loads the configured external MCP servers, starts each enabled client, lists tools (5s timeout), prints tool names/descriptions, stops clients, and prints final stats (total/enabled/disabled/connected). A companion cmd/test-sse-mcp-server is a test SSE MCP server for validating the SSE transport. This is an External Tool Doc: it documents a CLI, not a library API.

Usage

  • External MCP federation step 1 (connectivity validation): run before registering a new external server to confirm it connects and exposes the expected tools.

Code Reference

Source Location

  • Repository: CyberStrikeAI
  • File: cmd/test-external-mcp/main.go (main L14-130, getTransport L132-138); cmd/test-sse-mcp-server/main.go (L1-395)

Signature

# Usage
./test-external-mcp <config.yaml>

# Actions:
#   config.Load(configPath)
#   mcp.NewExternalMCPManager(log.Logger)
#   manager.LoadConfigs(&cfg.ExternalMCP)
#   for each enabled server:
#       manager.StartClient(name) -> connected/disconnected
#       manager.GetAllTools(ctx, 5s) -> tool count + first 5 names/descriptions
#   manager.StopClient(name)
#   manager.GetStats() -> {total, enabled, disabled, connected}

Import / Build

go build ./cmd/test-external-mcp
go build ./cmd/test-sse-mcp-server

I/O Contract

Inputs

Name Type Required Description
configPath string (CLI arg) Yes Path to config.yaml
cfg.ExternalMCP.Servers map Yes External MCP server configs

Outputs

Name Type Description
stdout text Per-server connect/tool-list/stop + final stats

Usage Examples

Validate an External MCP Server

# Add server to config.yaml:
# external_mcp:
#   servers:
#     my-server:
#       command: ["node", "server.js"]
#       external_mcp_enable: true

./test-external-mcp config.yaml
# Output:
# [my-server] connected, 8 tools found:
#   1. nmap_scan - Scan targets with nmap
#   2. ...
# Stats: total=1, enabled=1, disabled=0, connected=1

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment