Sandbox
@golioth/tinymcp

MCP server for Golioth device control

tinymcp runs locally and connects to devices through the Golioth management API. It reads RPC schemas from LightDB State and exposes them as MCP tools, so builders can trigger device actions from an MCP client.

157 stars6 forksGoUpdated 1y ago
Who it's for

Builders who want an MCP client to control embedded devices on Golioth.

What it delivers

You can call device RPCs from your agent instead of building a custom control path.

What it does

Exposes device RPCs as MCP tools

Reads tool schemas from `mcp/tools/schema` in LightDB State and publishes them through MCP.

Works with existing devices

Uses Golioth LightDB State and RPCs, so existing devices can expose controls without firmware changes.

Local server with remote device access

Runs on your machine and talks to the device through the Golioth management API.

Blinky firmware example

Includes `examples/blinky` to demonstrate LED control through the server.

Gemini CLI auto-setup

Provides `.gemini/settings.json` so Gemini CLI can connect to a local `tinymcp` server when started in the repo.

How to get it

  1. 1While existing devices can be used without changing the firmware, if you don't already…
    west init -l .
  2. 2Or, to use the downstream Nordic nRF Connect SDK.
    west init -l . --mf west-ncs.yml
  3. 3With your workspace initialized, use west update to fetch necessary modules and libraries.
    west update --narrow -o=--depth=1
  4. 4In order to run the tinymcp MCP server locally, the following environment variables need…
    TINYMCP_PROJECT=<your-golioth-project-id>
    TINYMCP_DEVICE=<your-golioth-device-id>
    TINYMCP_API_KEY=<api-key-for-your-golioth-project>
  5. 5With the tinymcp MCP server running locally, it can be added to Claude Code with a…
    claude mcp add --transport http tinymcp http://localhost:8080 -H 'Authorization: Bearer none'

README

tinymcp

Let LLMs control embedded devices via the Model Context Protocol.

[!WARNING] tinymcp is an experimental project. Expect frequent breaking changes. Extreme caution should be taken when delegating physical capabilities to AI systems.

Background

The tinymcp project includes an MCP server, which is executed locally, but communicates with remote devices via the Golioth management API. It uses two existing device services on the Golioth platform, LightDB State and Remote Procedure Calls (RPCs), to expose device functionality via MCP.

RPCs can be exposed as tools by including a schema in on the mcp/tools/schema path in LightDB State. Because LightDB State can be updated by devices or users, RPCs on existing devices can be exposed without needing to modify the device firmware.

Setup

To use tinymcp, you need to connect a device to the Golioth platform, then run the tinymcp server on your local machine.

Firmware

While existing devices can be used without changing the firmware, if you don't already have a device on Golioth, the blinky example provides a simple demonstration of how to expose LED control to an LLM via tinymcp. It uses Zephyr RTOS, which requires setting up dependencies before building. After doing so, you can initialize your workspace with one of the following commands.

west init -l .

Or, to use the downstream Nordic nRF Connect SDK.

west init -l . --mf west-ncs.yml

With your workspace initialized, use west update to fetch necessary modules and libraries.

west update --narrow -o=--depth=1

You are now ready to build the firmware and flash your device. See the blinky documentation for more information.

Server

In order to run the tinymcp MCP server locally, the following environment variables need to be supplied.

TINYMCP_PROJECT=<your-golioth-project-id>
TINYMCP_DEVICE=<your-golioth-device-id>
TINYMCP_API_KEY=<api-key-for-your-golioth-project>

The server can be built into an executable using go build -o tinymcp ./server or run directly with go run ./server.

If you don't already have a device on Golioth, the blinky example demonstrates how to expose LED control to an LLM via tinymcp. See the documentation to build and flash on your device, then expose the registered RPCs in your MCP schema.

There are many MCP client implementations, most of which should be compatible with tinymcp. Setup for a few popular options are listed below.

MCP Inspector

MCP Inspector is a visual testing tool for MCP servers. It allows you to interact with MCP methods directly, rather than going through an LLM. This can be useful when troubleshooting why an LLM may be failing to interact with your device.

The documentation provides information on how to quickly start the inspector. Once it is running, you can point it to your local tinymcp MCP server by entering http://localhost:8080 as the address and clicking Connect. You should be presented with an option to List Tools, which should result in all of the RPCs in your schema being exposed.

Claude Code

Claude Code is an agentic coding tool that you interact with in the terminal.

With the tinymcp MCP server running locally, it can be added to Claude Code with a single command.

claude mcp add --transport http tinymcp http://localhost:8080 -H 'Authorization: Bearer none'

[!NOTE] The Authorization header is supplied in this case to indicate to Claude Code that it should not attempt to authenticate via the OAuth flow.

Gemini CLI

The Gemini CLI is an open-source AI agent that allows you to access Gemini from the terminal.

The .gemini/settings.json file in this repository will automatically configure the CLI to connect to a locally running tinymcp MCP server if the CLI is started in this repository.

Files in the repo

Repository payload11 top-level entries
  • .gemini
  • examples
  • server
  • .clang-format
  • .gitignore
  • go.mod
  • go.sum
  • LICENSE
  • README.md
  • west-ncs.yml
  • west.yml

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k