strict-log-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@strict-log-mcplog that writer finished task 42 with summary DONE: fixed CSV quoting"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
strict-log-mcp
An append-only MCP server for agent logs. It checks every entry against rules you declare and refuses the ones that break them.
Why this exists
I run a team of AI agents that log their own work: what they finished, what a reviewer sent back, which files they changed. Those logs are the only reliable answer to "was this already done?", so they have to be correct.
For months the rules lived in the agents' instructions: never edit a log by hand, always take the timestamp from a real clock, quote commas in CSV, use only known agent names. The agents read those rules and broke them anyway. They extrapolated timestamps from earlier entries, so the log drifted into the future. They "fixed" old lines in place. They wrote unquoted commas that shifted CSV columns. A sandbox that saw the files through a cached mount mangled umlauts. Every time, the answer was a sharper rule, and the next run broke it again.
So I moved the rules out of the prompt and into code. The agent can no longer write a log file directly; it can only ask this server to append an entry. If the entry is invalid, the server rejects it, says why, and the file stays untouched. The agent has to fix the entry and try again.
Related MCP server: Hivemind
How it works
Declared logs only. A JSON config lists every log (JSONL or CSV), where it lives and which rules each field must satisfy. Each log becomes one
log_add_<name>tool, and nothing outside the config can be written.Validate, then append. Required fields, types, regex patterns, enums, length and range limits, unique values, and "not in the future" timestamps are checked before a byte is written.
Append-only. There is no edit or delete tool. Before writing, the server checks that the file ends cleanly. Afterwards it confirms that exactly one line was added.
Contained paths. Per-call CSV targets (for example one
CHANGELOG.csvper project folder) must resolve inside the root, must have the configured file name and must already exist as a folder.UTF-8 throughout. Entries are stored verbatim (
ensure_ascii=False), so umlauts survive.
A rejected call comes back as an MCP tool error with a list of reasons:
{
"success": false,
"errors": [
"FUTURE: ts=2999-01-01T00:00:00+00:00 lies in the future (now is 2026-10-23T12:20:30+00:00)",
"VALUE: agent='x' is not one of ['planner', 'writer', 'reviewer']",
"FORMAT: summary='y' does not match '^DONE: '"
]
}Installation
You need Python 3.10+ and uv (or pipx).
uvx --from git+https://github.com/michael-schilde/strict-log-mcp strict-log-mcp --config path/to/config.json --check--check validates the config and prints the tools it would expose. Then register the server with your MCP client, for example in Claude Desktop's claude_desktop_config.json:
{
"mcpServers": {
"strict-log": {
"command": "uvx",
"args": [
"--from", "git+https://github.com/michael-schilde/strict-log-mcp",
"strict-log-mcp", "--config", "/absolute/path/to/config.json"
]
}
}
}Instead of --config you can set the STRICT_LOG_CONFIG environment variable.
Configuration
See examples/config.example.json for a complete config with an activity log, a corrections log and per-folder changelogs. A minimal log looks like this:
{
"root": "./workspace",
"logs": {
"activity": {
"format": "jsonl",
"path": "logs/activity.jsonl",
"timestamp_field": "ts",
"allow_extra_fields": false,
"fields": {
"ts": { "required": true, "not_in_future": 120 },
"agent": { "required": true, "enum": ["planner", "writer", "reviewer"] },
"summary": { "required": true, "pattern": "^DONE: ", "maxlen": 500 },
"task_id": { "unique": true }
}
}
}
}Relative paths in the config are resolved against the folder that contains the config file.
Log key | Meaning |
|
|
| One fixed file, relative to |
| Alternative to |
| CSV only: column names and their order; a header row is written to new files |
| Rules per field or column (see below) |
|
|
| Field that |
Field rule | Meaning |
| Field must be present and non-empty |
|
|
| Regex the value must contain a match for; anchor with |
| List of allowed values |
| Numeric range and maximum string length |
| Value must not already exist in that file |
| ISO date or datetime (with UTC offset) must not be in the future; |
| Shown to the agent in the tool schema |
Tools
Tool | Purpose |
| Validate and append one entry ( |
| Return the last |
| Reachability, entry count and last timestamp of each fixed log |
Limits
One writer. Appends are serialised inside a single server process. Two server instances, or another program writing to the same file, can still race.
No corrections. That is deliberate: a wrong entry stays, and you fix it by hand or with a follow-up entry. If your workflow needs edits, this is the wrong tool.
Full-file reads. Uniqueness checks and line counting read the whole file on each append. That is fine for thousands of lines, not for millions.
Validation is only as good as the config. The server enforces structure, not truth. An agent can still log a well-formed entry about work it never did.
Clock trust.
not_in_futurecatches guessed timestamps that run ahead. It cannot catch made-up ones that lie in the past.Platforms. I use it on Windows. CI runs the tests on Linux and Windows; macOS should work but is not tested.
Development
uv sync
uv run pytest
uv run ruff check . && uv run ruff format --check .
uv run mypyAbout
I built this with Claude Code. It is the generalised version of a log server that has been running in my own agent setup every day since mid-2026. Issues and pull requests are welcome.
License
MIT © Michael Schilde
This server cannot be deployed
Maintenance
Related MCP Connectors
Immutable event logging and audit trail for agent transactions
Verified AI-agent outcomes: secret scanning, JSON cleanup, dedupe, anomaly and schema checks.
Signed, publicly logged records of what your AI agent did, with proofs anyone can check offline.
Signed, append-only receipts of an AI agent's decisions and outcomes, with public proof links.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMetered log ingestion server for autonomous agents, allowing NDJSON log posting with USDC payment per line on Base L2. Agents can freely tail and search their own logs with configurable retention tiers.MIT
- FlicenseNot gradedqualityDmaintenancePersistent, append-only event log for AI agent coordination, enabling agents to publish, query, and react to structured events across tools and sessions.10 npm1-
- AlicenseBqualityAmaintenanceEnables agents to create and manage persistent task logs, decisions, dead ends, questions, and handoffs, with file staleness detection and activity reporting.2302MIT
- AlicenseAqualityBmaintenanceProvides tamper-evident, hash-chained logging for MCP agents, enabling append, verification, and artefact-binding of action records.5MIT