Skip to main content

Cyberstrike is now open source! AI-powered penetration testing for security professionals. Star on GitHub

Local MCP Servers

Local MCP servers run on your machine, providing tools and capabilities without network latency or external dependencies.

📸 SCREENSHOT: local-mcp-config.png

Local MCP server configuration

Overview

Local MCP servers offer:

  • Zero network latency
  • Full data privacy
  • Offline operation
  • Custom tool integration
  • Direct system access

Configuration

Basic Setup

~/.cyberstrike/config.json
{
"mcp": {
"servers": {
"my-tools": {
"command": "node",
"args": ["./mcp-server/index.js"]
}
}
}
}

Project-Level Configuration

cyberstrike.json
{
"mcp": {
"servers": {
"project-tools": {
"command": "python",
"args": ["-m", "project_mcp"]
}
}
}
}

Server Types

Node.js Servers

{
"mcp": {
"servers": {
"node-tools": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem"]
}
}
}
}

Python Servers

{
"mcp": {
"servers": {
"python-tools": {
"command": "python",
"args": ["-m", "mcp_server"]
}
}
}
}

Binary Executables

{
"mcp": {
"servers": {
"binary-tools": {
"command": "/usr/local/bin/mcp-scanner"
}
}
}
}

Docker Containers

{
"mcp": {
"servers": {
"docker-tools": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp-tools:latest"]
}
}
}
}

Environment Variables

Pass to Server

{
"mcp": {
"servers": {
"api-tools": {
"command": "node",
"args": ["server.js"],
"env": {
"API_KEY": "{env:MY_API_KEY}",
"DEBUG": "true"
}
}
}
}
}

Inherit Environment

{
"mcp": {
"servers": {
"tools": {
"command": "python",
"args": ["server.py"],
"inheritEnv": true
}
}
}
}

Working Directory

Set Working Directory

{
"mcp": {
"servers": {
"project-tools": {
"command": "node",
"args": ["server.js"],
"cwd": "/path/to/project"
}
}
}
}

Relative Paths

{
"mcp": {
"servers": {
"local-tools": {
"command": "./scripts/mcp-server.sh"
}
}
}
}

Filesystem Server

Access files and directories:

{
"mcp": {
"servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allow"]
}
}
}
}

SQLite Server

Query local databases:

{
"mcp": {
"servers": {
"sqlite": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sqlite", "--db", "data.db"]
}
}
}
}

Git Server

Git operations:

{
"mcp": {
"servers": {
"git": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-git"]
}
}
}
}

Server Lifecycle

Startup

Servers start when:

  • Cyberstrike launches (if configured)
  • First tool from server is used (lazy start)

Auto-Start

{
"mcp": {
"servers": {
"tools": {
"command": "node",
"args": ["server.js"],
"autoStart": true
}
}
}
}

Lazy Start

{
"mcp": {
"servers": {
"tools": {
"command": "node",
"args": ["server.js"],
"autoStart": false
}
}
}
}

Restart on Failure

{
"mcp": {
"servers": {
"tools": {
"command": "node",
"args": ["server.js"],
"restart": {
"enabled": true,
"maxRetries": 3,
"delay": 1000
}
}
}
}
}

Health Checks

Timeout Configuration

{
"mcp": {
"servers": {
"tools": {
"command": "node",
"args": ["server.js"],
"timeout": 30000
}
}
}
}

Connection Verification

> Check MCP server status

Output:

MCP Server Status:
- my-tools: connected (5 tools)
- filesystem: connected (3 tools)
- sqlite: disconnected (starting...)

Resource Limits

Memory Limits

{
"mcp": {
"servers": {
"tools": {
"command": "node",
"args": ["--max-old-space-size=512", "server.js"]
}
}
}
}

CPU Priority

{
"mcp": {
"servers": {
"tools": {
"command": "nice",
"args": ["-n", "10", "node", "server.js"]
}
}
}
}

Security Considerations

Sandboxing

{
"mcp": {
"servers": {
"untrusted": {
"command": "docker",
"args": ["run", "--rm", "-i", "--network=none", "mcp-server"]
}
}
}
}

Permission Restrictions

{
"mcp": {
"servers": {
"readonly": {
"command": "node",
"args": ["server.js"],
"permissions": {
"filesystem": "read",
"network": false
}
}
}
}
}

Debugging

Enable Logging

{
"mcp": {
"servers": {
"tools": {
"command": "node",
"args": ["server.js"],
"env": {
"DEBUG": "mcp:*"
}
}
}
}
}

View Logs

Terminal window
# Server logs location
tail -f ~/.cyberstrike/logs/mcp-my-tools.log

Manual Testing

Terminal window
# Test server directly
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node server.js

Troubleshooting

Server Not Starting

Error: Failed to start MCP server: my-tools

Check:

  • Command exists and is executable
  • Working directory is correct
  • Dependencies are installed

Connection Timeout

Error: MCP server connection timeout

Solutions:

  • Increase timeout value
  • Check server startup time
  • Verify server is responding

Tool Not Found

Error: Tool not found: my-tools/scanner

Verify:

  • Server is running
  • Tool is exported by server
  • Tool name is correct

Tip

Use lazy start for servers with slow startup times to avoid slowing down Cyberstrike launch.