-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmcplex.toml
More file actions
176 lines (150 loc) · 7.73 KB
/
Copy pathmcplex.toml
File metadata and controls
176 lines (150 loc) · 7.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# MCPlex Configuration Example
# See README.md for full documentation
[gateway]
listen = "127.0.0.1:3100" # MCP client connection address
dashboard = "127.0.0.1:9090" # Observability dashboard address
hot_reload = true # Auto-reload config on file change
name = "my-gateway" # Gateway instance name
# api_key = "${MCPLEX_API_KEY}" # Uncomment to require API key auth
# rate_limit_rps = 50 # Uncomment to limit requests/sec (0 = unlimited)
[router]
strategy = "keyword" # "semantic", "keyword", or "passthrough"
mode = "metatool" # "metatool" (default), "passthrough", or "legacy"
# metatool: 3 gateway tools — works with ALL standard MCP clients
# passthrough: returns all real tools directly (no routing)
# legacy: _mcplex_query param extension (requires custom client)
top_k = 5 # Max tools to return per query
cache_embeddings = true # Cache tool embeddings for faster routing
similarity_threshold = 0.1 # Minimum similarity score (0.0-1.0)
[security]
enable_rbac = true # Enable role-based access control
enable_audit_log = true # Enable structured audit logging
audit_log_path = "./logs/audit.jsonl" # Audit log file path
# ─────────────────────────────────────────────
# MCP Servers
# ─────────────────────────────────────────────
# Example: GitHub MCP Server (stdio transport)
# [[servers]]
# name = "github"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-github"]
# env = { GITHUB_TOKEN = "${GITHUB_TOKEN}" }
# allowed_roles = ["developer", "admin"]
# Example: Filesystem MCP Server (stdio transport)
# [[servers]]
# name = "filesystem"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/dir"]
# allowed_roles = ["developer", "admin"]
# Example: Memory MCP Server — persistent key-value memory for agents
# [[servers]]
# name = "memory"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-memory"]
# allowed_roles = ["developer", "admin"]
# Example: Fetch MCP Server — web page fetching / crawling
# [[servers]]
# name = "fetch"
# command = "uvx"
# args = ["mcp-server-fetch"]
# allowed_roles = ["developer", "admin"]
# Example: Brave Search MCP Server — web search
# [[servers]]
# name = "search"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-brave-search"]
# env = { BRAVE_API_KEY = "${BRAVE_API_KEY}" }
# allowed_roles = ["developer", "admin"]
# Example: PostgreSQL MCP Server — database access
# [[servers]]
# name = "postgres"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-postgres", "${DATABASE_URL}"]
# blocked_tools = ["drop_table", "delete_*", "truncate_*"]
# allowed_roles = ["admin"]
# Example: Sequential Thinking MCP Server — structured reasoning
# [[servers]]
# name = "thinking"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-sequential-thinking"]
# allowed_roles = ["developer", "admin"]
# Example: Remote MCP Server (HTTP transport)
# [[servers]]
# name = "database"
# url = "http://localhost:8080/mcp"
# transport = "streamable-http"
# blocked_tools = ["drop_table", "delete_*", "truncate_*"]
# allowed_roles = ["admin"]
# Example: Slack MCP Server
# [[servers]]
# name = "slack"
# command = "npx"
# args = ["-y", "@modelcontextprotocol/server-slack"]
# env = { SLACK_TOKEN = "${SLACK_TOKEN}" }
# allowed_roles = ["admin"]
# Example: The Forge MCP Server — multi-model code evolution arena
# See: https://github.com/ModernOps888/the-forge
# [[servers]]
# name = "forge"
# url = "http://localhost:8400/mcp"
# transport = "streamable-http"
# allowed_roles = ["developer", "admin"]
# ─────────────────────────────────────────────
# Roles (used when security.enable_rbac = true)
# ─────────────────────────────────────────────
[roles.developer]
allowed_tools = ["github/*", "filesystem/*", "database/query_*"]
[roles.admin]
allowed_tools = ["*"]
[roles.readonly]
allowed_tools = ["*/list_*", "*/get_*", "*/read_*", "*/search_*"]
blocked_tools = ["*/delete_*", "*/drop_*", "*/create_*", "*/update_*"]
# ─────────────────────────────────────────────
# Response Cache (reduces duplicate upstream calls)
# ─────────────────────────────────────────────
[cache]
enabled = false # Set to true to enable caching
ttl_seconds = 300 # Cache TTL (5 minutes)
max_entries = 1000 # Max cached responses
# patterns = ["list_*", "get_*"] # Optional: custom cache patterns (default: auto-detect read-only tools)
# ─────────────────────────────────────────────
# Multi-Tenant API Keys (maps keys to roles)
# ─────────────────────────────────────────────
# [api_keys."sk-dev-team-abc123"]
# role = "developer"
# description = "Dev team API key"
# [api_keys."sk-admin-xyz789"]
# role = "admin"
# description = "Admin key"
# ─────────────────────────────────────────────
# AgentLens Bridge (optional — MCPlex works independently without this)
# Forwards tool call events to AgentLens for visualization in the
# timeline replay UI. Enable only if you're running AgentLens.
# ─────────────────────────────────────────────
# [agentlens]
# enabled = true # Opt-in (default: false)
# url = "http://127.0.0.1:3000/api/ingest" # AgentLens ingest endpoint
# session_name = "MCPlex Gateway" # Session name in AgentLens UI
# forward_tool_calls = true # Forward tool invocations
# forward_security_events = true # Forward RBAC blocks, rate limits
# forward_cache_events = false # Forward cache hits/misses (noisy)
# ─────────────────────────────────────────────
# Compatible AI Models (July 2026)
# MCPlex is model-agnostic — any MCP client works.
# Reference table for cost estimation and routing tuning:
# ─────────────────────────────────────────────
#
# Provider Model Tier
# ────────────────────────────────────────────────────
# OpenAI GPT-5.6 Sol Flagship (highest cost)
# OpenAI GPT-5.6 Terra Balanced
# OpenAI GPT-5.6 Luna Cost-efficient
# Anthropic Claude Fable 5 Extended reasoning
# Anthropic Claude Mythos 5 Complex agentic workflows
# Anthropic Claude Sonnet 5 High-capability, broad use
# Google Gemini 3.5 Flash High-throughput, value tier
# Google Gemini 3.1 Pro Multimodal, Workspace
# xAI Grok 4.5 Open ecosystem, competitive
#
# At frontier pricing, MCPlex's 70-90% token savings via meta-tool
# routing translate directly to proportional cost reduction.