Skip to main content
Glama
mcp-records-demo

mcp-records-demo

by groundwork07

mcp-records-demo

A small, generic Model Context Protocol (MCP) server that shows the patterns a real "build me an MCP integration for my business tool" job asks for — with no client IP in it. It's a portfolio/demo artifact: swap the in-memory RecordStore for a real API client and it becomes a production integration.

What it demonstrates

  • Typed tools, read + write — list_records, get_record, create_record, update_record, review_record, each with a JSON-Schema input.

  • Write safeguards — write tools are disabled unless MCP_ALLOW_WRITES=true (least-privilege by default).

  • Structured error handling — validation and not-found errors are returned as structured tool errors; the server never crashes or leaks internals.

  • Deterministic review — review_record runs repeatable, code-driven checks and returns structured findings (not free-form prose).

  • Clean separation — all domain logic lives in src/store.js (dependency-free, fully unit-tested), so it's testable without the transport.

Related MCP server: mcp-tools-server

Run it

npm install
npm test                          # 8 zero-dependency unit tests on the core logic
npm run example                   # end-to-end: spawns the server and exercises the tools over stdio
MCP_ALLOW_WRITES=true npm start   # run the server on stdio

Use it from Claude Desktop / Claude Code

Add to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):

{
  "mcpServers": {
    "records-demo": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-demo/src/server.js"],
      "env": { "MCP_ALLOW_WRITES": "true" }
    }
  }
}

Then ask Claude to "list records", "create a record named Widget for 42", or "review record rec_1".

Turning this into a real integration

Replace RecordStore with a client for the target API (REST/GraphQL), map each business action to a tool, keep the env-gated write safeguard, and add auth via environment secrets (never in code). The tool surface, validation, error mapping, and tests stay exactly as they are here.

Author: Shane · built with Claude Code · MIT.

Available Tools

5 tools
create_recordC

Create a record. Requires MCP_ALLOW_WRITES=true.

Inputs: name (required), amount (required), status.

get_recordB

Get a single record by id.

Inputs: id (required).

list_recordsC

List all records.

Inputs: no named parameters.

review_recordC

Run deterministic checks on a record and return structured findings.

Inputs: id (required).

update_recordB

Patch a record by id. Requires MCP_ALLOW_WRITES=true.

Inputs: id (required), name, amount, status.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a distinct action (get, list, review, create, update) with no overlap, making it easy for an agent to select the correct tool.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern (e.g., get_record, create_record), with only minor plural variation in list_records.

    Tool Count5/5

    5 tools provide a focused set for record management without being too sparse or overwhelming.

    Completeness4/5

    Covers create, read (single and list), update, and adds a review operation. Missing delete, but that may be intentional for safety.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A production-ready MCP server that enables interaction with the AroFlo API to manage quotes, projects, and labor reporting. It features secure request signing and exposes API documentation as resources for enhanced context and tool surface.
      51
      2
      ISC
    • A
      license
      Not graded
      quality
      A
      maintenance
      A portfolio MCP server demonstrating four tools (web search, database query, file reading, directory listing) with read-only SQL, filesystem sandbox, and both stdio and HTTP transports.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A read-only MCP server that teaches how to expose documentation as a resource and safe operations as tools, using JSONPlaceholder as the data source.
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      A deliberately small MCP server that demonstrates security hardening against the OWASP MCP Top 10 with tools for file search, record queries, and document fetching, each defended against path traversal, SQL injection, and SSRF.
      4
      MIT