Skip to main content
Glama
HarshitRatan

MCP Server TypeScript Template

by HarshitRatan
README.md
# MCP-Server-Typescript-onProcess

This project demonstrates how to build an **MCP (Model Context Protocol) Server** in **TypeScript**, using the `StdioServerTransport` from the `@modelcontextprotocol/sdk`

It showcases how to implement a custom server that communicates via **stdio streams** (`process.stdin` / `process.stdout`), making it easy to integrate with MCP clients.

---

## 🚀 Features

- Written in **TypeScript** for strong typing and maintainability.
- Uses `StdioServerTransport` for **on-process communication**.

---

## ▶️ Running the Server

First, build the project:

```bash
npm run compile
```

**If you have your own client:** start the server directly.

```bash
npm start
```

**Or, use an MCP client (e.g., Claude Desktop):** connect it to this MCP server to handle requests.

Example MCP client configuration:

```json
{
  "mcpServers": {
    "mcp-server-typescript-on-process": {
      "command": "node",
      "args": ["build/src/server.js"], // Exact Path to server.js
      "transport": "stdio"
    }
  }
}
```