DESCRIPTION

A Mojolicious application exposing one shared memory/skills store over MCP, so every agent on the network reads and writes the same data instead of keeping its own copy. See SPEC.md for the problem it solves.

Entries live in Postgres and are append-only: each save adds a revision rather than replacing one, so the history SPEC.md expected from git survives the move into the database.

Callers are agents, authenticated by a named token (see MCP::Server::KnowledgeStore::Command::token) and nothing more - no accounts, no sessions. A token's name is recorded as the author of everything it writes.

This is a bare Mojolicious application - no UI, no templates. An admin interface over the same store, if one gets built, is a separate project talking to this one over MCP like any other agent, not something bolted onto this app's base class.

SYNOPSIS

MCP_KS_PG=postgresql://mcp_ks@db/mcp_ks \
MCP_KS_TOKEN=secret \
  ./bin/mcp-ks daemon -l 'http://*:3000'

# then, from any MCP client
https://mcp-memory.internal.lan/mcp

CONFIGURATION

Environment variables win over mcp-ks.conf.

ATTRIBUTES

store

The MCP::Server::KnowledgeStore::Store the tools operate on, built from the configuration above.

mcp_server

The assembled MCP::Server - see MCP::Server::KnowledgeStore::Tools. Exposed so a tool can be registered on it after startup, which is how the test suite verifies token attribution without depending on any resource plugin.

METHODS

startup

Migrates the database, mounts the MCP endpoint at /mcp behind bearer-token authentication, and a /health check that verifies the database is reachable.

SEE ALSO

MCP::Server::KnowledgeStore::Store, MCP::Server::KnowledgeStore::Tools, MCP::Server.