🫧 moco - MCP Observation and Control Operator
moco is a lightweight MCP hub/proxy that aggregates multiple MCP servers and provides built-in security controls.
Docs
- Documentation Index
- Quick Start
- Security Configuration
Features
- Expose multiple downstream MCP servers as a single MCP server (
stdio) - Connect to downstream MCP servers via
stdioorstreamable-http - Namespace tool names as
server::tool - Provide downstream tool input schemas directly via
tools/listfor structured tool calling - Apply security checks on both pre-call and post-call paths
- rule-specific detector schema (
regex/keyword/builtin/high_risk_tool) - local PII and credential detection
- detection on decoded strings (base64 / URL-encoded / JSON-escaped)
- Built-in audit logging (SQLite)
Install
Homebrew
Tap this repository, then install moco:```bash
brew tap altescy/moco https://github.com/altescy/moco
brew install altescy/moco/moco
### Cargo
Install from GitHub:```bash
cargo install --git https://github.com/altescy/moco moco
Usage
Add a downstream MCP server configuration:```bash
moco add everything -- npx -y @modelcontextprotocol/server-everything
This writes or updates `[mcp.servers.]` in `.moco/config.toml`.
Check configured MCP servers and availability:```bash
moco list
MCP Client Setup
moco currently exposes itself as a stdio MCP server, so each client should be configured to run moco serve.
Claude Code
Add moco from CLI:```bash
claude mcp add --transport stdio moco -- moco serve
Equivalent project config (`.mcp.json`):```json
{
"mcpServers": {
"moco": {
"command": "moco",
"args": ["serve"]
}
}
}
Codex (CLI / IDE)
Add moco from CLI:```bash
codex mcp add moco -- moco serve
Codex stores MCP settings in `~/.codex/config.toml` (or project-local `.codex/config.toml`).
Equivalent manual config:```toml
[mcp_servers.moco]
command = "moco"
args = ["serve"]
OpenCode
Add to opencode.json (project) or ~/.config/opencode/opencode.json (global):```json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"moco": {
"type": "local",
"command": ["moco", "serve"],
"enabled": true
}
}
}
## Configuration
Minimal recommended starting point (`.moco/config.toml`):```toml
[mcp]
default_timeout_ms = 30000
[mcp.servers.everything]
transport = "stdio"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-everything"]
[security]
mode = "enforce"
presets = ["pii-basic", "credential-standard", "prompt-injection-basic"]
preset_level = "balanced"
See docs for security configuration details.
