Skip to main content

Extend the Model Context Protocol (MCP) to edge and IoT devices: a bridging gateway, a lightweight MCP-Lite server, and a four-tier device taxonomy.

Project description

MCP-Edge

CI

Extend the Model Context Protocol (MCP) to edge and IoT devices.

MCP-Edge lets cloud LLM agents discover and invoke physical hardware through the same tool interface they already use for software APIs. It provides:

  • a gateway that bridges cloud-native MCP transports (SSE / HTTP) to constrained device channels (UART, BLE, local Wi-Fi), presenting every downstream device as a standard MCP tool provider;
  • MCP-Lite, a lightweight MCP server for devices with as little as ~512 KB of RAM;
  • a four-tier device taxonomy (constrained MCUs, smart IoT nodes, BLE-only wearables, Linux-class edge computers) that maps an MCP strategy to each tier;
  • protocol adaptations for constrained links: CBOR encoding, schema caching, connection pooling, and offline request buffering.

Status: alpha, under active development. The public API is unstable and will change. This repository is a reference implementation of the framework described in the MCP-Edge paper (IEEE Cloud Summit 2026). Performance figures reported in the paper are projected estimates, not measurements taken from this codebase. This release exercises the full gateway path against simulated devices; real serial/BLE/Wi-Fi transports arrive in a later version.

Installation

Requires Python 3.10+.

pip install mcp-edge

For development, install from source:

git clone https://github.com/jemsbhai/mcp-edge
cd mcp-edge
pip install -e ".[dev]"

Quickstart

Run a demo gateway — an MCP server exposing two simulated devices over stdio:

mcp-edge run --demo

This serves a simulated sensor (read_temp, read_humidity) and a simulated ring (heart_rate), each tool namespaced by device (sensor-01/read_temp, ...). To drive it from an MCP client such as the MCP Inspector or Claude Desktop, configure a stdio server with command mcp-edge and arguments ["run", "--demo"]. The process logs to stderr and waits for a client on stdin.

Use the gateway as a library:

import asyncio

from mcp_edge.client import MCPLiteClient
from mcp_edge.devices import SimulatedDevice
from mcp_edge.gateway import Gateway
from mcp_edge.registry import DeviceRegistry
from mcp_edge.tiers import Tier
from mcp_edge.transports import LoopbackTransport


async def main() -> None:
    device = SimulatedDevice("sensor-01")
    device.add_tool("read_temp", lambda args: {"celsius": 21.5})

    transport = LoopbackTransport(device.handle)
    await transport.open()

    registry = DeviceRegistry()
    registry.register("sensor-01", MCPLiteClient(transport), Tier.SMART_NODE)

    gateway = Gateway(registry)
    print([tool["name"] for tool in await gateway.list_tools()])  # ['sensor-01/read_temp']
    print(await gateway.call_tool("sensor-01/read_temp", {}))     # {'celsius': 21.5}


asyncio.run(main())

Roadmap

  • v0.1 — gateway core, in-process (loopback) transport, protocol adaptations (CBOR, schema caching, connection pooling, offline buffering), device simulator, health monitor, CLI, hermetic CI
  • v0.2 — real transports (pyserial UART/USB, BLE, Wi-Fi/mDNS) and Wokwi firmware-in-the-loop tests (Arduino / ESP32 / RP2040)
  • v0.2+ — Edge Impulse (inference as an MCP tool) and Arduino IoT Cloud (properties as MCP) integration examples; Renode / QEMU backends

Development

pip install -e ".[dev]"
pytest -q
ruff check .

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_edge-0.1.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_edge-0.1.0-py3-none-any.whl (21.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_edge-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_edge-0.1.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for mcp_edge-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1442e142f4f04475f48f266d1633d3e149a62893e1920fc9c9ef07df7c43fba5
MD5 32be53a0f658e096f4a1e1f368d628ad
BLAKE2b-256 466c661edea16dfee40f97f0c02607a9bfdf0d8a29180aebb7f744383af9024e

See more details on using hashes here.

File details

Details for the file mcp_edge-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_edge-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for mcp_edge-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d41fbfb8eafe48643dba2c17e8f6acd51b901618f5542a45c7e83ca9d66e31d6
MD5 250b8ce1070d7f117f370e6f02c2adf9
BLAKE2b-256 066f3cc7f87d0966fd3fcaa2b90022bff7afde8da40c6b407144384e4c0bb767

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page