MemorizedMCP-TS

PerkyZZ999/MemorizedMCP-TS

3.2

If you are the rightful owner of MemorizedMCP-TS and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

MemorizedMCP-TS is a Bun + TypeScript implementation of the Memorized MCP server, designed to provide a robust and flexible memory infrastructure for various applications.

MemorizedMCP-TS

Important: This MCP server has only been validated end-to-end with Cursor 2.0. Other IDEs or MCP hosts might require additional wiring or configuration changes. Contributions that broaden compatibility are very welcome!

MemorizedMCP-TS is a Bun + TypeScript implementation of the Memorized MCP server. It provides:

  • Hybrid memory infrastructure (SQLite + Vectra) with multi-layer support
  • Document intelligence with chunking, embeddings, FTS-backed search, and entity extraction
  • A knowledge graph service that links entities, relationships, and contextual metadata
  • A fully sandboxed run_code experience plus a rich multi-tool registry for discrete MCP calls
  • Operational tooling: migrations, scheduled jobs, backup/restore, schema generation, and analytics

Key architectural docs:

  • — overall topology and module layout
  • — database schema, embeddings, and KG storage
  • — tool definitions, schemas, and transport contracts
  • — in-depth usage guide (single vs multi tool)

Installation

bun install
cp .env.example .env    # customise configuration if required

The server relies on Bun ≥ 1.3.0. Ensure the configured TRANSFORMER_MODEL is available locally or via the network, and create the DATA_ROOT directories if you plan to persist data.

From npm (after publishing)

npm install memorizedmcp-ts
bunx memorizedmcp-ts --multi-tool   # launches the published stdio server

CLI flags:

FlagDescription
--config <path>Load an alternate .env file before bootstrapping
--multi-toolForce multi-tool registration (MCP_MULTI_TOOL=true)
--single-toolForce single-tool sandbox (MCP_MULTI_TOOL=false)
--env KEY=VALUEInject arbitrary environment overrides (repeatable)
--helpPrint CLI usage

All options map to the same environment variables used in self-hosted mode, so you can switch between single-tool and multi-tool behaviour without editing source code.


Quickstart

# Launch the published MCP server (multi-tool mode)
npx -y @perkyzz999/memorizedmcp-ts --multi-tool

# or force single-tool sandbox
npx -y @perkyzz999/memorizedmcp-ts --single-tool

For local development you can still run the source directly:

# Start in watch mode
bun run dev

# Or build + run the bundled output
bun run build
bun run start

Single-tool mode exposes a run_code tool with type-safe bindings:

const memory = await services.memory.addMemory({
  content: "User prefers dark mode",
  layer: "semantic",
  importance: 0.8,
});

const context = await services.knowledge.getEntityContext({
  entityId: "entity-id",
});

Toggle multi-tool mode by setting MCP_MULTI_TOOL=true (in .env or the process environment). The server will register every tool described in .


Cursor MCP Configuration

The published package is compatible with Cursor’s install link generator [Cursor MCP install links]:

{
  "memorizedmcp-ts": {
    "command": "npx",
    "args": [
      "-y",
      "@perkyzz999/memorizedmcp-ts",
      "--",
      "--multi-tool"
    ],
    "env": {
      "LOG_LEVEL": "info",
      "TRANSFORMER_MODEL": "Xenova/all-MiniLM-L6-v2",
      "DATA_ROOT": "~/.memorizedmcp"
    }
  }
}

Switch between modes by replacing --multi-tool with --single-tool, or omit the flag to defer to .env defaults. Additional overrides can be provided via repeated --env KEY=VALUE arguments.


Available Scripts

ScriptDescription
bun run devExecute the entrypoint with file watching
bun run startRun the compiled bundle in dist/
bun run buildBundle the server for distribution
bun run build:typesEmit declaration files into dist/types/
bun run lintStatic analysis via Biome
bun run formatAuto-format the codebase
bun run testExecute Vitest suites
bun run migrateApply database migrations
bun run generate-schemasProduce JSON Schemas from Zod definitions
bun run backup / bun run restore -- <dir>Data snapshot + restore helpers
bun run export:memories / import:memoriesJSONL import/export utilities
npm run prepare-releaseLint, test, build, emit declarations, regenerate schemas

Configuration

The server reads configuration from .env (via dotenv) plus runtime overrides. Important keys:

VariableDescriptionDefault
LOG_LEVELPino log levelinfo
DATA_ROOTRoot for SQLite, backups, vectra indices./data
SQLITE_URLPath to SQLite database./data/sqlite/memorized.db
TRANSFORMER_MODELTransformers.js model IDhash (replace with a real model)
MCP_MULTI_TOOLEnable multi-tool registryfalse
SINGLE_TOOL_TIMEOUT_MSSandbox timeout for run_code120000
CRON_*Cron expressions for scheduled jobssee .env.example

Refer to for deployment and scheduling guidance.


Publishing Workflow

Follow the steps in and , then run:

npm run prepare-release
npm publish --access public --tag latest   # or beta/rc as appropriate

The prepare-release script executes linting, tests, bundling, type emission, and schema generation so the tarball includes everything required to run the MCP server.


Security & Hardening Checklist

  • bun run test before every release
  • Review cron schedules (CRON_*) and sandbox timeout (SINGLE_TOOL_TIMEOUT_MS)
  • Store backups in secure storage and restrict filesystem permissions to DATA_ROOT
  • Use a vetted TRANSFORMER_MODEL; pre-warm embeddings if offline

Compatibility Notes

  • Fully tested with Cursor 2.0 (MCP host + IDE)
  • Other MCP clients may require modified transport wiring or additional glue code (startMcpServer, tool registration)
  • Report compatibility issues through GitHub issues so we can broaden out-of-the-box support

Contributing

  1. Fork the repository and create a feature branch
  2. Run bun run lint and bun run test before committing
  3. Update documentation (README, MCP guide, CHANGELOG) as needed
  4. Submit a PR describing how you tested the change (include IDE / MCP host details)

Thanks for using MemorizedMCP-TS! Complimentary feedback and feature requests are encouraged via GitHub issues or pull requests.