ModsCode / Claude Code Mods / Ranking / switchboard
switchboard
KOZMOS Switchboard: an MCP observatory sidebar. Every MCP server in the session with its tools, calls, errors, average and p95 latency, last call and a status lamp (healthy, erroring, idle, busy); servers with no calls yet too, and per-too…
What it does
- Draws a pane, toasts
- Adds /switchboard
- Watches tool calls and can refuse them
- Hooks session.start
- Starts processes
Good points
- No network calls
- Written in TypeScript
- Has a desktop-specific branch
- Handles errors
Code to start from
A starter ModsCode writes from the drawing it read, and the mod's own lines that draw, where there are any.
Starter (register.tsx)
import type { Register } from 'claude-code'
// Drawn like switchboard by KOZMOS (pane, toast), as ModsCode read it from the mod's code:
// https://modscode.com/claude-mods/mods/ersinkoc-switchboard/
// Written by ModsCode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
// the pane: open it with $.ui.open({ id: 'my-pane', title: "KOZMOS · Switchboard" })
on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
const { Box, Text, Button } = $.ui.resolve(e)
const length = '…'
const calls = '…'
const errors = '…'
const lampGlyph = '…'
const name = '…'
const status = '…'
const calls2 = '…'
const toolCount = '…'
const calls3 = '…'
const errors2 = '…'
const fmtMs = '…'
const fmtMs2 = '…'
const ago = '…'
const lastTool = '…'
const lastError = '…'
const padEnd = '…'
const calls4 = '…'
const fmtMs3 = '…'
const fmtMs4 = '…'
const errors3 = '…'
const padEnd2 = '…'
const calls5 = '…'
const fmtMs5 = '…'
const fmtMs6 = '…'
const errors4 = '…'
const padEnd3 = '…'
const calls6 = '…'
const fmtMs7 = '…'
const fmtMs8 = '…'
const errors5 = '…'
const lampGlyph2 = '…'
const name2 = '…'
const status2 = '…'
const calls7 = '…'
const toolCount2 = '…'
const calls8 = '…'
const errors6 = '…'
const fmtMs9 = '…'
const fmtMs10 = '…'
const ago2 = '…'
const lastError2 = '…'
const padEnd4 = '…'
const calls9 = '…'
const fmtMs11 = '…'
const fmtMs12 = '…'
const errors7 = '…'
const padEnd5 = '…'
const calls10 = '…'
const fmtMs13 = '…'
const fmtMs14 = '…'
const errors8 = '…'
const padEnd6 = '…'
const calls11 = '…'
const fmtMs15 = '…'
const fmtMs16 = '…'
const errors9 = '…'
const lampGlyph3 = '…'
const name3 = '…'
const status3 = '…'
const calls12 = '…'
const toolCount3 = '…'
const calls13 = '…'
const errors10 = '…'
const fmtMs17 = '…'
const fmtMs18 = '…'
const ago3 = '…'
const lastError3 = '…'
const padEnd7 = '…'
const calls14 = '…'
const fmtMs19 = '…'
const fmtMs20 = '…'
const errors11 = '…'
const padEnd8 = '…'
const calls15 = '…'
const fmtMs21 = '…'
const fmtMs22 = '…'
const errors12 = '…'
const padEnd9 = '…'
const calls16 = '…'
const fmtMs23 = '…'
const fmtMs24 = '…'
const errors13 = '…'
return (
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Text bold color="#f472b6">
⬡ SWITCHBOARD
</Text>
<Text dimColor>
{length}
{" srv · "}
{calls}
{" calls"}
<Text color="#f87171">
{" · "}
{errors}
{" err"}
</Text>
</Text>
</Box>
<Text dimColor>
────────
</Text>
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Box flexDirection="row">
<Button label="▾" plain />
<Text wrap="truncate-end">
<Text>
{" "}
{lampGlyph}
{" "}
</Text>
<Text bold>
{name}
</Text>
<Text>
{" "}
{status}
</Text>
</Text>
</Box>
<Text dimColor>
{calls2}
{" calls"}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{" "}
{toolCount}
{" tools · "}
{calls3}
{" calls · "}
<Text color="#f87171">
{errors2}
{" err"}
</Text>
{" · avg "}
{fmtMs}
{" · p95 "}
{fmtMs2}
{" · "}
{ago}
{` · ${lastTool}`}
</Text>
<Text color="#f87171" wrap="truncate-end">
{" ✖ "}
{lastError}
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd}
</Text>
<Text dimColor>
{" "}
{calls4}
{"× "}
{fmtMs3}
{" p95 "}
{fmtMs4}
</Text>
<Text color="#f87171">
{" "}
{errors3}
✖
</Text>
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd2}
</Text>
<Text dimColor>
{" "}
{calls5}
{"× "}
{fmtMs5}
{" p95 "}
{fmtMs6}
</Text>
<Text color="#f87171">
{" "}
{errors4}
✖
</Text>
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd3}
</Text>
<Text dimColor>
{" "}
{calls6}
{"× "}
{fmtMs7}
{" p95 "}
{fmtMs8}
</Text>
<Text color="#f87171">
{" "}
{errors5}
✖
</Text>
</Text>
</Box>
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Box flexDirection="row">
<Button label="▾" plain />
<Text wrap="truncate-end">
<Text>
{" "}
{lampGlyph2}
{" "}
</Text>
<Text bold>
{name2}
</Text>
<Text>
{" "}
{status2}
</Text>
</Text>
</Box>
<Text dimColor>
{calls7}
{" calls"}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{" "}
{toolCount2}
{" tools · "}
{calls8}
{" calls · "}
<Text color="#f87171">
{errors6}
{" err"}
</Text>
{" · avg "}
{fmtMs9}
{" · p95 "}
{fmtMs10}
{" · "}
{ago2}
{` · ${lastTool}`}
</Text>
<Text color="#f87171" wrap="truncate-end">
{" ✖ "}
{lastError2}
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd4}
</Text>
<Text dimColor>
{" "}
{calls9}
{"× "}
{fmtMs11}
{" p95 "}
{fmtMs12}
</Text>
<Text color="#f87171">
{" "}
{errors7}
✖
</Text>
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd5}
</Text>
<Text dimColor>
{" "}
{calls10}
{"× "}
{fmtMs13}
{" p95 "}
{fmtMs14}
</Text>
<Text color="#f87171">
{" "}
{errors8}
✖
</Text>
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd6}
</Text>
<Text dimColor>
{" "}
{calls11}
{"× "}
{fmtMs15}
{" p95 "}
{fmtMs16}
</Text>
<Text color="#f87171">
{" "}
{errors9}
✖
</Text>
</Text>
</Box>
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Box flexDirection="row">
<Button label="▾" plain />
<Text wrap="truncate-end">
<Text>
{" "}
{lampGlyph3}
{" "}
</Text>
<Text bold>
{name3}
</Text>
<Text>
{" "}
{status3}
</Text>
</Text>
</Box>
<Text dimColor>
{calls12}
{" calls"}
</Text>
</Box>
<Text dimColor wrap="truncate-end">
{" "}
{toolCount3}
{" tools · "}
{calls13}
{" calls · "}
<Text color="#f87171">
{errors10}
{" err"}
</Text>
{" · avg "}
{fmtMs17}
{" · p95 "}
{fmtMs18}
{" · "}
{ago3}
{` · ${lastTool}`}
</Text>
<Text color="#f87171" wrap="truncate-end">
{" ✖ "}
{lastError3}
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd7}
</Text>
<Text dimColor>
{" "}
{calls14}
{"× "}
{fmtMs19}
{" p95 "}
{fmtMs20}
</Text>
<Text color="#f87171">
{" "}
{errors11}
✖
</Text>
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd8}
</Text>
<Text dimColor>
{" "}
{calls15}
{"× "}
{fmtMs21}
{" p95 "}
{fmtMs22}
</Text>
<Text color="#f87171">
{" "}
{errors12}
✖
</Text>
</Text>
<Text wrap="truncate-end">
<Text dimColor>
{" "}
◦
{" "}
</Text>
<Text color="#fb923c">
{padEnd9}
</Text>
<Text dimColor>
{" "}
{calls16}
{"× "}
{fmtMs23}
{" p95 "}
{fmtMs24}
</Text>
<Text color="#f87171">
{" "}
{errors13}
✖
</Text>
</Text>
</Box>
</Box>
)
})
on('session.start', async ($, e, next) => {
const server = '…'
await $.ui.toast(`⬡ ${server}: connected`)
await $.ui.toast(`⬡ ${server}: a plugin cannot redial this server — reconnect it from /mcp`)
return next(e)
})
}
The mod's own code
Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.
mods/switchboard/hooks/register.tsx lines 125–210 · Pane
on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
const s = await read($, snapAtom)
const expanded = await read($, expandedAtom)
const ui = $.ui.resolve(e)
const { Box, Button, Text } = ui
if ('Svg' in ui && e.surface !== 'terminal') {
const { Svg } = ui
const W = pxOf(e.props.bodyColumns, 48)
const bay = patchBay(W, s)
const cardW = Math.max(180, W - 150)
return (
<Box flexDirection="column" gap={1}>
<Svg source={bay.source} alt={`Switchboard: ${s.servers.length} MCP servers, ${s.calls} calls, ${s.errors} errors`} width={W} height={bay.height} />
{s.servers.map(v => {
const isOpen = expanded.includes(v.name)
return (
<Box key={`srv-${v.name}`} flexDirection="column">
<Box flexDirection="row" alignItems="center" gap={1}>
<Svg source={serverCard(cardW, v, s.now)} alt={`${v.name}: ${v.status}, ${v.calls} calls, ${v.errors} errors`} width={cardW} height={52} />
<Button key={`exp-${v.name}`} label={isOpen ? '▾ tools' : '▸ tools'} plain onPress={() => void flip($, v.name)} />
{v.status === 'erroring' ? <Button key={`re-${v.name}`} label="reconnect" onPress={() => void reconnect($, v.name)} /> : null}
</Box>
{isOpen && v.tools.length ? <Svg key={`tools-${v.name}`} source={toolTable(cardW, v.tools, s.now)} alt={`${v.name} tools`} width={cardW} height={20 + v.tools.length * 20} /> : null}
</Box>
)
})}
</Box>
)
}
const cols = Math.max(30, e.props.bodyColumns || 44)
if (!s.servers.length) {
return (
<Box flexDirection="column">
<Text bold color={KZ.magenta}>⬡ SWITCHBOARD</Text>
<Text dimColor>No MCP servers in this session yet.</Text>
<Text dimColor>Connect one with /mcp; it shows here as soon as its tools are listed.</Text>
</Box>
)
}
return (
<Box flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Text bold color={KZ.magenta}>⬡ SWITCHBOARD</Text>
<Text dimColor>{s.servers.length} srv · {s.calls} calls{s.errors ? <Text color={KZ.red}> · {s.errors} err</Text> : ''}</Text>
</Box>
<Text dimColor>{'─'.repeat(Math.min(cols, 80))}</Text>
{s.servers.map(v => {
const isOpen = expanded.includes(v.name)
const ago = v.lastAt !== null ? `${fmtSpan(s.now - v.lastAt)} ago` : 'never called'
return (
<Box key={`srv-${v.name}`} flexDirection="column">
<Box flexDirection="row" justifyContent="space-between">
<Box flexDirection="row">
<Button key={`exp-${v.name}`} label={isOpen ? '▾' : '▸'} plain onPress={() => void flip($, v.name)} />
<Text wrap="truncate-end">
<Text color={LAMP[v.status]}> {lampGlyph(v.status)} </Text>
<Text bold>{clip(v.name, Math.max(8, cols - 26))}</Text>
<Text color={LAMP[v.status]}> {v.status}</Text>
</Text>
</Box>
{v.status === 'erroring'
? <Button key={`re-${v.name}`} label="reconnect" plain onPress={() => void reconnect($, v.name)} />
: <Text dimColor>{v.calls} calls</Text>}
</Box>
<Text dimColor wrap="truncate-end">
{' '}{v.toolCount} tools · {v.calls} calls · <Text color={v.errors ? KZ.red : undefined} dimColor={!v.errors}>{v.errors} err</Text> · avg {fmtMs(v.avgMs)} · p95 {fmtMs(v.p95Ms)} · {ago}{v.lastTool ? ` · ${v.lastTool}` : ''}
</Text>
{v.status === 'erroring' && v.lastError ? <Text color={KZ.red} wrap="truncate-end"> ✖ {clip(v.lastError, cols - 6)}</Text> : null}
{isOpen
? v.tools.map(t => (
<Text key={`t-${v.name}-${t.name}`} wrap="truncate-end">
<Text dimColor> {t.isListed ? '◦' : '·'} </Text>
<Text color={t.errors ? KZ.amber : undefined}>{padEnd(clip(t.name, 22), Math.min(22, Math.max(8, cols - 30)))}</Text>
<Text dimColor> {String(t.calls).padStart(3)}× {fmtMs(t.avgMs).padStart(6)} p95 {fmtMs(t.p95Ms).padStart(6)}</Text>
{t.errors ? <Text color={KZ.red}> {t.errors}✖</Text> : ''}
</Text>
))
: null}
</Box>
)
})}
</Box>
)
})Licence text (MIT)
MIT License Copyright (c) 2026 Ersin Koç Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
How to build this: Pane (panel), Deny a tool call
What its code calls
runs programsreads filesenv varstool callscalls tools
What its code shows
Read from the source at commit ad627c4acd5c on 2026-10-11. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.
| Decides the listing: code you can check | |
|---|---|
| Entry read | Every module hooks/hooks.json names was read.mods/switchboard/hooks/register.tsx |
| Parses | Every file parses as TypeScript or JavaScript.4 files parsed |
| All its code is in the mod | Every import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod |
| Readable | No minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs |
| Calls in the open | Network and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open |
| For you to weigh before installing | |
| Where it draws | The terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both |
| Install line | Whether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there |
| Programs on Windows | Whether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks |
| Network | Whether every fetch names its https host in the code.no network |
| Programs | Whether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs |
| Reads and sends | Whether it both reads something of yours (files, environment variables, the transcript, settings) and reaches outside (the network, an MCP server, another session, telemetry).reaches nothing outside |
| Keys in the source | Whether the source holds what looks like an API key or a private key.no keys in the source |
| Licence | An open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets ModsCode show its code; otherwise the code is linked.MIT |
| Settings hooks | Hooks declared in hooks/hooks.json or plugin.json beside the module: a command (a shell when it has no args), an HTTP request, an MCP tool or a model prompt at an event. They run outside $.no settings hooks: its function hooks alone |
| Servers it ships | MCP servers (a program, or a URL; a headersHelper is a shell command; a .mcpb bundle is unpacked at run time), LSP servers, monitors (a shell command for the whole session) and bin/ (on the PATH of the Bash tool).ships no MCP or LSP server, no monitor, no bin/ |
| Skills, commands, agents | What its Markdown declares beyond text: allowed-tools granted for the turn, hooks added when a skill is invoked, a command run before Claude reads the skill.no skills, commands, agents or workflows |
| Tools and MCP | Whether every tool it calls through $.tool.call and $.mcp.call is named in the code, and none is a shell (Bash through the tool runs a shell without $.process).mcp.connect: a server named at run t… |
| Asks of the model | Completions it runs ($.model.complete, fork, classify), subagents it spawns, prompts it submits as you, and the tools, commands and agents it adds.adds command switchboard |
| Events it hooks | By what a hook there can do: gates (refuse a tool call, a prompt, a setting, another plugin), shapes (what the model reads: the system prompt, tool descriptions, each request), reads (your input, the events of the settings hooks, every event with *), and the rest.gates: command.run (switchboard), tool.call · also: session.start, ui.render (Pane) · timers: clock.every |
| Reads, by name | The environment variables and files it names, and whether it reads the transcript, settings.json, the prompt box or the mouse selection.reads no files, environment variables, settings or transcript |
| Writes, by name | The files and environment variables it names, and whether it changes settings, the prompt box, the clipboard, the conversation (a row the model reads) or another session.writes no files, environment variables, settings or conversation rows |
This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen
Install it
Check it yourself before you install it. Mods run unsandboxed, with your permissions, and ModsCode does not vouch for what this code does. Read its code (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.
From its marketplace
Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:
/plugin marketplace add ersinkoc/claude-mods/plugin install switchboard@kozmos/reload-pluginsThis installs the marketplace's latest commit, which may not be the one read here (ad627c4acd5c). Compare them before you install. /reload-plugins loads it into a session that is already open.
Try the commit ModsCode read
No marketplace needed. In a terminal, clone the repository, check out the commit read, validate the mod, and load it for one session:
git clone https://github.com/ersinkoc/claude-modsgit -C claude-mods checkout ad627c4acd5c6c543e176aeb6c3615152a139356claude plugin validate claude-mods/mods/switchboardclaude --plugin-dir claude-mods/mods/switchboardThe validate line lists the events the mod hooks and what it asks Claude Code to do, without running it. The last line loads the mod for this session only and writes nothing to your settings. If the author has rewritten history, the commit may no longer exist.
Ask Claude about it
With the ModsCode connector added, Claude can read this mod's code and what it reaches, and build on them. Ask it like this:
Read the ModsCode mod "ersinkoc-switchboard" with its code and make me one like itSearch them from Claude: the MCP connector
Similar mods
- lcu-approveLCU★ 894
- explain-asSumit Paul★ 20
- uploadsBuild Internet★ 18
- ccprogressamigoer★ 14
- flow-scenesRob Macrae★ 11
- breadcrumbsKOZMOS★ 9
More from this repository
- almanacKOZMOS★ 9
- auroraKOZMOS★ 9
- ballastKOZMOS★ 9
- blackboxKOZMOS★ 9
- breadcrumbsKOZMOS★ 9
- bridgeKOZMOS★ 9
See all 48 mods in this repository
Badge for your README
If this is your mod, paste this into your README. It links to this page.
[](https://modscode.com/claude-mods/mods/ersinkoc-switchboard/)