1. Conduid
  2. AI
  3. Webrtc
MCP server · AI

Webrtc

WebRTC Transport for Model Context Protocol

Unclaimed ai
37Low

Scored 7 months ago · breakdown

About Webrtc

Webrtc is an MCP server in the AI category: webRTC Transport for Model Context Protocol.

Install

Claude Code
claude mcp add webrtc -- npx -y mcp-webrtc
npx
npx -y mcp-webrtc

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Webrtc

Powered by Claude · Grounded in docs

I know everything about Webrtc. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

WebRTC Transport for Model Context Protocol

The Model Context Protocol (MCP) is an open standard for connecting AI applications to external systems, such as tools and data sources. It defines several transport mechanisms for client-server communication, including STDIO (over standard input/output) and Streamable HTTP (for web-based streaming).

However, there are scenarios—such as in browser environments or firewalled networks—where neither STDIO nor Streamable HTTP can effectively connect an MCP client to an MCP server. In these cases, WebRTC provides a peer-to-peer alternative, leveraging real-time communication capabilities, provided a signaling connection (e.g., via WebSockets or another channel) is established between the parties.

This repository implements a WebRTC-based transport layer compatible with the MCP specification, enabling seamless integration in constrained networking setups.

Installation

Python

pip install mcp-webrtc

Typescript

npm install mcp-webrtc

Example

For instance, a remote Agent-to-Agent (A2A) agent might need to leverage a local Model Context Protocol (MCP) server to access the filesystem on the A2A client's host. The A2A Protocol, developed by Google, enables secure inter-agent communication and complements MCP by facilitating agent-to-agent interactions. In this setup, the scenario unfolds as follows:

---
config:
  layout: dagre
  look: neo
  theme: mc
---
flowchart LR
    subgraph Local["Desktop"]
        direction TB
        AC["A2A Client"]
        MS["MCP Server"]
    end
    subgraph Remote["Cloud"]
        direction TB
        AS["A2A Server"]
        MC["MCP Client"]
    end
    AC <-- A2A --> AS
    MS <-- MCP --> MC

Directly connecting the MCP client on the remote A2A agent to the local MCP server over HTTP may be impractical due to Network Address Translation (NAT) traversal challenges or firewall restrictions. Even in scenarios without NATs, authentication is crucial to verify that the connection originates from the legitimate agent and no one else.

As an alternative, the established A2A connection serves as the signaling channel for WebRTC. It exchanges the necessary WebRTC signaling data (e.g., SDP offers/answers and ICE candidates), enabling a secure, peer-to-peer MCP connection to be established despite network constraints.

Usage

Server

    from mcp_webrtc import webrtc_server_transport
    from aiortc.contrib.signaling import TcpSocketSignaling
    from mcp.server.lowlevel import Server
    from mcp.types import Tool

    app = Server("mcp-greeter")

    @app.list_tools()
    async def list_tools() -> list[Tool]:
        return [
            Tool(
                name="greet",
                description="Greets the caller",
                inputSchema={
                    "type": "object",
                    "required": [],
                    "properties": {},
                },
            )
        ]

    async with webrtc_server_transport(TcpSocketSignaling("localhost", 8000)) as (read, write):
        await app.run(
            read, write, app.create_initialization_options()
        )

Client

    from mcp import ClientSession
    from mcp_webrtc import webrtc_client_transport
    from aiortc.contrib.signaling import TcpSocketSignaling

    async with (
        webrtc_client_transport(TcpSocketSignaling("localhost", 8000)) as (
            read,
            write,
        ),
        ClientSession(read, write) as session,
    ):
        await session.initialize()
        result = await session.list_tools()
        print(result.tools)

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Webrtc

How do I install Webrtc?

Run claude mcp add webrtc -- npx -y mcp-webrtc, then add the server to your MCP client's configuration.

Is Webrtc safe to use with an AI agent?

Its trust score is 37 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Webrtc still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.