mTarsier
AGENTS.md50 starsChanged 9 months agoMITView on GitHub
Read this before making any changes to the codebase. mTarsier is a desktop app for managing MCP (Model Context Protocol) servers across all AI clients. Built with Tauri v2 (Rust backend) + React 19 + TypeScript + Tailwind CSS v4 + Zustand. All supported MCP clients are defined in src/lib/clients.ts as CLIENT_REGISTRY. Each entry has: - id, name, type (Desktop/IDE/CLI/Web) - configPath (macOS), configPathWin, configPathLinux - configKey — JSON key where mcpServers live - configFormat — json or toml -…
- Installs packages
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,736 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- frontend-designSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Tauri calls: Always use invoke<T>("command_name", { args }) with try/catch
- Distinctive: line 44
Component size: Keep under 150 lines — extract if larger
- Very specific: line 61
All Tauri commands return Result<T, String>
- Very specific: line 68
All supported MCP clients are defined in src/lib/clients.ts as CLIENT_REGISTRY.
- Distinctive: line 81
Does NOT use Tauri — keep it free of Tauri imports to avoid binary bloat
- Very specific: line 110
Always use the format <type>/<short-description> with lowercase kebab-case:
- Very specific: line 139
When adding a new Tauri command: register it in both commands/mod.rs and lib.rs
≈ “Common” is an estimate: at least 1 in 5 of the 16,597 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
mTarsier — Agent Guide
Read this before making any changes to the codebase.
Project Overview
mTarsier is a desktop app for managing MCP (Model Context Protocol) servers across all AI clients. Built with Tauri v2 (Rust backend) + React 19 + TypeScript + Tailwind CSS v4 + Zustand.
Key Paths
| Path | Purpose |
src/ | React frontend |
src/pages/ | Full-page views (Dashboard, Clients, Config, Marketplace, Settings, About) |
src/components/ | Shared UI components |
src/components/marketplace/ | Marketplace-specific components |
src/store/ | Zustand state stores |
src/lib/ | Utilities (clients registry, themes, utils) |
src/types/ | TypeScript types |
src-tauri/src/ | Rust backend |
src-tauri/src/commands/ | Tauri commands (config, clients, audit, cli, io, utils) |
src-tauri/src/bin/tsr.rs | CLI binary entry point |
src-tauri/scripts/ | Build helper scripts |
src-tauri/binaries/ | Compiled sidecar binaries (gitignored, generated by prepare-sidecar.sh) |
Architecture
React UI ──invoke()──▶ Tauri Commands (Rust) ──▶ Filesystem / OS
│
▼
app_lib (shared Rust lib)
│
▼
tsr CLI binary (clap)Frontend Conventions
- Styling: Tailwind CSS v4 with custom design tokens in
src/index.css - State: Zustand stores in
src/store/—clientStore,configStore,themeStore,settingsStore - Tauri calls: Always use
invoke<T>("command_name", { args })with try/catch - Themes: Colors accessed via CSS variables (
text-primary,bg-surface,text-text-muted, etc.) - Component size: Keep under 150 lines — extract if larger
Design Tokens
| Token | Value | Usage |
primary | #00ff88 | Accent, active states, success |
cyan | #00d4ff | Secondary accent |
amber | #ffb800 | Warnings, hints |
base | #080c0a | Page background |
surface | slightly lighter | Cards, sidebar |
border | subtle | Borders |
text-muted | muted | Secondary text |
Rust Backend Conventions
- No
unwrap()in production code — use?operator ormap_err - All Tauri commands return
Result<T, String> - File paths: always expand
~usingdirscrate, handle macOS/Windows/Linux commands/mod.rs— register all modules herelib.rs— register all commands ininvoke_handler
Client Registry
All supported MCP clients are defined in src/lib/clients.ts as CLIENT_REGISTRY. Each entry has:
id,name,type(Desktop/IDE/CLI/Web)configPath(macOS),configPathWin,configPathLinuxconfigKey— JSON key wheremcpServersliveconfigFormat—jsonortomldetection— how to detect if installed (app_bundle,cli_binary,vscode_extension,none)supportedTransports—stdio,sse,streamable-http,remote-mcp
CLI (tsr)
- Entry point:
src-tauri/src/bin/tsr.rs - Uses
clapwith derive macros - Commands are currently stubbed — implementations go in
src-tauri/src/commands/cli.rs - Does NOT use Tauri — keep it free of Tauri imports to avoid binary bloat
Build & Dev
# Install dependencies
pnpm install
# Prepare CLI sidecar (run once before dev)
cd src-tauri && bash scripts/prepare-sidecar.sh && cd ..
# Dev mode
pnpm tauri dev
# Production build (macOS, signed)
APPLE_SIGNING_IDENTITY="Developer ID Application: ..." pnpm release:signedCI/CD
- Workflow:
.github/workflows/release.yml - Triggers on
git tag v* - Builds for: macOS (aarch64 + x86_64), Windows (NSIS), Linux (AppImage + deb + rpm)
- macOS builds are signed and notarized automatically via secrets
Git Conventions
Branch Naming
Always use the format <type>/<short-description> with lowercase kebab-case:
| Prefix | When to use | Example |
feature/ | New functionality | feature/marketplace-search |
fix/ | Bug fixes | fix/client-detection-crash |
perf/ | Performance improvements | perf/async-client-detection |
refactor/ | Code restructuring, no behavior change | refactor/extract-auth-section |
chore/ | Tooling, deps, config, CI | chore/update-tauri-2.5 |
docs/ | Documentation only | docs/cli-usage-guide |
test/ | Tests only | test/client-store-unit |
release/ | Release prep / version bumps | release/v1.1.0 |
Commit Messages
Follow Conventional Commits:
<type>(<optional scope>): <short description>
feat(marketplace): add server search filtering
fix(clients): prevent concurrent detection calls
perf(clients): offload detection to spawn_blocking
chore: update Cargo dependenciesCommon Pitfalls
src-tauri/binaries/is gitignored — runprepare-sidecar.shafter cloning- Claude Code config uses dual-scope: check both
mcpServersandprojects.{HOME}.mcpServers - When adding a new Tauri command: register it in both
commands/mod.rsandlib.rs - Tailwind v4 uses CSS variables for theming — do not use hardcoded hex colors in components
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

