MCP Catalogs
Home

mcp-typescript-sdk

by emqx·97·Score 47

A TypeScript SDK for implementing MCP over MQTT with full type safety, supporting both browser and Node.js environments.

developer-toolscommunicationai-llm
6
Forks
0
Open issues
3 mo ago
Last commit
2d ago
Indexed

Overview

This is a comprehensive TypeScript SDK for implementing the Model Context Protocol (MCP) over MQTT. It provides a clean, object-oriented API with proper TypeScript classes for creating both MCP servers and clients. The SDK supports automatic environment detection between browser (WebSocket) and Node.js (TCP) environments, ensuring seamless cross-platform functionality. It includes full type safety with Zod schema validation, automatic server discovery, and follows the MCP specification v2024-11-05.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Building cross-platform AI agents with browser control capabilities
you:Creating distributed systems with MCP communication over MQTT
you:Developing IoT applications with AI capabilities using MCP
you:What MQTT brokers are supported?
you:Does this work in browser environments?

When to choose this

Choose this SDK when building MCP applications that need to communicate between browser and Node.js environments, especially when you already use MQTT infrastructure or need reliable message queuing.

When NOT to choose this

Avoid this if you need direct HTTP/WebSocket MCP transport without MQTT dependency, or if your environment doesn't support MQTT brokers.

Tools this server exposes

2 tools extracted from the README
  • greet({ name: string, language?: 'en' | 'es' | 'fr' }) => Promise<{ content: Array<{ type: 'text', text: string }> }>

    Greet someone with a personalized message

  • calculate({ expression: string }) => Promise<{ content: Array<{ type: 'text', text: string }>, isError?: boolean }>

    Perform mathematical calculations

Comparable tools

mcp-server@modelcontextprotocol/server-nodemcp-sse-server

Installation

Installation

npm install @emqx-ai/mcp-mqtt-sdk

Claude Desktop Integration

Add to your Claude Desktop configuration:

{
  "mcpServers": {
    "mqtt-mcp": {
      "command": "npx",
      "args": ["@emqx-ai/mcp-mqtt-sdk"],
      "env": {
        "MQTT_HOST": "mqtt://localhost:1883"
      }
    }
  }
}

FAQ

What MQTT brokers are supported?
The SDK supports any standard MQTT broker including EMQX, Mosquitto, HiveMQ, and others. You can connect via mqtt:// for TCP or ws://wss:// for WebSocket connections.
Does this work in browser environments?
Yes, the SDK automatically detects browser environments and uses WebSocket connections instead of TCP. It works seamlessly in both Node.js and browser contexts.

On Hacker News

Recent discussion from the developer community.

Compare mcp-typescript-sdk with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.