MoniKa MCP
This directory provides two authenticated Streamable HTTP MCP services:
monika-mcp: lists chatroom databases, reports DEK availability, reads bounded decrypted message rows, and checks for messages after a Unix timestamp.monika-mcp-router: concurrently probes several instances and routes an allow-listed read tool to a named instance.
Raw DEKs never appear in MCP responses. Both services require the monika:read bearer-token scope. They bind to loopback by default; use a TLS reverse proxy for remote access. Plain HTTP instance URLs are rejected except on loopback.
Install
From the repository root:
uv sync --all-packages
uv run --package monika-mcp monika-mcp
Create an opaque token, then configure its SHA-256 digest (not the token itself):
$token = python -c "import secrets; print(secrets.token_urlsafe(32))"
$digest = python -c "import hashlib,sys; print(hashlib.sha256(sys.argv[1].encode()).hexdigest())" $token
$env:MONIKA_MCP_TOKENS_JSON = '{"' + $digest + '":{"client_id":"local-client","scopes":["monika:read"],"expires_at":1893456000}}'
For an instance, set MONIKA_USER_DIR and MONIKA_MCP_ISSUER_URL; optionally set MONIKA_CACHE_DB and MONIKA_MCP_PUBLIC_URL, then run monika-mcp. The issuer is mandatory so a deployment cannot accidentally advertise a fake authorization server.
For the router, copy instances.example.json outside the repository, restrict its filesystem ACL because it contains upstream bearer tokens, set MONIKA_MCP_INSTANCES to that path, and run monika-mcp-router. Router callers use a separate token configured through MONIKA_MCP_TOKENS_JSON.
Maintainers: see PUBLISHING.md for the PyPI Trusted Publishing setup and release procedure.
The included opaque-token verifier is suitable for a small private deployment when tokens are generated randomly, scoped, short-lived, and distributed securely. For centrally managed deployments, replace it with JWT signature/audience validation or RFC 7662 introspection against your OAuth 2.1 authorization server. Configure real issuer/resource URLs and terminate TLS at a trusted reverse proxy. Do not expose either default loopback HTTP port directly.
Release files for monika-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)
| File | Size | Uploaded | |
|---|---|---|---|
| monika_mcp-0.1.0.tar.gz | 11.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| monika_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.8 kB
Release files / monika_mcp-0.1.0.tar.gz
| Download URL | monika_mcp-0.1.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d9541becadd79e5b31b7aea045844bf5ab977d191a8278d66b74d4c700a0d22d
|
|
BLAKE2b-256 checksum How to use checksums |
c5267e893aea474a418a57a940cfea6dc11db633d493c718b659f775e27fa4a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency logRelease files / monika_mcp-0.1.0-py3-none-any.whl
| Download URL | monika_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16ff2ae4894ee2c75cc9acfff9c4b0383e51223a95fffefbc200ed8ceae4fcbe
|
|
BLAKE2b-256 checksum How to use checksums |
e982ba4e5bdf5384699593fc59d6202a52c0e6e89b2b53530015cc5a71e137ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency log