Skip to main content
Glama

Memory Bank MCP Server

by t3ta
README.md1.67 kB
# @memory-bank/schemas Schema definitions for Memory Bank system. This package provides schemas for JSON data validation and type checking. ## Installation ```bash npm install @memory-bank/schemas # or yarn add @memory-bank/schemas ``` ## Usage ```typescript import { TagSchema, FlexibleDateSchema } from '@memory-bank/schemas'; // Validate data using schemas const tagResult = TagSchema.safeParse('example-tag'); if (tagResult.success) { // Validation succeeded const validTag = tagResult.data; // ... } else { // Validation failed console.error(tagResult.error); } // Parse dates flexibly const dateResult = FlexibleDateSchema.safeParse('2025-03-27T12:00:00Z'); if (dateResult.success) { const parsedDate = dateResult.data; // Instance of Date console.log(parsedDate.toISOString()); } ``` ## Main Schemas The package currently includes: - `TagSchema` - Schema for tags (lowercase alphanumeric with hyphens) - `FlexibleDateSchema` - Schema for flexible date formats (accepts Date objects or strings) Coming soon: - Document schemas (v2) - Metadata schemas - Tag index schemas ## TypeScript Types This package also provides TypeScript type definitions: ```typescript import { ValidationErrorType, ValidationResult } from '@memory-bank/schemas'; // Use types const validationResult: ValidationResult = { success: true }; // Or for errors const validationError: ValidationResult = { success: false, errors: [ { message: 'Invalid tag format', path: ['tags', '0'] } ] }; ``` ## Development To build the package locally: ```bash yarn install yarn build ``` To run tests: ```bash yarn test ``` ## License MIT

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/t3ta/memory-bank-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server