Skip to main content
Glama
Simple TypeScript MCP Server

Simple TypeScript MCP Server

by jasonkneen

Simple TypeScript MCP Server

A simple TypeScript template for building Model Context Protocol (MCP) servers with basic CRUD operations. This template provides a foundation for creating MCP tools that return JSON responses.

Features

  • Simple notes API with CRUD operations

  • In-memory data storage

  • TypeScript implementation

  • JSON responses

  • Ready for testing with Vitest

Related MCP server: MCP Server Starter

Setup

npm install

Running the server

npm run dev

Building for production

npm run build
npm start

Available Tools

This template includes the following MCP tools:

  • getNote: Retrieve a note by ID

  • getAllNotes: Get all notes

  • createNote: Create a new note

  • updateNote: Update an existing note

  • deleteNote: Delete a note by ID

Testing

Run the tests with:

npm test

Or watch mode:

npm run test:watch

Customizing

You can use this template as a starting point for your own MCP server by modifying the tools in src/server.ts to fit your needs.

Available Tools

5 tools
createNoteD

Inputs: title (required), content (required).

deleteNoteD

Inputs: noteId (required).

getAllNotesD

Inputs: no named parameters.

getNoteD

Inputs: noteId (required).

updateNoteD

Inputs: noteId (required), title, content.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose with no overlap: createNote, deleteNote, getAllNotes, getNote, and updateNote cover different CRUD operations on notes. The action (create, delete, get, update) and scope (all vs. single) make them easily distinguishable.

    Naming Consistency5/5

    All tools follow a consistent verbNoun pattern in camelCase (e.g., createNote, deleteNote). The naming is uniform across all five tools, with no deviations in style or convention.

    Tool Count5/5

    With 5 tools, this server is well-scoped for managing notes, covering essential CRUD operations. Each tool serves a clear purpose without redundancy, making the count appropriate for the domain.

    Completeness5/5

    The tool set provides complete CRUD coverage for notes: create, read (get and getAll), update, and delete. There are no obvious gaps, as all lifecycle operations are included, allowing agents to handle full workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers