Skip to main content
Glama
dyneth02

Simple MCP Server

by dyneth02

Simple MCP with Node.js & TypeScript

This project is a minimal, educational implementation of a Model Context Protocol (MCP)–style system using Node.js and TypeScript. It demonstrates how a client and server can communicate over standard input/output (stdio) using structured messages, simulating how modern AI tools interact with external context providers.

The project was built using VS Code with GitHub Copilot, exploring how AI-assisted development integrates with protocol-based system design.


πŸš€ What This Project Demonstrates

  • A lightweight MCP-style client–server architecture

  • Communication over stdio instead of HTTP

  • Structured request/response handling

  • Type-safe development with TypeScript

  • Local JSON-based data access

  • Practical experimentation with AI tooling workflows

This repository focuses on clarity over complexity, making it ideal for learning, experimentation, and extension.


Related MCP server: JSON Query MCP

🧠 Architecture Overview

  Client (client.ts)
  |
  | stdio messages
  v
  Server (server.ts)
  |
  | Reads local data
  v
  users.json
  • Client sends structured requests

  • Server processes requests and responds via stdio

  • users.json acts as a mock data source

  • mcp.json defines how the MCP server is launched and integrated


πŸ“ Project Structure

  β”œβ”€β”€ client.ts # MCP client implementation
  β”œβ”€β”€ server.ts # MCP server implementation
  β”œβ”€β”€ users.json # Sample data source
  β”œβ”€β”€ mcp.json # MCP server configuration
  β”œβ”€β”€ package.json
  β”œβ”€β”€ package-lock.json
  └── README.md

βš™οΈ How It Works

  1. The MCP server is launched using Node.js (configured in mcp.json)

  2. The client communicates with the server via stdio

  3. Requests are parsed and handled in a structured manner

  4. The server reads from users.json and returns results

  5. Responses are sent back to the client in a predictable format

This mirrors how AI tools query external systems for context without relying on traditional REST APIs.


▢️ Running the Project

Install dependencies

npm install
npm run build
node build/server.js
(Client execution depends on your MCP setup or test harness.)

πŸ§ͺ Why This Matters

Modern AI systems increasingly rely on protocol-driven context sharing rather than monolithic APIs. This project provides a hands-on foundation for understanding:

  • AI tool integrations

  • Context-aware systems

  • Protocol-oriented backend design

  • Developer tooling workflows


πŸ“Œ Notes

  • This is a learning and exploration project

  • Designed to be easily extended (databases, auth, tools, schemas)

  • Emphasizes readability and correctness over feature depth

Available Tools

2 tools
create-random-userA

Create a random user with fake data

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already indicate readOnly=false, destructive=false, and idempotent=false. The description adds that the data is fake, but it does not disclose other behavioral traits such as what side effects occur, whether the user is persisted, or what the return value contains. No contradiction with annotations.

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?

One short, front-loaded sentence communicates the essential purpose without any redundant words or unnecessary detail.

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?

The tool is simple (no parameters), but there is no output schema and the description does not explain what the tool returns (e.g., the generated user's email, password, ID). This leaves a clear gap for an agent trying to use the result.

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?

The tool has zero parameters, so the baseline for this dimension is 4. The description correctly says nothing about parameters, and the empty input schema is fully consistent.

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 ('Create'), the resource ('random user'), and the distinguishing characteristic ('with fake data'). This differentiates it from the sibling tool 'create-user', which presumably creates a real or specific user.

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 implies a usage context (generating fake/test data) through the words 'random user with fake data', but it does not explicitly say when to use this tool versus the sibling 'create-user', nor does it mention any exclusions or prerequisites.

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

create-userC

Create a new user in the database

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
emailYes
phoneYes
addressYes

TDQS

C2.8/5.0
Behavior2/5

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

Annotations already convey the safety profile (readOnlyHint false, destructiveHint false, idempotentHint false), and the description only restates the obvious 'create' operation, adding no extra context such as authentication needs, side effects on duplicate emails, or return behavior. This is a missed opportunity to disclose meaningful behavioral traits beyond structured data.

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, front-loaded sentence that states the core purpose without wasted words. It is appropriately concise for a simple tool, though it lacks substance that could be included without becoming verbose.

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, four required parameters, and a mutation operation, the description should at least mention what the tool returns upon success, how errors (e.g., duplicate email) are handled, or any required permissions. None of this is present, leaving significant gaps for an agent to make safe and correct calls.

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?

With 0% schema description coverage and no parameter details in the description, the agent receives no semantic information about name, email, address, or phone beyond their obvious string names. The description does not compensate for the schema's silence, failing to explain formats, constraints, or required combinations.

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 'Create a new user in the database' uses a specific verb and resource, clearly indicating a create operation. It does not explicitly differentiate from the sibling tool 'create-random-user', though the meaning is implicitly distinct (this creates a specific user, the sibling creates a random one).

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?

No explicit guidance is provided about when to use this tool versus create-random-user. The description implies a use case for adding a specific user, but it does not state conditions, prerequisites, or mention the alternative, leaving the decision to the agent's inference.

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

TDQS

B3.3/5.0
Disambiguation4/5

The two tools both create users, but one creates a user with specified data and the other generates a random user, which is a clear distinction. However, the names are nearly identical and could be confused without reading descriptions carefully.

Naming Consistency5/5

Both tools follow a consistent verb-noun pattern with the 'create-' prefix, making the naming predictable and uniform.

Tool Count3/5

With only two tools, the server feels thin and at the low end of the reasonable range. The count is borderline, as the server's simple scope could justify it, but it might be too minimal for practical use.

Completeness2/5

The tools only cover user creation, leaving out essential operations like getting, listing, updating, or deleting users. This creates a significant gap in the expected lifecycle for user management.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    C
    quality
    F
    maintenance
    A Model Context Protocol server implementation that enables LLMs to query and manipulate JSON data using JSONPath syntax with extended operations for filtering, sorting, transforming, and aggregating data.
    2
    177
    90
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    A Model Context Protocol server for querying large JSON files using JSONPath expressions, enabling LLMs to efficiently search and extract information from large JSON data.
    3
    11
  • A
    license
    Not graded
    quality
    D
    maintenance
    Exposes SQLite database query tools and markdown document resources over JSON-RPC 2.0 stdio transport, enabling AI assistants to read and search documents and execute read-only SQL queries.
    1
    MIT

Latest Blog Posts

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/dyneth02/MCP-Client-Server-Project-using-NodeJS'

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