mcp-history
Listed as a planned pluggable history store backend for recording and reading back SCADA values, alongside the existing in-memory and SQLite stores.
Listed as a planned pluggable history store backend for recording and reading back SCADA values, alongside the existing in-memory and SQLite stores.
Provides a SQLite-backed history store (@cyanmycelium/mcp-history-sqlite / SqliteHistoryStore) that persists recorded SCADA values in a single local file, with aggregation performed in SQL, satisfying the IHistoryStore contract (time-axis reads, idempotent append, ranges, paging, aggregates, at-time reads, browse, delete).
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-history
History slots for an mcp-broker: one contract, history.v1, for recording and reading back SCADA values, addressed by UNS id, with pluggable stores.
MCP client ──> mcp-broker ──> slot "history" (HistoryBehavior)
│ one broker decision per UNS id, audited
└──> IHistoryStore: memory today; SQLite, DuckDB, MySQL nextThe contract has two forms that say the same thing:
IHistoryStore, the TypeScript interface a backend implements;the
history.*MCP tools, whichHistoryBehaviorderives from any implementation.
HistorySlotStore reaches a slot back as an IHistoryStore, and the conformance suite runs unchanged on both forms.
Design and decisions: docs/brief_history_slot.md (French).
Use
import { DirectTransport } from "@cyanmycelium/mcp-broker-provider";
import { McpServerBuilder } from "@cyanmycelium/mcp-core";
import { HistoryBehavior, MemoryHistoryStore, buildHistoryDeclaration } from "@cyanmycelium/mcp-history";
import { BrokerAccessGuard } from "@cyanmycelium/mcp-uns";
const transport = new DirectTransport("ws://localhost:3000/provider/history", { secret });
const server = new McpServerBuilder()
.withName("history")
.withTransport(transport)
.register(new HistoryBehavior(new MemoryHistoryStore(), new BrokerAccessGuard(transport.broker)))
.build();
await server.start();
await transport.broker.declare(buildHistoryDeclaration({ version: "1", namespace: "uns://site1" }));UNS ids and broker-decided access come from mcp-uns. new HistoryBehavior(store, guard, { payload: "structured" }) sends each result once, as structuredContent: with format: "columns", reads are 4 to 7 times smaller. On a bench without broker policy, pass its openGuard() instead of BrokerAccessGuard: everything is allowed and nothing is audited.
Related MCP server: witness
Tools
tool | broker capability, checked per id |
| none |
|
|
|
|
|
|
|
|
Packages
package | what |
| the contract, |
|
|
Writing a store
Implement IHistoryStore, then prove it:
import { describeHistoryStoreConformance } from "@cyanmycelium/mcp-history/conformance";
describeHistoryStoreConformance("SqliteHistoryStore", () => new SqliteHistoryStore({ path: ":memory:" }));The suite pins the shared semantics: time axis, idempotent append, [start, end) ranges, paging, every aggregate, at-time reads, browse by whole UNS segments, delete, request validation. computeBuckets and valueAtTime in the contract are the reference implementations; a backend that computes natively must give the same results.
Develop
npm install
npm run typecheck
npm test
npm run buildTests run against the sources. tests/broker.test.ts starts a real broker with @cyanmycelium/mcp-broker/testing; it needs no network beyond 127.0.0.1.
License
Apache-2.0.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Cross-vendor AI memory over MCP. One semantic store, readable and writeable from every MCP client.
Hosted MCP memory and agent control plane for durable conversations, jobs, and operations.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Append-only decisions with provenance, supersession, retrieval, and audited MCP actions.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for temporal state queries and cryptographic audit trails. Query historical entity state at any point in time, generate Merkle proofs of past state, and anchor contract snapshots for immutable provenance.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to query a dated, provenance-backed history distilled from any text stream, turning raw records into observations, bi-temporal facets, and narratives over MCP.12MIT
- AlicenseNot gradedqualityBmaintenanceEnables concurrent MCP clients to share a persistent SQLite-backed key-value memory store with semantic search, write attribution, and audit history.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to store, search, and resolve shared memories with full provenance, conflict detection, and an audit trail across MCP-compatible clients.MIT