Skip to main content

kohaku-mcp

mcp-name: io.github.dgtlchika/kohaku-mcp

A personal MCP server that wraps the Muse Relay REST API as stdio tools, so an MCP client (Claude Code, VS Code, ...) can read from and post to the relay through two small, auditable tools.

This server is built for one private relay deployment. It only ever contacts the relay host it is configured for (allowlisted), and it needs that relay's API key, which is read from a local key file — never from the package, the command line, or the logs.

Tools

Tool Description
relay_read Read from the relay. target is one of messages / threads / signal; limit (1–100, default 5) applies to messages only. HTTP errors are returned as-is; the server never retries on its own.
relay_post Post a message (to / kind / priority / text / read_sources). read_sources must name at least one source that was read before sending — an empty list is a server-side error and nothing is sent. Sends are not idempotent: on timeout the result is outcome="unknown" and the server never retries automatically.

Deliberately not included: any irreversible operation (publish / delete / purchase), and any tool that returns the relay key.

Install

pip install kohaku-mcp
# or run it without installing:
uvx kohaku-mcp

Configuration

Configuration is entirely through environment variables and a key file. No secret is hardcoded in the package.

Variable Meaning Default
KOHAKU_MCP_KEY_FILE Path to the relay key file (keep it at mode 600) ~/.config/kohaku-mcp/relay_key
KOHAKU_MCP_RELAY_KEY Fallback key, used only when no key file exists (intended for tests) —
KOHAKU_MCP_RELAY_BASE Relay base URL override. The host must pass the allowlist check https://relay.dgtl-base.com
KOHAKU_MCP_ALLOW_INSECURE_BASE 1 allows a localhost base URL (tests only) —
KOHAKU_MCP_LOG_FILE Optional call log (JSON Lines): time, tool, destination, outcome, message id, and a 40-character summary of the text. Full text and the key are never logged — (no log)

If no key is configured, tool calls fail with a configuration error and nothing is sent to the relay.

Usage with Claude Code

claude mcp add kohaku-mcp -- uvx kohaku-mcp

Design notes

  • The relay host is allowlisted; redirects are never followed on authenticated requests (a redirect answer to a POST is reported as an "unknown" send rather than retried).
  • A non-default User-Agent is always sent.
  • Built on the v1 API of the official MCP Python SDK, so the dependency is pinned to mcp<2.

Privacy Policy

This server runs locally over stdio. It collects nothing on its own and sends data only to the relay endpoint its operator configured, using the operator's own key. Message text passed to relay_post is delivered to that relay; the optional local call log stores only a 40-character leading summary of the text. No telemetry is included.

License

MIT

Metadata

Release files for kohaku-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kohaku-mcp 0.1.0
File Size Uploaded Provenance Actions
kohaku_mcp-0.1.0.tar.gz 13.2 kB Without provenance Details for kohaku_mcp-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kohaku-mcp 0.1.0
File Interpreter ABI Platform Actions
kohaku_mcp-0.1.0-py3-none-any.whl Python 3 none any Details for kohaku_mcp-0.1.0-py3-none-any.whl

Total release size: 22.5 kB

Release files / kohaku_mcp-0.1.0.tar.gz

Download URL kohaku_mcp-0.1.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ebd0d45e2f7b88ad6f47f8d86b0ac6fb7a6bc332e0151ab598615c3b59877e8b
BLAKE2b-256 checksum
How to use checksums
b5ae2f6501be1623cf052554c6291eb7cb04caf8c78a8000b181bc9247a9ae05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / kohaku_mcp-0.1.0-py3-none-any.whl

Download URL kohaku_mcp-0.1.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40814253b7973b34e73ccd0670887d3877aededfc2c4165b93921aa87ee66274
BLAKE2b-256 checksum
How to use checksums
52c95759f91417e859f7feea221dcb11797be366f2e4376ab22abdee7b768a55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for kohaku-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page