Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1f8d206
chore: upgrade rmcp to v1.5
its-mash Apr 20, 2026
d16d50d
feat(core,storage): schema for FeatureSet resolver v2 (forward-compat)
its-mash Apr 20, 2026
76c6638
feat(gateway): FeatureSetResolver v2 + SessionRootsRegistry (shadow m…
its-mash Apr 20, 2026
ecf6bb8
feat: FeatureSet resolver v2 — authoritative + UI + migration 003
its-mash Apr 20, 2026
5416d86
test: remove obsolete client_grants database tests
its-mash Apr 20, 2026
8c740a5
feat(gateway,desktop): mcpmux_* self-management meta tools with nativ…
its-mash Apr 21, 2026
382c374
feat(meta-tools): audit log + master switch + grants UI + E2E spec
its-mash Apr 21, 2026
b4ba091
feat(ui): premium Active FeatureSet + empty-state Clients page onboar…
its-mash Apr 21, 2026
ce1d384
fix(ui): split one-click vs copy-paste install in Clients onboarding
its-mash Apr 21, 2026
7dcd554
fix(ui): Clients onboarding — single generic 3-step card, always shown
its-mash Apr 21, 2026
c08d9fe
fix(ConnectIDEs): per-IDE correct instructions + popover opens upward
its-mash Apr 21, 2026
c8c3f1c
feat(ui): Contribute / Request affordances across the app
its-mash Apr 21, 2026
5846a98
feat(routing): workspace-root-driven FeatureSet resolution
its-mash Apr 25, 2026
c2f02f6
fix(gateway): route to resolved space + accept URL client_ids in meta…
its-mash Apr 25, 2026
ac33136
fix(gateway): wire approval publisher on auto-start + focus window on…
its-mash Apr 25, 2026
02bd7b9
fix(gateway,ui): collapse describe tools, fire list_changed on Connec…
its-mash Apr 27, 2026
42bfbf9
fix(gateway): drop mcpmux_describe_workspace meta tool
its-mash Apr 27, 2026
a313ffd
fix(meta-tools): scope to caller's resolved Space + drop stale pin/ac…
its-mash Apr 27, 2026
98bceb8
feat(routing): per-client grants, multi-FS bindings, capability-branc…
its-mash Apr 28, 2026
af600c8
fix(routing): close root-fetch race + Starter editability + binding a…
its-mash Apr 29, 2026
f08e8ec
fix(oauth): drop duplicate RFC 8707 resource param
its-mash Apr 29, 2026
c9a18b7
fix(notifier): lazy-GC dead sessions on every fanout / per-peer push
its-mash Apr 29, 2026
a83e288
fix(notifier): tag every list_changed push with session_id + client_id
its-mash Apr 29, 2026
deab680
fix(handler): single-flight on-demand probe per session
its-mash Apr 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
blank_issues_enabled: false
blank_issues_enabled: true
contact_links:
- name: Questions & Help
url: https://github.com/mcpmux/mcp-mux/discussions/categories/q-a
about: Ask questions and get help in GitHub Discussions
- name: Feature Ideas
url: https://github.com/mcpmux/mcp-mux/discussions/categories/ideas
about: Share and discuss feature ideas
- name: Contribute a Server Definition (PR)
url: https://github.com/mcpmux/mcp-servers/blob/main/CONTRIBUTING.md
about: Server definitions live in the mcp-servers repo and land via PR — read the guide
- name: Request a Server
url: https://github.com/mcpmux/mcp-servers/issues/new?template=request-server.yml
about: Ask the community to add an MCP server to the registry
- name: Report a Server Definition Bug
url: https://github.com/mcpmux/mcp-servers/issues/new?template=bug-report.yml
about: Found a broken or incorrect server in the registry? Report it here
131 changes: 131 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# AGENTS.md

Guidance for coding agents working inside the `mcp-mux` repo — the McpMux desktop app and local gateway. Complements [`README.md`](README.md) and [`CONTRIBUTING.md`](CONTRIBUTING.md); when anything here conflicts with an explicit user instruction in the current session, the user wins.

## Project Overview

McpMux is a Tauri 2 desktop app (Rust + React 19) with a local Axum HTTP gateway on `localhost:45818`. It lets users configure MCP servers once and connect every AI client (Cursor, Claude Desktop, VS Code, Windsurf) through a single endpoint, with credentials encrypted in the OS keychain instead of plain-text JSON files.

A more detailed map of the workspace lives in [`CLAUDE.md`](CLAUDE.md) at the repo root — read it for the crate layout, frontend architecture, and cross-project context. This file captures the minimum an agent needs to make safe, useful changes here.

## Workspace Layout

```
mcp-mux/
├── apps/desktop/ # Tauri shell — React frontend (src/) + Rust Tauri commands (src-tauri/)
├── crates/
│ ├── mcpmux-core/ # Domain entities, repository traits, service layer, EventBus
│ ├── mcpmux-gateway/ # Axum gateway — routing, OAuth refresh, FeatureSet filtering
│ ├── mcpmux-storage/ # SQLite + AES-256-GCM field encryption + OS keychain
│ └── mcpmux-mcp/ # MCP protocol client wrapper (rmcp SDK)
├── packages/ui/ # Shared UI components (`@mcpmux/ui`)
├── schemas/ # JSON Schemas surfaced in the Monaco editor
└── tests/ # Rust integration, TS unit (vitest), desktop E2E (WDIO), web E2E (playwright)
```

## Build & Dev Commands

Run everything from `mcp-mux/`:

| Command | What it does |
|---------|--------------|
| `pnpm setup` | First-time dev environment setup (PowerShell on Windows). |
| `pnpm dev` | Tauri desktop dev mode (Rust + React hot-reload). |
| `pnpm dev:web` | Web UI only via Vite — no Rust, no Tauri shell. |
| `pnpm build` | Production Tauri build for the current platform. |
| `pnpm validate` | Full correctness gate — runs the items below in sequence. |
| `pnpm lint` | ESLint (recursive) + `cargo clippy --workspace -- -D warnings`. |
| `pnpm lint:fix` | Auto-fix lint issues. |
| `pnpm format` | `prettier --write .` + `cargo fmt --all`. |
| `pnpm format:check` | Formatting check (no writes). |
| `pnpm typecheck` | Recursive TypeScript typecheck. |

**Before claiming a change is done**, run `pnpm validate` (or the relevant subset) — it mirrors what CI enforces.

## Testing

| Command | Scope |
|---------|-------|
| `pnpm test` | Rust + TypeScript, everything. |
| `pnpm test:rust` | `cargo nextest run --workspace`. |
| `pnpm test:rust:unit` | `cargo nextest run --workspace --lib`. |
| `pnpm test:rust:int` | `cargo nextest run -p tests` — integration crate in `tests/rust`. |
| `pnpm test:rust:doc` | `cargo test --workspace --doc`. |
| `pnpm test:ts` | Vitest run (`tests/ts/vitest.config.ts`). |
| `pnpm test:ts:watch` | Vitest watch. |
| `pnpm test:e2e` | Desktop E2E via WebDriver IO — requires `MCPMUX_REGISTRY_URL`. |
| `pnpm test:e2e:file -- tests/e2e/specs/foo.ts` | One WDIO spec file. |
| `pnpm test:e2e:grep -- "test name"` | WDIO tests matching a name. |
| `pnpm test:e2e:web` | Playwright on the web UI. |
| `pnpm test:coverage` | `cargo llvm-cov` + Vitest coverage. |

Prefer narrow commands over `pnpm test` while iterating — the full suite is slow.

## Code Style

- **Rust:** 100-char max width, 4-space indent. Clippy runs with `avoid-breaking-exported-api = false`; all warnings are denied in CI.
- **TypeScript / JSX:** Prettier — single quotes, 2-space indent, 100-char width, trailing commas (es5), Tailwind CSS plugin for class ordering.
- **Path aliases:** `@/` → `apps/desktop/src/`; `@mcpmux/ui` → `packages/ui`.
- **No emojis in code or commits** unless the user explicitly asks for them.
- **Comments:** only when the *why* is non-obvious. Identifiers should explain the *what*.

## Commit & PR Guidelines

- Commits must be **signed off** (DCO): `git commit -s -m "..."`. CI rejects unsigned commits.
- Prefer conventional-style subjects — releases use release-please for semantic versioning.
- PRs follow [`.github/pull_request_template.md`](.github/pull_request_template.md): describe the change, how you tested, and check the `pnpm test` / `pnpm lint` / `pnpm typecheck` boxes.
- Don't bypass hooks (`--no-verify`) or DCO signing unless explicitly told to.

## Platform Gotchas

### Child-process flags

Anything that spawns a child process (stdio MCP servers, installers, etc.) **must** go through `mcpmux_gateway::pool::transport::configure_child_process_platform()`. That helper applies:

- **Windows:** `CREATE_NO_WINDOW` (`0x08000000`) — release builds use `windows_subsystem = "windows"`, so without this the OS briefly flashes a console window when a child starts.
- **Unix:** `process_group(0)` — stops SIGINT/SIGTSTP from the parent terminal from tearing down the child.

`tokio::process::Command` already exposes `creation_flags()` (Windows) and `process_group()` (Unix). **Do not** import `std::os::*::process::CommandExt` — those traits are unused with Tokio's `Command` and trigger clippy.

### Cross-platform CI

- The pre-commit hook runs `cargo clippy --workspace -- -D warnings` on your dev machine.
- `#[cfg(unix)]` only compiles on Unix; `#[cfg(windows)]` only on Windows. CI is Linux, so Windows-gated code is **not** linted in CI, and Unix-gated code is not linted on a Windows dev box.
- When you touch platform-conditional code, check the *other* platform compiles before pushing — CI won't catch a Windows-only clippy regression.

### Secret handling

- Never log tokens, API keys, headers with auth material, or raw OAuth responses. Use the existing sanitised-log helpers in `mcpmux-gateway`.
- Credentials encrypt at rest via AES-256-GCM in SQLite plus DPAPI (Windows) / OS keychain (macOS, Linux). Don't add new code paths that persist secrets any other way.
- Secrets should be wiped from memory after use via `zeroize`.
- The gateway binds to `127.0.0.1`. Don't bind to `0.0.0.0` or expose it on the network.

## Frontend Notes

- Entry point: `apps/desktop/src/main.tsx` → `App.tsx`.
- Global state: a single Zustand store at `src/stores/appStore.ts`.
- Key hooks: `useServerManager` (server CRUD), `useSpaces` (workspace switching), `useDomainEvents` (Rust-side EventBus listener), `useDataSync`.
- UI: React 19, Tailwind CSS, Lucide icons, Monaco Editor for JSON config surfaces.
- Open external URLs through `openExternal` in `apps/desktop/src/lib/contribute.ts` — it routes through the Tauri opener plugin so links open in the user's default browser, not the webview.
- For UI changes, launch `pnpm dev` and exercise the feature in the running app before reporting done — typecheck and tests verify correctness, not UX regressions.

## Rust Architecture Cues

- Cross-layer communication goes through the `EventBus` in `mcpmux-core`. Prefer emitting a domain event over reaching across module boundaries directly.
- Storage is behind repository traits — don't call SQLx or SQLite APIs directly from gateway or app code; add or use a repo method.
- Services are wired up via the `ApplicationServices` builders in `mcpmux-core`. New services should follow the same DI pattern.

## MCP Specification

The full MCP spec is vendored at `../modelcontextprotocol/docs/specification/`. Default to the latest stable version (`2025-11-25`) and **read the relevant section before** implementing or modifying protocol behaviour (transports, lifecycle, capability negotiation, OAuth flows, tools / resources / prompts). For features targeting a specific protocol version, use that version's folder.

## Server Definitions

Server catalog entries live in the separate [`mcp-servers`](https://github.com/mcpmux/mcp-servers) repo — **not here**. If a task involves adding, editing, or fixing a server definition, switch to that repo and follow its `AGENTS.md`.

## Things Not To Do

- Don't add backwards-compatibility shims, deprecated aliases, or `// removed` placeholder comments when removing code — delete it cleanly.
- Don't introduce new fallbacks or input validation for states that are already framework-guaranteed. Trust internal invariants; validate only at the boundary (user input, external APIs).
- Don't edit generated files: `CHANGELOG.md`, release-please manifests, `bundle/*.json` in sibling repos, `packages/ui/dist`.
- Don't commit screenshots, videos, or large binaries to the repo — link out instead.
9 changes: 5 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ os_pipe = "1"

# MCP Protocol
# NOTE: Never use local path dependency - E:\one-mcp\rust-sdk is for source lookup only
rmcp = { version = "0.17.0", features = [
rmcp = { version = "1.5", features = [
"client",
"server",
"transport-io",
Expand Down
Loading
Loading