Record MCP Server
Provides optional cloud storage backend using Cloudflare R2 for storing and managing dynamic review records with user-defined schemas, enabling production deployment with R2 as an alternative to local filesystem storage.
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., "@Record MCP Server add a coffee review with nutty flavor, strong aroma, medium acidity, and rating 8.5"
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.
Record MCP Server
A Model Context Protocol (MCP) server for storing and managing dynamic review records with user-defined schemas. Perfect for organizing reviews of coffee, whisky, wine, or any other category you can think of!
Features
Dynamic Schemas: Create review types with custom fields on-the-fly
Flexible Storage: Local filesystem (dev) or Cloudflare R2 (production)
Type-Safe: Built with TypeScript and runtime validation
Extensible: Add new fields to existing review types
Easy Migration: Switch from local to cloud storage with one environment variable
Related MCP server: Article Manager MCP Server
Quick Start
Installation
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
Copy the example environment file:
cp .env.example .envFor local development (default):
STORAGE_PROVIDER=local
LOCAL_DATA_PATH=./dataFor production with Cloudflare R2:
STORAGE_PROVIDER=r2
R2_ACCOUNT_ID=your_account_id
R2_ACCESS_KEY_ID=your_access_key
R2_SECRET_ACCESS_KEY=your_secret_key
R2_BUCKET_NAME=review-recordsRunning the Server
Development mode (with auto-reload):
npm run devProduction mode:
npm run build
npm startRunning Tests
npm testMCP Tools
The server provides the following MCP tools:
1. list_review_types
List all review types with their schemas and record counts.
Parameters: None
Example Response:
{
"types": [
{
"name": "coffee",
"schema": [
{ "name": "flavor", "type": "string" },
{ "name": "aroma", "type": "string" },
{ "name": "acidity", "type": "string" }
],
"recordCount": 5,
"createdAt": "2025-11-16T10:00:00Z",
"updatedAt": "2025-11-16T12:00:00Z"
}
]
}2. get_review_type
Get detailed information about a specific review type including all records.
Parameters:
typeName(string): Name of the review type
Example:
{
"typeName": "coffee"
}3. add_review_type
Create a new review type with a custom schema.
Parameters:
name(string): Name of the review type (e.g., "coffee", "whisky")fields(array): Array of field definitions
Supported Field Types:
string: Text valuesnumber: Numeric valuesboolean: True/false valuesdate: ISO 8601 date strings
Example:
{
"name": "coffee",
"fields": [
{ "name": "flavor", "type": "string" },
{ "name": "aroma", "type": "string" },
{ "name": "acidity", "type": "string" },
{ "name": "rating", "type": "number" }
]
}4. add_field_to_type
Add a new field to an existing review type's schema.
Parameters:
typeName(string): Name of the review typefieldName(string): Name of the new fieldfieldType(string): Type of the field (string, number, boolean, date)
Example:
{
"typeName": "coffee",
"fieldName": "body",
"fieldType": "string"
}5. add_review_record
Add a new review record to a type.
Parameters:
typeName(string): Name of the review typedata(object): Review data matching the type's schema
Example:
{
"typeName": "coffee",
"data": {
"flavor": "nutty",
"aroma": "strong",
"acidity": "medium",
"rating": 8.5
}
}Usage Examples
Complete Workflow
// 1. Create a new review type
await mcp.callTool("add_review_type", {
name: "whisky",
fields: [
{ name: "taste", type: "string" },
{ name: "age", type: "number" },
{ name: "peated", type: "boolean" },
{ name: "tasted_on", type: "date" }
]
});
// 2. Add a review
await mcp.callTool("add_review_record", {
typeName: "whisky",
data: {
taste: "smoky and complex",
age: 12,
peated: true,
tasted_on: "2025-11-16T10:00:00Z"
}
});
// 3. Add more fields later
await mcp.callTool("add_field_to_type", {
typeName: "whisky",
fieldName: "region",
fieldType: "string"
});
// 4. List all types and their data
const result = await mcp.callTool("list_review_types", {});Architecture
Project Structure
record-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── types.ts # TypeScript type definitions
│ ├── storage/
│ │ ├── interface.ts # Storage provider interface
│ │ ├── local.ts # Local file system storage
│ │ ├── r2.ts # Cloudflare R2 storage
│ │ └── factory.ts # Storage provider factory
│ ├── tools/
│ │ ├── list-types.ts # List and get review types
│ │ ├── add-type.ts # Create new review type
│ │ ├── add-field.ts # Add field to type
│ │ └── add-record.ts # Add review record
│ └── utils/
│ └── validation.ts # Schema and data validation
├── data/ # Local storage (when using local provider)
│ ├── types/
│ │ ├── coffee.json
│ │ └── whisky.json
│ └── index.json
└── tests/
├── storage.test.ts # Storage provider tests
└── tools.test.ts # MCP tools testsStorage Abstraction
The server uses a storage abstraction layer that allows easy switching between local files and Cloudflare R2:
Local Storage (Development): Uses Node.js
fs/promisesto store JSON filesR2 Storage (Production): Uses AWS S3-compatible API to store in Cloudflare R2
Both providers implement the same StorageProvider interface, making migration seamless.
Data Format
Each review type is stored as a separate JSON file:
{
"name": "coffee",
"schema": [
{ "name": "flavor", "type": "string" },
{ "name": "aroma", "type": "string" }
],
"records": [
{
"id": "1234567890-abc123",
"data": {
"flavor": "nutty",
"aroma": "strong"
},
"createdAt": "2025-11-16T10:00:00Z"
}
],
"createdAt": "2025-11-15T09:00:00Z",
"updatedAt": "2025-11-16T10:00:00Z"
}Migration from Local to R2
When you're ready to move to production:
Set up your Cloudflare R2 bucket
Update your
.envfile with R2 credentialsChange
STORAGE_PROVIDER=r2Restart the server
Optional: Use a migration script to copy existing data:
// Copy all local files to R2
const localStorage = new LocalStorageProvider('./data');
const r2Storage = new R2StorageProvider(r2Config);
const types = await localStorage.listTypes();
for (const typeName of types) {
const data = await localStorage.readType(typeName);
await r2Storage.writeType(typeName, data);
}Validation
The server provides comprehensive validation:
Type Names: Alphanumeric, hyphens, and underscores only
Field Types: Must be one of: string, number, boolean, date
Required Fields: All schema fields must be present in records
Extra Fields: Records cannot have fields not in the schema
Type Checking: Field values must match their declared types
Error Handling
All tools return structured error messages:
{
"error": "Review type \"coffee\" already exists"
}Common errors:
Duplicate type names
Duplicate field names
Missing required fields in records
Type mismatches
Invalid type/field names
Development
Building
npm run buildWatching for Changes
npm run watchTesting
Run all tests:
npm testRun specific test file:
tsx tests/storage.test.ts
tsx tests/tools.test.tsLicense
MIT
Contributing
Contributions welcome! Please ensure tests pass before submitting PRs.
Support
For issues or questions, please open a GitHub issue.
Available Tools
5 toolsadd_field_to_typeB
Add a new field to an existing review type schema
Inputs: typeName (required), fieldName (required), fieldType (required).
add_review_recordC
Add a new review record to a type
Inputs: typeName (required), data (required).
add_review_typeC
Create a new review type with a custom schema
Inputs: name (required), fields (required).
get_review_typeC
Get detailed information about a specific review type including all records
Inputs: typeName (required).
list_review_typesB
List all review types with their schemas and record counts
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: add_field_to_type modifies schemas, add_review_record creates data entries, add_review_type creates new types, get_review_type retrieves detailed type information, and list_review_types provides an overview. There is no overlap or ambiguity between these operations.
All tool names follow a consistent verb_noun pattern (e.g., add_field_to_type, get_review_type, list_review_types) with clear, descriptive actions and targets. The naming is uniform and predictable throughout the set.
With 5 tools, this server is well-scoped for managing review types and records. The count is appropriate, covering core operations without being overly sparse or bloated, and each tool serves a necessary function in the domain.
The tool set provides good coverage for creating and retrieving review types and records, but lacks update and delete operations (e.g., update_review_type, delete_review_record). This minor gap might require workarounds but does not severely hinder core workflows.
Maintenance
Related MCP Connectors
Hosted MCP server for AI-driven data ops. Create apps, manage schemas, and CRUD structured data.
AI-native Git-based CMS for Astro. Create and publish content in the browser, without learning git.
No-code databases, forms, portals and AI sites. Manage records and automation via natural language.
No-code databases, forms, portals and AI sites. Manage records and automation via natural language.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables comprehensive content management through Markdown processing, HTML rendering, intelligent fuzzy search, and document analysis. Supports frontmatter parsing, tag-based filtering, table of contents generation, and directory statistics for efficient content organization and discovery.6 npm4MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to save, search, and manage markdown-based research articles through a complete CRUD interface. Supports creating, reading, updating, and deleting articles with frontmatter metadata in a self-hosted file-based system.2MIT
- AlicenseNot gradedqualityBmaintenanceAgent-first headless CMS running as a Cloudflare Worker, providing MCP servers for schema/content management and editorial operations.17 npm5MIT
- FlicenseAqualityBmaintenanceLets users manage master data through natural-language conversations with AI agents, enabling schema creation, record capture, validation, search, and query answering via 16 MCP tools backed by local JSON storage.16-