Skip to main content
Glama
Simple MCP Server

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

Inputs: no named parameters.

create-userC

Create a new user in the database

Inputs: name (required), email (required), phone (required), address (required).

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 2 tools

    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.

    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
      90
      MIT
    • A
      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
      MIT
    • A
      license
      A
      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.
      8
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server for reading and listing JSON documents, designed to be used with Claude Haiku and Headroom compression to reduce token usage. It demonstrates an end-to-end MCP tool-use loop with stdio transport.
      -