post-cortex-daemon
HTTP / gRPC / SSE / stdio daemon for post-cortex. Ships the unified pcx CLI binary.
Hosts:
- the rmcp Model Context Protocol surface (streaming-HTTP + stdio transports),
- the tonic gRPC API (canonical post-cortex wire surface),
- the axum HTTP server with REST endpoints for the
pcxCLI client and the SSE broadcast plumbing, - the stdio bridge that lets MCP hosts spawn the daemon as a child process,
- the unified
pcxCLI binary ([[bin]] name = "pcx").
The daemon owns no domain logic — every read / write / search / manage operation delegates downward into post-cortex-memory.
Install
# Install the pcx CLI from crates.io
Or as a library dependency (e.g. to embed the daemon in your own bin):
[]
= "0.2"
Running the daemon
# Start the daemon (binds to 127.0.0.1:51900 by default)
# Status / stop
# Scaffold Claude Code integration in the current repo
Environment variables:
| Var | Default | Effect |
|---|---|---|
PC_HOST |
127.0.0.1 |
HTTP / SSE bind host |
PC_PORT |
51900 |
HTTP / SSE port |
PC_GRPC_PORT |
51901 |
gRPC port |
PC_DATA_DIR |
~/.post-cortex/data |
RocksDB data directory |
RUST_LOG |
info |
tracing-subscriber filter |
OTEL_EXPORTER_OTLP_ENDPOINT |
unset | OTLP collector endpoint (with otel feature) |
Features
| Feature | Default | What it enables |
|---|---|---|
embeddings |
yes | BERT + HNSW via post-cortex-embeddings/bert |
surrealdb-storage |
no | SurrealDB backend (forwards to post-cortex-memory) |
surrealdb-tikv |
no | SurrealDB + TiKV distributed KV |
otel |
no | OpenTelemetry OTLP exporter wiring |
Example: daemon with OTel
See examples/with_otel.rs for a runnable demo + local Jaeger collector docker-compose snippet.
License
MIT — see LICENSE.