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
{ "mcp": { "servers": { "my-tools": { "command": "node", "args": ["./mcp-server/index.js"] } } }}Project-Level Configuration
{ "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" } } }}Popular Local Servers
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 statusOutput:
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
# Server logs locationtail -f ~/.cyberstrike/logs/mcp-my-tools.logManual Testing
# Test server directlyecho '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node server.jsTroubleshooting
Server Not Starting
Error: Failed to start MCP server: my-toolsCheck:
- Command exists and is executable
- Working directory is correct
- Dependencies are installed
Connection Timeout
Error: MCP server connection timeoutSolutions:
- Increase timeout value
- Check server startup time
- Verify server is responding
Tool Not Found
Error: Tool not found: my-tools/scannerVerify:
- 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.
Related Documentation
- MCP Overview - MCP basics
- Remote Servers - Remote MCP
- Creating Servers - Build custom servers