Skip to main content

mcpport — A lightweight gateway & registry for Model Context Protocol (MCP), enabling standardized connectivity for AI applications.

Project description

mcpport

mcpport — A lightweight gateway & registry for Model Context Protocol (MCP), enabling standardized connectivity for AI applications.

Quick Start

  1. Start your MCP Gateway
uvx mcpport gateway

It will start the gateway on port 8765 by default. And the common access points are:

  • ws://localhost:8765/mcp/register is the registration endpoint.
  • http://localhost:8765/sse is the event stream endpoint(SSE).
  • http://localhost:8765/messages is the message endpoint(HTTP).
  1. Register your MCP Server to the Gateway
uvx mcpport register \
--stdio "npx -y @modelcontextprotocol/server-filesystem ./" \
--gateway-url="ws://localhost:8765/mcp/register" \
--server-name "file"

It will register a MCP server named file to the gateway. The server is a simple file system server, which is implemented by @modelcontextprotocol/server-filesystem.

Authentication

You can use --auth-token to set the auth token for the gateway.

uvx mcpport gateway --auth-token "my-token1" --auth-token "my-token2"

The default authentication method is Bearer token(Set to Authorization header).

If you set the auth token for the gateway, you need to set the same auth token for the MCP server when you register it.

uvx mcpport register \
--stdio "npx -y @modelcontextprotocol/server-filesystem ./" \
--gateway-url="ws://localhost:8765/mcp/register" \
--server-name "file" \
--header "Authorization: Bearer my-token1"

And you must set the auth token for SSE connections. You can set the auth token in the Authorization header.

Advanced Usage

  1. Start Your MCP Gateway With ipv6 Support
uvx mcpport gateway --host "::" --ipv6

Other options are also available, you can use uvx mcpport gateway --help to get more information.

There are some options for the gateway:

  • --host is the host of the gateway.
  • --port is the port of the gateway, default is 8765.
  • --ipv6 is to enable ipv6 support, default is false.
  • --log-level is the log level of the gateway, default is INFO.
  • --timeout-rpc is the timeout of communication with the MCP server, default is 10s.
  • --timeout-run-tool is the timeout to run the tool, default is 120s.
  • --sse-path is the path of the event stream endpoint, default is /sse.
  • --messages-path is the path of the message endpoint, default is /messages.
  • --auth-token is the auth token for the gateway, (can be used multiple times).

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

mcpport-0.1.3.tar.gz (61.2 kB view details)

Uploaded Source

Built Distribution

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

mcpport-0.1.3-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file mcpport-0.1.3.tar.gz.

File metadata

  • Download URL: mcpport-0.1.3.tar.gz
  • Upload date:
  • Size: 61.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for mcpport-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7b4fdc52c98bd085560aa45b907318e3a7a9797804523c84d7c1db6871f118b4
MD5 acd7ff2211f2b463009445cebf6096d3
BLAKE2b-256 5dc9b9395d27e8f96a70de8aa7ce833c9f986fd5fa6a012ed39c0f3204fad348

See more details on using hashes here.

File details

Details for the file mcpport-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: mcpport-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.9

File hashes

Hashes for mcpport-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 58830c67a338176f4f00f1a03705cffb439db8503c056f9136f41322a49f9739
MD5 9c6ce692f27455456cdbbae9099ff83c
BLAKE2b-256 09a5c5359088ba59855e617ebee304ffb9c0497ac25a7900aef7aa3b8949ddbe

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