Skip to main content
Glama
groundwork07

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 + writelist_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 reviewreview_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 API Tool Demo

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
amountYes
statusNo

TDQS

C2.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must cover behavioral traits. It only discloses the write permission requirement, omitting other behaviors such as idempotency, side effects, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no wasted words, but it is overly minimal. It earns its place by including the auth requirement, but the brevity sacrifices completeness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters and no output schema or annotations, the description is severely lacking. It does not explain the purpose of parameters, return values, or typical usage context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description adds no meaning to any of the three parameters (name, amount, status). The information is limited to what is already in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Create a record,' which is a clear verb+resource but lacks specificity about the record type or domain. It does not distinguish itself from sibling tools like update_record or review_record.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions a requirement (MCP_ALLOW_WRITES=true) but provides no guidance on when to use this tool versus its alternatives. No context about prerequisites or scenarios is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_recordB

Get a single record by id.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It implies a read-only operation but does not disclose error behavior, return format, or any side effects. Adequate for a simple get but lacks depth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality. No wasted words, and it is appropriately front-loaded with the key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple retrieval tool with no output schema, the description is minimally adequate but could mention return value or error cases. Given low complexity, it meets a basic standard.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so description must compensate. It mentions 'by id' but adds no detail about the id format, required constraints, or what values are valid. The parameter remains opaque.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get', the resource 'a single record', and the method 'by id'. This distinguishes it from sibling tools like list_records (gets multiple) and create_record (creates).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like review_record or list_records. No exclusions or context cues are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_recordsC

List all records.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.9/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden for behavioral traits. 'List all records' is vague—does it support pagination? Are there limits? No information about side effects, authentication, or performance.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise single sentence, front-loaded with the key action and resource. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description lacks detail about return format, pagination, or filtering. For a list operation, 'all records' is insufficient without limits or ordering.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, and schema coverage is 100%. The description does not need to add parameter details. Baseline 4 for zero-parameter tools is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List all records' clearly states the action (list) and resource (records). However, it does not differentiate from sibling tools like get_record or review_record, missing the opportunity to specify scope or uniqueness.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives such as get_record or search. The description provides no context for appropriate usage scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

review_recordC

Run deterministic checks on a record and return structured findings.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes

TDQS

C2.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations are absent, so the description must carry the full behavioral disclosure. It mentions 'deterministic checks' implying no side effects, but does not detail what checks are performed or the nature of the 'structured findings'. Deeper traits like auth needs or rate limits are omitted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no unnecessary words. It is appropriately front-loaded, though it could be expanded slightly without losing conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, no annotations, and a single parameter with zero coverage, the description is grossly insufficient. It does not explain what a 'record' is, what 'checks' entail, or the format of findings, leaving the agent with little actionable information.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, meaning the description must compensate by explaining the 'id' parameter. It does not mention the parameter at all, failing to add meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'run deterministic checks' and resource 'record', and implies a distinct function from sibling tools like get_record or update_record, which focus on retrieval or modification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives (e.g., get_record for retrieval or create_record for creation). The description does not mention prerequisites or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

update_recordB

Patch a record by id. Requires MCP_ALLOW_WRITES=true.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
nameNo
amountNo
statusNo

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description only indicates it's a write operation and mentions a configuration requirement. It does not disclose error behavior, idempotency, or side effects beyond the mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with only two sentences, front-loading the core purpose and a key requirement. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema or annotations, the description is incomplete. It lacks details on return value, error responses, and concurrency, which are important for a mutation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description adds no information about the parameters beyond their existence. The schema is self-explanatory, but the description could highlight that 'id' identifies the record and that other fields are optional for partial updates.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Patch a record by id') and distinguishes from sibling tools like create_record, get_record, list_records, and review_record.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a requirement ('Requires MCP_ALLOW_WRITES=true') but does not explicitly state when to use versus alternatives or when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 5 tool updatesv1.0.0
    • First observedcreate_record
    • First observedget_record
    • First observedlist_records
    • First observedreview_record
    • First observedupdate_record

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    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
    -
  • 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
    C
    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