When should you use MCP?
Use MCP when:- a tool already exists in MCP form and you do not want to build a native Mibyan tool
- you want Mibyan to operate against a local or remote system through a clean RPC layer
- you want fine-grained per-server exposure control
- you want to connect Mibyan to internal APIs, databases, or company systems without modifying Mibyan core
- a built-in Mibyan tool already solves the job well
- the server exposes a huge dangerous tool surface and you are not prepared to filter it
- you only need one very narrow integration and a native tool would be simpler and safer
Mental model
Think of MCP as an adapter layer:- Mibyan remains the agent
- MCP servers contribute tools
- Mibyan discovers those tools at startup or reload time
- the model can use them like normal tools
- you control how much of each server is visible
Step 1: install MCP support
If you installed Mibyan with the standard install script, MCP support is already included. PM selects the declaredall extra.
If you installed without extras and need to add MCP separately:
npx are available.
For many Python MCP servers, uvx is a nice default.
Step 2: add one server first
Start with a single, safe server. Example: filesystem access to one project directory only.Step 3: verify MCP loaded
You can verify MCP in a few ways:- Mibyan banner/status should show MCP integration when configured
- ask Mibyan what tools it has available
- use
/reload-mcpafter config changes - check logs if the server failed to connect
- run
mibyan mcp test <server>from a shell — it connects, lists the discovered tools, and exits0on a completed connect,1when the connection fails, and3when the server is not in your config (2is argparse’s usage error), so health probes and cron watchdogs can branch on$?instead of parsing the output
Step 4: start filtering immediately
Do not wait until later if the server exposes a lot of tools.Example: whitelist only what you want
WSL2: bridge Mibyan in WSL to Windows Chrome
This is the practical setup when:- Mibyan runs inside WSL2
- the browser you want to control is your normal signed-in Chrome on Windows
/browser connectis awkward or unreliable from WSL
- Mibyan runs in WSL
- Mibyan starts a local stdio MCP server
- that MCP server is launched through Windows interop (
cmd.exeorpowershell.exe) - the MCP server attaches to your live Windows Chrome session
Why this mode is useful
- you keep your real Windows browser profile, cookies, and logins
- Mibyan stays in its supported Unix environment (WSL2)
- browser control is exposed as MCP tools instead of relying on Mibyan core browser transport
Recommended server
Usechrome-devtools-mcp.
If your Windows Chrome already has live remote debugging enabled from chrome://inspect/#remote-debugging, add it like this from WSL:
Typical prompt
Once loaded, Mibyan can use the MCP-prefixed browser tools directly. For example:When /browser connect is the wrong tool
If Mibyan runs in WSL and Chrome runs on Windows, /browser connect may fail even though Chrome is open and debuggable.
Common reasons:
- WSL cannot reach the same host-local endpoint Chrome exposes to Windows tools
- newer Chrome live-debugging flows are not the same as a classic
ws://localhost:9222 - the browser is easier to attach to from a Windows-side helper like
chrome-devtools-mcp
/browser connect for same-environment setups and use MCP for WSL-to-Windows browser bridging.
Known pitfalls
- Start Mibyan from a Windows-mounted path like
/mnt/c/Users/<you>or/mnt/c/workspace/...when using Windows stdio executables through MCP. - If you start Mibyan from
/rootor/home/..., Windows may emit aUNCcurrent-directory warning before the MCP server starts. - If
chrome-devtools-mcp --autoConnecttimes out while enumerating pages, reduce background/frozen tabs in Chrome and retry.
Example: blacklist dangerous actions
Example: disable utility wrappers too
What does filtering actually affect?
There are two categories of MCP-exposed functionality in Mibyan:- Server-native MCP tools
- filtered with:
tools.includetools.exclude
- Mibyan-added utility wrappers
- filtered with:
tools.resourcestools.prompts
Utility wrappers you may see
Resources:list_resourcesread_resource
list_promptsget_prompt
- your config allows them, and
- the MCP server session actually supports those capabilities
Common patterns
Pattern 1: local project assistant
Use MCP for a repo-local filesystem or git server when you want Mibyan to reason over a bounded workspace.Pattern 2: repo-native work record with Open Scaffold
Use Open Scaffold when you want Mibyan to read a repository’s durable AI-work record: mission, plans, evidence notes, handoff packets, and review/gate results. Mibyan remains the agent; Open Scaffold remains the repo-local record. Add the server for one scaffolded repository:select in the mibyan mcp add prompt, or edit config.yaml afterward:
- Open Scaffold MCP is local-first and read-only by default.
- Its write tools require the server to be started with
--allow-write; do not enable that until you explicitly want Mibyan to mutate.oscfiles. - Open Scaffold records and gates work; it does not authorize Mibyan to merge, publish, deploy, or spawn runtimes.
- Pin
open-scaffold@<version>instead of@latestif you need reproducible tool schemas.
Pattern 3: GitHub triage assistant
Pattern 4: internal API assistant
Pattern 4: documentation / knowledge servers
Some MCP servers expose prompts or resources that are more like shared knowledge assets than direct actions.Tutorial: end-to-end setup with filtering
Here is a practical progression.Phase 1: add GitHub MCP with a tight whitelist
Phase 2: expand only when needed
If you later need issue updates too:Phase 3: add a second server with different policy
Safe usage recommendations
Prefer allowlists for dangerous systems
For anything financial, customer-facing, or destructive:- use
tools.include - start with the smallest set possible
Disable unused utilities
If you do not want the model browsing server-provided resources/prompts, turn them off:Keep servers scoped narrowly
Examples:- filesystem server rooted to one project dir, not your whole home directory
- git server pointed at one repo
- internal API server with read-heavy tool exposure by default
Reload after config changes
- include/exclude lists
- enabled flags
- resources/prompts toggles
- auth headers / env
Troubleshooting by symptom
”The server connects but the tools I expected are missing”
Possible causes:- filtered by
tools.include - excluded by
tools.exclude - utility wrappers disabled via
resources: falseorprompts: false - server does not actually support resources/prompts
”The server is configured but nothing loads”
Check:enabled: falsewas not left in config- command/runtime exists (
npx,uvx, etc.) - HTTP endpoint is reachable
- auth env or headers are correct
”Why do I see fewer tools than the MCP server advertises?”
Because Mibyan now respects your per-server policy and capability-aware registration. That is expected, and usually desirable.”How do I remove an MCP server without deleting the config?”
Use:Recommended first MCP setups
Good first servers for most users:- filesystem
- git
- GitHub
- fetch / documentation MCP servers
- one narrow internal API
- giant business systems with lots of destructive actions and no filtering
- anything you do not understand well enough to constrain

