Skip to main content

WebRTC Transport for Model Context Protocol

Project description

WebRTC Transport for Model Context Protocol

There are scenarios where neither STDIO nor StreamableHTTP transport can be used to connect an MCP client to an MCP server. WebRTC can often be used instead if there is some sort of signalling connection established between the two parties.

Usage

    from mcp_webrtc import webrtc_server_transport
    from aiortc.contrib.signaling import CopyPasteSignaling

    async with webrtc_server_transport(CopyPasteSignaling()) as (read, write):
        app.run(
            read, write, app.create_initialization_options()
        )
    from mcp import ClientSession
    from mcp_webrtc import webrtc_client_transport
    from aiortc.contrib.signaling import CopyPasteSignaling

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

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_webrtc-0.0.4.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

mcp_webrtc-0.0.4-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file mcp_webrtc-0.0.4.tar.gz.

File metadata

  • Download URL: mcp_webrtc-0.0.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_webrtc-0.0.4.tar.gz
Algorithm Hash digest
SHA256 e0c7cf1d285f2e9f34ba212560d9a9f85dda3c7c9aa2c3405455993ab80c9c2c
MD5 620071297b9394dfb2f4b3a62103ae28
BLAKE2b-256 373383fbbd54642a6182ca338e076bf0c0b600b7288504942305ab35358da0e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_webrtc-0.0.4.tar.gz:

Publisher: release.yml on pilartomas/mcp-webrtc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_webrtc-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: mcp_webrtc-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_webrtc-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 5ea9fca9388700a2a4b3fd65dc5db21a0b93051457053ab9c9b81c1e78fedfe3
MD5 0d0b1b06c5c7efe3a383d2e47bc7e865
BLAKE2b-256 4fe7e4cd19c6143d3ce662a2bd0f407c1d5290bea1f05a7158e8ae277b420bfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_webrtc-0.0.4-py3-none-any.whl:

Publisher: release.yml on pilartomas/mcp-webrtc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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