withmcp is a tool for managing your system-wide collection of MCP servers, allowing easy toggling of individual servers or groups of them, globally or per project.
❯ withmcp
Usage:
withmcp [options] [--] <harness> [args...]
Configured Servers:
excalidraw https://api.excalidraw.com/api/v1/mcp (not enabled)
github https://api.githubcopilot.com/mcp/ (not enabled)
linear https://mcp.linear.app/mcp (not enabled)
playwright npx @playwright/mcp@latest (not enabled)
slack https://mcp.slack.com/mcp (not enabled)
❯ withmcp +github claude # launch claude with linear MCP enabled
❯ withmcp +webdev codex # launch codex with playwright and github
Why would you want to do that? These were my motivating examples:
Found a cool server that has very specific use cases so you don't want it in the context by default? -> Save it in your config, enable when needed.
Want to switch between different toolsets for different tasks? -> Save them in your config, enable toolsets when needed.
Want to enable an MCP server globally like voice mode when working remotely? -> Save it in your config, enable when needed.
cargo install --git https://github.com/lava/withmcp
withmcp edit # create ~/.config/withmcp/profiles/default.toml
Create a minimal profile:
[servers.linear]
url = "https://mcp.linear.app/mcp"
Run with that server enabled:
withmcp +linear claude
Currently claude, codex and pi are supported.
Run a one-off session with a given server enabled:
❯ withmcp +linear claude
Permanently enable it:
❯ withmcp enable linear
All sessions launched by withmcp will now have it.
The inverse also works:
❯ withmcp -linear claude # run without linear mcp
You can keep separate profiles that define their own set of servers:
withmcp -p work codex
You can pull in servers from other profiles for a one-off run:
withmcp +work/slack claude
withmcp is a thin launcher for the selected agent harness.
It generates a list of MCP servers that should be enabled for the
current directory by looking at its own config.
It then passes that configuration in the required harness-specific
format to the agent.
Note that it does not do anything after launching the requested harness, so there is no way to update the config at runtime. For that, you would need to use a MCP proxy server.
It also does not attempt to perform any communication with the MCP servers themselves. In particular, authentication still happens completely inside your harness of choice, after launching.
When it detects that a given MCP server is already configured natively for the selected harness, it will be left out of the generated config.
cargo install --path .
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
${VAR} and
$(command) values are visible in the process list.mcp.json while withmcp runs, so changes
the adapter writes to that file during the session (e.g. from /mcp setup)
are lost. Servers pulled in through the file's imports are not checked
for collisions.list does not check for collisions with a harness's own servers; use
which <harness> for that.Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Rust
100.0%
withmcp is a tool for managing your system-wide collection of MCP servers, allowing easy toggling of individual servers or groups of them, globally or per project.
❯ withmcp
Usage:
withmcp [options] [--] <harness> [args...]
Configured Servers:
excalidraw https://api.excalidraw.com/api/v1/mcp (not enabled)
github https://api.githubcopilot.com/mcp/ (not enabled)
linear https://mcp.linear.app/mcp (not enabled)
playwright npx @playwright/mcp@latest (not enabled)
slack https://mcp.slack.com/mcp (not enabled)
❯ withmcp +github claude # launch claude with linear MCP enabled
❯ withmcp +webdev codex # launch codex with playwright and github
Why would you want to do that? These were my motivating examples:
Found a cool server that has very specific use cases so you don't want it in the context by default? -> Save it in your config, enable when needed.
Want to switch between different toolsets for different tasks? -> Save them in your config, enable toolsets when needed.
Want to enable an MCP server globally like voice mode when working remotely? -> Save it in your config, enable when needed.
cargo install --git https://github.com/lava/withmcp
withmcp edit # create ~/.config/withmcp/profiles/default.toml
Create a minimal profile:
[servers.linear]
url = "https://mcp.linear.app/mcp"
Run with that server enabled:
withmcp +linear claude
Currently claude, codex and pi are supported.
Run a one-off session with a given server enabled:
❯ withmcp +linear claude
Permanently enable it:
❯ withmcp enable linear
All sessions launched by withmcp will now have it.
The inverse also works:
❯ withmcp -linear claude # run without linear mcp
You can keep separate profiles that define their own set of servers:
withmcp -p work codex
You can pull in servers from other profiles for a one-off run:
withmcp +work/slack claude
withmcp is a thin launcher for the selected agent harness.
It generates a list of MCP servers that should be enabled for the
current directory by looking at its own config.
It then passes that configuration in the required harness-specific
format to the agent.
Note that it does not do anything after launching the requested harness, so there is no way to update the config at runtime. For that, you would need to use a MCP proxy server.
It also does not attempt to perform any communication with the MCP servers themselves. In particular, authentication still happens completely inside your harness of choice, after launching.
When it detects that a given MCP server is already configured natively for the selected harness, it will be left out of the generated config.
cargo install --path .
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
${VAR} and
$(command) values are visible in the process list.mcp.json while withmcp runs, so changes
the adapter writes to that file during the session (e.g. from /mcp setup)
are lost. Servers pulled in through the file's imports are not checked
for collisions.list does not check for collisions with a harness's own servers; use
which <harness> for that.Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Rust
100.0%