MCP Starter Kit MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add mcp-starter-kit -- node "<FULL_PATH_TO_MCP_STARTER_KIT>/dist/index.js"

Replace <FULL_PATH_TO_MCP_STARTER_KIT>/dist/index.js with the actual folder you prepared in step 1.

README.md

Production-ready TypeScript template for building MCP servers.

MCP Server Starter Kit

A production-ready TypeScript template for building Model Context Protocol (MCP) servers. Skip the boilerplate and ship working tools to Claude and other MCP clients in minutes.

What's included

  • Working MCP server using the official @modelcontextprotocol/sdk
  • 3 example tools you can use as-is or adapt:
    • fetch_url — fetch web content with configurable limits and domain blocking
    • read_file / list_directory — safe filesystem access with path traversal protection
    • transform_data — convert between JSON, CSV, TSV, Markdown table, and plain text
  • TypeScript throughout — strict mode, typed inputs/outputs, Zod validation
  • Error handling patterns — every tool returns a typed ToolResult<T> with ok/error discrimination
  • Environment-based config — all limits and paths configurable via .env
  • Structured logging — stderr-only logger (MCP protocol uses stdout)
  • Test suite — 19 tests with Vitest covering all three tools
  • Build scriptsnpm run build, npm run dev, npm test, npm run typecheck

Requirements

  • Node.js 18 or higher
  • npm 9 or higher

Quick start

# 1. Install dependencies
npm install

# 2. Configure environment
cp .env.example .env
# Edit .env — at minimum, set FILE_READER_ROOT to a safe directory

# 3. Build
npm run build

# 4. Run
npm start

Development mode

npm run dev

Uses tsx for live reload — no build step required during development.

Connect to Claude Desktop

Add this to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

{
  "mcpServers": {
    "my-server": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-starter-kit/dist/index.js"],
      "env": {
        "FILE_READER_ROOT": "/path/to/allowed/directory",
        "LOG_LEVEL": "info"
      }
    }
  }
}

Restart Claude Desktop. Your tools will appear in the tool picker.

Connect to Claude Code

Add to .claude/settings.json:

{
  "mcpServers": {
    "my-server": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-starter-kit/dist/index.js"]
    }
  }
}

Tools reference

fetch_url

Fetches the text content of a URL.

Parameter Type Required Description
url string yes HTTP or HTTPS URL to fetch
headers object no Additional request headers
timeout_ms number no Request timeout (100–30000ms, default from env)

Returns the response body, status code, content type, and a truncated flag if the response exceeded FETCH_MAX_BYTES.

read_file

Reads a file within the configured FILE_READER_ROOT.

Parameter Type Required Description
path string yes Relative path from root
encoding utf8 or base64 no Encoding (default: utf8)
max_bytes number no Max bytes to read (default: 1MB)

Path traversal (../) is blocked at the resolver level.

list_directory

Lists files and directories within the configured root.

Parameter Type Required Description
path string no Relative directory path (default: .)
recursive boolean no List nested files (default: false)

transform_data

Converts data between formats.

Parameter Type Required Description
input string yes Raw input data
from_format json|csv|tsv|text yes Input format
to_format json|csv|tsv|markdown_table|text_summary yes Output format
options.pretty boolean no Pretty-print JSON (default: true)
options.include_header boolean no Include CSV/TSV header row (default: true)
options.delimiter string no Custom delimiter for CSV/TSV parsing

Configuration

All configuration is via environment variables. See .env.example for the full list.

Variable Default Description
SERVER_NAME mcp-starter-kit Server identity reported to clients
SERVER_VERSION 1.0.0 Server version
FETCH_MAX_BYTES 1048576 Max response size for web fetcher (bytes)
FETCH_TIMEOUT_MS 10000 Default fetch timeout (ms)
FETCH_BLOCKED_DOMAINS (empty) Comma-separated blocked hostnames
FILE_READER_ROOT ./workspace Root directory for file access
TRANSFORMER_MAX_INPUT 50000 Max input characters for transformer
LOG_LEVEL info Logging level (debug/info/warn/error)

Adding your own tools

  1. Create src/tools/my-tool.ts — export an async function that returns ToolResult<YourType>
  2. Add input/output types to src/types.ts using Zod schemas
  3. Register the tool in src/index.ts with `server.tool(name,

Tools (4)

fetch_urlFetches the text content of a URL.
read_fileReads a file within the configured FILE_READER_ROOT.
list_directoryLists files and directories within the configured root.
transform_dataConverts data between formats.

Environment Variables

SERVER_NAMEServer identity reported to clients
SERVER_VERSIONServer version
FETCH_MAX_BYTESMax response size for web fetcher (bytes)
FETCH_TIMEOUT_MSDefault fetch timeout (ms)
FETCH_BLOCKED_DOMAINSComma-separated blocked hostnames
FILE_READER_ROOTRoot directory for file access
TRANSFORMER_MAX_INPUTMax input characters for transformer
LOG_LEVELLogging level (debug/info/warn/error)

Configuration

claude_desktop_config.json
{"mcpServers":{"my-server":{"command":"node","args":["/absolute/path/to/mcp-starter-kit/dist/index.js"],"env":{"FILE_READER_ROOT":"/path/to/allowed/directory","LOG_LEVEL":"info"}}}}

Try it

Fetch the content of https://example.com and summarize it for me.
Read the file named config.json from my workspace root.
List all files in the current directory recursively.
Transform this CSV data into a markdown table: [paste data here].

Frequently Asked Questions

What are the key features of MCP Starter Kit?

Built with official @modelcontextprotocol/sdk. Includes safe filesystem access with path traversal protection. Supports data transformation between JSON, CSV, TSV, and Markdown. Strict TypeScript with Zod validation for all inputs. Includes 19 Vitest tests for reliability.

What can I use MCP Starter Kit for?

Developers building custom MCP servers who want to skip boilerplate setup.. Users needing a secure way to allow Claude to read specific local project files.. Automating data format conversions between JSON and CSV/Markdown tables.. Fetching and summarizing web content directly within the Claude interface..

How do I install MCP Starter Kit?

Install MCP Starter Kit by running: npm install && npm run build

What MCP clients work with MCP Starter Kit?

MCP Starter Kit works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Starter Kit docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare