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
- 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/registeris the registration endpoint.http://localhost:8765/sseis the event stream endpoint(SSE).http://localhost:8765/messagesis the message endpoint(HTTP).
- 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
- Start Your MCP Gateway With
ipv6Support
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:
--hostis the host of the gateway.--portis the port of the gateway, default is8765.--ipv6is to enableipv6support, default isfalse.--log-levelis the log level of the gateway, default isINFO.--timeout-rpcis the timeout of communication with the MCP server, default is10s.--timeout-run-toolis the timeout to run the tool, default is120s.--sse-pathis the path of the event stream endpoint, default is/sse.--messages-pathis the path of the message endpoint, default is/messages.--auth-tokenis 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b4fdc52c98bd085560aa45b907318e3a7a9797804523c84d7c1db6871f118b4
|
|
| MD5 |
acd7ff2211f2b463009445cebf6096d3
|
|
| BLAKE2b-256 |
5dc9b9395d27e8f96a70de8aa7ce833c9f986fd5fa6a012ed39c0f3204fad348
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58830c67a338176f4f00f1a03705cffb439db8503c056f9136f41322a49f9739
|
|
| MD5 |
9c6ce692f27455456cdbbae9099ff83c
|
|
| BLAKE2b-256 |
09a5c5359088ba59855e617ebee304ffb9c0497ac25a7900aef7aa3b8949ddbe
|