Skip to content

Commit 25a6fbb

Browse files
authored
docs: add Workspaces and Tool Optimization guides (#164)
Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
1 parent 1762295 commit 25a6fbb

3 files changed

Lines changed: 101 additions & 0 deletions

File tree

docs/guide/meta.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
"getting-started",
77
"---Core Concepts---",
88
"spaces",
9+
"workspaces",
910
"feature-sets",
1011
"clients",
1112
"servers",
1213
"---Advanced---",
14+
"tool-optimization",
1315
"gateway",
1416
"server-definitions",
1517
"security"

docs/guide/tool-optimization.mdx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: Tool Optimization — Let the AI Curate Its Toolset
3+
description: McpMux ships built-in meta-tools so an AI assistant can keep its own toolset lean — discover what's available, compose a focused FeatureSet, and pin it to the current folder, all from chat. Reads are silent; writes are gated by a one-click approval.
4+
---
5+
6+
Hand an assistant a hundred tools and it burns tokens and reaches for the wrong one. **Tool Optimization** is a built-in capability that lets the AI keep *itself* lean — straight from chat, no config files.
7+
8+
It's a per-Space, built-in server McpMux exposes alongside your real MCP servers. Toggle it from the **Built-in** page.
9+
10+
![Tool Optimization — the built-in self-management tools the AI drives, reads silent and writes gated](https://mcpmux.com/screenshots/tool-optimization.png)
11+
12+
## The `@mux` trigger
13+
14+
Start a request with **`@mux`** and the assistant knows to drive these tools instead of your real ones. The trigger keeps self-management cleanly separated from your actual work:
15+
16+
> *"@mux build a minimal toolset for this Next.js repo and pin it to this folder."*
17+
18+
## The meta-tools
19+
20+
| Tool | Access | What it does |
21+
|---|---|---|
22+
| `mcpmux_list_spaces` | read | List all Spaces so the AI can target one by id |
23+
| `mcpmux_list_all_tools` | read | Browse every tool available in a Space, unfiltered |
24+
| `mcpmux_search_tools` | read | Find tools by keyword without pulling the whole catalog |
25+
| `mcpmux_list_feature_sets` | read | See the FeatureSets defined in the Space |
26+
| `mcpmux_manage_feature_set` | write · approval | Create, update, or delete a custom FeatureSet of chosen tools |
27+
| `mcpmux_bind_current_workspace` | write · approval | Map the current folder to a FeatureSet so it persists |
28+
29+
A typical flow: **discover** what's available (`list`/`search`), **compose** a focused FeatureSet of just the tools needed (`manage_feature_set`), then **pin** the current folder to it (`bind_current_workspace`) so it sticks for every future session.
30+
31+
## Reads are silent, writes are gated
32+
33+
Read tools run silently — the AI explores freely. Anything that changes your setup pops a **one-click approval dialog** that names the **exact Space** it will affect and shows the precise tool diff. The AI proposes; you decide.
34+
35+
![Approval — every self-management write asks first, showing the target Space and the exact tool diff](https://mcpmux.com/screenshots/meta-tool-approval.png)
36+
37+
Every operation can target a specific Space by id, so the AI can curate one context without touching another. An audit log records each approved change.
38+
39+
## Next steps
40+
41+
- [FeatureSets](/docs/feature-sets/) — the curated toolsets the AI composes
42+
- [Workspaces](/docs/workspaces/) — what `bind_current_workspace` pins a folder to
43+
- [Spaces](/docs/spaces/) — the contexts every meta-tool operation targets by id

docs/guide/workspaces.mdx

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
title: Workspaces — Folder-Based Routing
3+
description: Map a project folder to the exact toolset it should get. McpMux routes each workspace to its own Space and FeatureSet automatically, so every AI app sees the right tools for the folder it has open.
4+
---
5+
6+
Workspaces map a **project folder** to the exact toolset it should get. When an AI app opens that folder, McpMux hands it the Space and FeatureSet you mapped — and nothing else.
7+
8+
## Why Workspaces
9+
10+
[Spaces](/docs/spaces/) isolate *contexts*; Workspaces decide which context a session actually gets — automatically, per folder.
11+
12+
Your AI app (Cursor, VS Code, Windsurf, Claude Code) tells McpMux which folder it's working in — its MCP **root**. McpMux uses that to route each folder to its own toolset:
13+
14+
- Open your **backend repo** and the AI sees your database, cloud, and deploy tools.
15+
- Open a **docs folder** and it sees only search and filesystem.
16+
- Open an **untrusted project** and it gets a read-only set — or nothing.
17+
18+
Map a folder once and every future session from that exact path resolves automatically. Matching is **per-folder and exact**, so nothing leaks across projects.
19+
20+
![Workspaces — map a project folder to the Space and FeatureSet it should get](https://mcpmux.com/screenshots/workspaces.png)
21+
22+
## How a request resolves
23+
24+
When an AI app makes a request, McpMux resolves the toolset in order:
25+
26+
1. The app reports its **workspace root** (the folder it has open).
27+
2. McpMux looks for a **Workspace mapping** for that exact path.
28+
3. The mapping points at a **Space** (which servers + credentials) and a **FeatureSet** (which tools, prompts, and resources from those servers).
29+
4. The FeatureSet's included features **are** the effective toolset the session resolves to.
30+
31+
Because routing is driven by the reported folder, it is decided **per session, not per app** — the same app gets different tools depending on which project it has open.
32+
33+
## Creating a mapping
34+
35+
Open the **Workspaces** tab and click **Add mapping**:
36+
37+
- **Workspace folder** — browse for a folder or paste an absolute path. Accepts `/unix`, `C:\windows`, and `file://` forms.
38+
- **Space** — the profile whose servers and credentials this folder draws from.
39+
- **FeatureSet** — the curated bundle of tools this folder is allowed to use. Pick one, or combine several into a single effective set.
40+
41+
Unmapped folders receive no tools until you map them — an explicit, fail-closed default so a new project never silently inherits another's access.
42+
43+
## Let the AI map it for you
44+
45+
You don't have to open the Workspaces tab at all. With [Tool Optimization](/docs/tool-optimization/), an assistant can compose a FeatureSet and pin the current folder to it from chat:
46+
47+
> *"@mux build a minimal toolset for this Next.js repo and pin it to this folder."*
48+
49+
The pin is a Workspace mapping — it sticks for every future session from that path. Changes are gated behind a one-click approval that names the exact Space.
50+
51+
## Next steps
52+
53+
- [Spaces](/docs/spaces/) — the isolated contexts a Workspace routes to
54+
- [FeatureSets](/docs/feature-sets/) — the curated toolsets a Workspace grants
55+
- [Tool Optimization](/docs/tool-optimization/) — let the AI map folders for itself
56+
- [Clients](/docs/clients/) — how connected apps report the folder that drives routing

0 commit comments

Comments
 (0)