micrOSMCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@micrOSMCPRun version on device TinyDevBoard"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.

micrOSMCP
Standalone TypeScript MCP server and browser tester UI for micrOS devices. Use it to discover devices, inspect the device cache, run micrOS commands, and discover each device's available module commands.
Quick Start
npm install
npm run build
npm run start:uiOpen the printed URL, usually:
http://127.0.0.1:3333The UI is the easiest way to verify everything locally. It lists the MCP tools, renders their schemas as forms, keeps JSON arguments editable, and gives device dropdowns for device-targeted tools.
Related MCP server: MCP Server TypeScript Template
Use With An MCP Client
Build first:
npm install
npm run buildCodex-style config.toml:
[mcp_servers.microsmcp]
command = "npm"
args = ["run", "--silent", "start"]
cwd = "/Users/bnm/Development/micrOSMCP"Generic JSON-style MCP config:
{
"mcpServers": {
"microsmcp": {
"command": "npm",
"args": ["run", "--silent", "start"],
"cwd": "/Users/bnm/Development/micrOSMCP"
}
}
}Use --silent with npm in MCP client config so npm does not print lifecycle banners to stdout before the MCP protocol starts. The direct equivalent is:
{
"mcpServers": {
"microsmcp": {
"command": "node",
"args": ["/Users/bnm/Development/micrOSMCP/scripts/start.mjs", "mcp"],
"cwd": "/Users/bnm/Development/micrOSMCP"
}
}
}Commands
npm run help # Show start modes and environment variables
npm run check # Build and sanity-check project entrypoints
npm run build # Compile TypeScript into dist/
npm run start # Start stdio MCP server from dist/
npm run start -- ui # Start UI from dist/ without rebuilding
npm run start:mcp # Explicit stdio MCP mode
npm run start:ui # Build, then start the browser tester UI
npm run docker:build # Build and export Docker image tarForwarded start help:
npm run start -- --helpUseful environment variables:
MICROS_DEVICE_CACHE_PATH=/path/to/device_conn_cache.json npm run start
HOST=0.0.0.0 PORT=3333 npm run start -- uiTools
The MCP server exposes five tools.
Tool | Purpose |
| Return cached micrOS devices. |
| Filter cached devices by UID, FUID, IP, port, and optional live status. |
| Scan a |
| Run a command or command pipeline on one selected device. |
| Run |
run_command
String pipeline using the micrOS <a> separator:
{
"deviceTag": "TinyDevBoard",
"command": "version<a>conf webui"
}Array pipeline:
{
"deviceTag": "TinyDevBoard",
"command": ["version", "conf webui"]
}Use read-only commands such as version for smoke tests. Other micrOS commands may change device state.
discover_devices
{
"networkPrefix": "10.0.1",
"startHost": 2,
"endHost": 254,
"port": 9008,
"timeoutMs": 1000,
"concurrency": 50
}If networkPrefix is omitted, the server uses the active local IPv4 interface. In Docker Desktop, pass networkPrefix explicitly when automatic discovery sees the container network instead of your LAN.
discover_commands
All cached devices:
{}One device by UID, FUID, IP, or partial device name:
{
"deviceTag": "TinyDevBoard"
}The response includes per-module raw help plus a flattened commands list:
{
"module": "gameOfLife",
"function": "load",
"parameters": ["w=32", "h=16", "custom=None"],
"command": "gameOfLife load w=32 h=16 custom=None",
"signature": "load w=32 h=16 custom=None"
}Use password if the device requires micrOS app authentication.
How Tools Are Defined
MCP tools in this project have two layers:
MCP definition layer:
src/mcp-tools.tsThis is where the tool name, title, description, Zod input schema, and MCP response formatting live.Implementation layer:
src/tools/*.tsThis is where the actual micrOS behavior lives. These files should be plain TypeScript functions that can be used from MCP, tests, scripts, or the UI bridge.
src/tools.ts is only a collection barrel. It re-exports the tool functions and shared input/device types so src/mcp-tools.ts can import from one stable place.
The rough call path is:
MCP client
-> src/index.ts
-> registerMicrOSTools() in src/mcp-tools.ts
-> exported function from src/tools.ts
-> focused implementation in src/tools/<tool-name>.ts
-> shared micrOS helpers in src/tools/common.ts when neededAdd A New Tool
Create a focused implementation file under
src/tools/, for examplesrc/tools/reboot-device.ts.Add or reuse input types in
src/tools/common.ts. Keep types close to shared helpers only when more than one file needs them.Export the function from
src/tools.ts.Register the MCP tool in
src/mcp-tools.tswithserver.registerTool(...).Add a short README entry in the tool table or tool examples.
Run
npm run check.
Implementation example:
// src/tools/example-tool.ts
import { cacheToDevices, readDeviceCache } from "./common.js";
export type ExampleToolInput = {
query?: string;
};
export async function exampleTool(input: ExampleToolInput = {}) {
const cache = await readDeviceCache();
const devices = cacheToDevices(cache);
return {
query: input.query ?? null,
count: devices.length,
devices
};
}Barrel export:
// src/tools.ts
export type { ExampleToolInput } from "./tools/example-tool.js";
export { exampleTool } from "./tools/example-tool.js";MCP registration example:
// src/mcp-tools.ts
server.registerTool(
"example_tool",
{
title: "Example Tool",
description: "Describe what the tool does for MCP clients and humans.",
inputSchema: {
query: z.string().optional().describe("Optional filter text.")
}
},
async ({ query }) => textResult(await exampleTool({ query }))
);Tool responses should be JSON-serializable objects. If a tool can fail in a controlled way, prefer returning { ok: false, error: "..." }; src/mcp-tools.ts marks those responses as MCP errors when appropriate.
Device Cache
Default cache path:
data/device_conn_cache.jsonCache format:
{
"device_uid": ["ip-address", 9008, "device-fuid"]
}If the cache is missing or invalid, the server creates it with these defaults:
__devuid__:192.168.4.1, port9008, FUID__device_on_AP____localhost__:127.0.0.1, port9008, FUID__simulator__
The first cache read also attempts one automatic discovery and continues with whatever cache is available. Discovery is additive: it updates discovered devices but does not delete stale cached entries.
Docker
Build and export a standalone image:
npm run docker:buildDefaults:
image: microsmcp:latest
export: dist/microsmcp-docker-image.tar.gzCustomize:
npm run docker:build -- --image microsmcp:dev
npm run docker:build -- --output dist/microsmcp.tar
npm run docker:build -- --image microsmcp:dev --output dist/microsmcp-dev-docker-image.tar.gz
npm run docker:build -- --no-exportInstall an exported image on another machine:
docker load -i dist/microsmcp-docker-image.tar.gzRun as stdio MCP:
docker run --rm -i microsmcp:latest mcpRun the tester UI endpoint:
docker run --rm -p 3333:3333 microsmcp:latest uiPersist the device cache:
docker volume create microsmcp-data
docker run --rm -i -v microsmcp-data:/app/data microsmcp:latest mcp
docker run --rm -p 3333:3333 -v microsmcp-data:/app/data microsmcp:latest uiDocker network notes:
Direct commands to cached device IPs usually work if the container can route to your LAN.
Automatic
/24discovery uses the container's network interface by default.On Linux,
--network hostgives the container the host network view.On Docker Desktop, pass
networkPrefixexplicitly todiscover_deviceswhen needed.The UI binds to
0.0.0.0:3333inside Docker, so-p 3333:3333exposes it on the host.
Docker MCP client config:
{
"mcpServers": {
"microsmcp": {
"command": "docker",
"args": ["run", "--rm", "-i", "microsmcp:latest", "mcp"]
}
}
}Architecture
MCP means Model Context Protocol. It lets a client application start this server, list available tools, and call them with structured JSON arguments.
For this project, MCP is the adapter layer between a client and micrOS devices:
MCP client -> stdio -> micrOSMCP -> TCP socket -> micrOS deviceThe implementation mirrors the useful behavior of micrOS socketClient.py and micrOSClient.py, but it is standalone TypeScript and does not call Python.
Project structure:
src/index.ts: minimal MCP stdio bootstrap.src/mcp-tools.ts: MCP tool registration, names, descriptions, schemas, and response formatting.src/tools.ts: collection barrel that re-exports the tool implementations.src/tools/: individual tool implementations and reusable micrOS helpers.src/tools/common.ts: shared device cache, socket client, discovery, parsing, and concurrency helpers.src/ui.ts: local HTTP server for the browser tester UI.public/: browser UI files for calling MCP tools without an AI client.scripts/start.mjs: mode-aware starter for compiled MCP or UI entrypoints.scripts/docker-build.mjs: Docker build and image export helper.scripts/check.mjs: quick project sanity check.Dockerfile: minimal runtime image for stdio MCP or the tester UI endpoint.data/device_conn_cache.json: project-local micrOS device cache, created at runtime when needed.
Runtime flow:
MCP client calls a tool, for example
run_command.src/index.tsstarts the MCP server and registers tools throughsrc/mcp-tools.ts.src/mcp-tools.tsvalidates input through the MCP SDK/Zod schema and calls the matching function fromsrc/tools.ts.The matching file under
src/tools/reads the cache, selects a device, opens a TCP socket if needed, and performs the micrOS operation.The result is serialized as formatted JSON text and returned to the MCP client.
To add another tool, create a focused file under src/tools/, export it from src/tools.ts, then register its MCP schema in src/mcp-tools.ts. Shared micrOS behavior should stay in src/tools/common.ts only when it is useful to more than one tool.
Requirements
Node.js 20 or newer.
Network access from the host or container to micrOS devices on TCP port
9008.Docker, only if you want to build or run the container image.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BxNxM/micrOSMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server