Get the FREE Ultimate OpenClaw Setup Guide →

mcp -typescript-tutorial

MCP server from AdemolaAri/mcp-server-typescript-tutorial

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ademolaari-mcp-server-typescript-tutorial node build/server.js \
  --env PORT="3000" \
  --env NODE_ENV="development"

How to use

This MCP server implements a TypeScript-based model context protocol server used to expose structured resources and tools for a model-driven agent. It registers resources (for example, users) that the model can query or mutate, tools that perform actions (such as sending a notification or performing a calculation), a prompt template that guides the model’s behavior, and sampling settings that control how deterministically the model responds. You can inspect how resources are wired to persistent data, how tools are defined and guarded, and how the prompt and sampling influence model decisions. Use the MCP Inspector to view registered components, invoke sample calls, and observe traces that show how the model interacts with resources and tools, which helps with debugging and auditing the flow of actions.

To use locally, start the server (via npm run build and node build/server.js or via a development script such as npm run dev), then connect the MCP Inspector UI to http://localhost:3000. The Inspector will display the available resources and tools, their input shapes, the prompt template, and the sampling configuration. You can run sample invocations to see how the model decides to query a resource, call a tool, or produce a direct response based on the prompt. For VS Code users, configure a .vscode/mcp.json pointing to the local server so you can run and debug from the editor and observe how changes to src/server.ts affect the exposed API.

How to install

Prerequisites:

  • Node.js (and npm) installed on your system
  • A working Git client to clone the repository
  1. Clone the repository
  • git clone <repository-url>
  • cd ademolaari-mcp-server-typescript-tutorial
  1. Install dependencies
npm install
  1. Build the TypeScript project (compile to JavaScript)
npm run build
  1. Run the compiled server
node build/server.js
  1. Optional: Run in development mode (TypeScript directly or with ts-node)
npm run dev
  1. Verify the server is running by opening http://localhost:3000 (or the port configured in your environment)

Additional notes

Tips and common considerations:

  • The server exposes resources (e.g., users), tools (actions like sendEmail), a prompt template, and sampling settings. Review src/server.ts to understand the exact registrations.
  • For development, environment variables like PORT and NODE_ENV help control port exposure and debugging detail.
  • Keep tools safe and idempotent in development; mock external calls where appropriate to avoid side effects.
  • Use the MCP Inspector to replay invocations and trace model decisions; it’s a valuable debugging aid.
  • If you enable a .vscode/mcp.json configuration, ensure the command corresponds to your npm run dev or the node build server command used locally.
  • When deploying, consider aligning the port and environment (production settings) and ensure resource data paths (@data folder) are accessible by the runtime.

Related MCP Servers

Sponsor this space

Reach thousands of developers