Zero-env-config credential relay for MCP servers
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
mcp-relay-core
Zero-config credential relay client for Python MCP servers -- ECDH P-256 + AES-256-GCM E2E encryption.
Installation
pip install mcp-relay-core
Usage
Resolve config (env vars -> config file -> defaults -> relay)
from mcp_relay_core import resolve_config
result = resolve_config("my-server", ["api_key", "endpoint"])
if result.config:
print(f"Config loaded from {result.source}: {result.config}")
else:
# No config found -- trigger relay setup
pass
Relay session (interactive credential setup)
import asyncio
from mcp_relay_core import create_session, poll_for_result, write_config
async def setup():
session = await create_session(
"https://relay.example.com",
"my-server",
{
"fields": [
{"name": "api_key", "label": "API Key", "type": "password"},
{"name": "endpoint", "label": "Endpoint", "type": "text"},
]
},
)
print(f"Open this URL to enter credentials: {session.relay_url}")
credentials = await poll_for_result("https://relay.example.com", session)
write_config("my-server", credentials)
asyncio.run(setup())
Crypto primitives
from mcp_relay_core import (
generate_key_pair,
export_public_key,
derive_shared_secret,
derive_aes_key,
encrypt,
decrypt,
)
Documentation
See the main repository for full documentation, architecture, and security properties.
License
MIT
Project details
Release history Release notifications | RSS feed
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 mcp_relay_core-1.0.7.tar.gz.
File metadata
- Download URL: mcp_relay_core-1.0.7.tar.gz
- Upload date:
- Size: 61.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d43dc230a240964b92ec05f480fdebf8628a76bb27e0cb78d274983887f9b141
|
|
| MD5 |
05949c9b367da3bad5839c6b5a2312e9
|
|
| BLAKE2b-256 |
ece71c7db3a0a1223d19eb3aab5a1d36a243509692fd081b3f2b7e139a018b95
|
File details
Details for the file mcp_relay_core-1.0.7-py3-none-any.whl.
File metadata
- Download URL: mcp_relay_core-1.0.7-py3-none-any.whl
- Upload date:
- Size: 41.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fba54071f11d296f1d5f0bbbf55a9017b40b9bad8ab85ae33ac72884d9238b81
|
|
| MD5 |
81a06b1f3cbfafc070bed23d8f172293
|
|
| BLAKE2b-256 |
71a3b84293641d6882159aa9acb6b5aa4e63ba4189043d71dbb519233c277b42
|