Skip to main content
Glama
iamdipanshusingh

MCP Starter Kit

README.md
# MCP Starter Kit

Minimal TypeScript MCP server template you can clone and customize.

This starter includes:
- one example tool registration
- Zod input validation
- stdio transport setup
- dotenv loading for local environment variables

## Quick Start

### 1) Install dependencies

```bash
npm install
```

### 2) Configure environment variables (optional)

Create a `.env` file in the project root. Add only the variables your tools need.

```env
GENERIC_API_KEY=your_api_key_here
```

### 3) Build the server

```bash
npm run build
```

This generates `build/index.js`.

## Connect in an MCP Client

Add this server to your MCP client config.

Example configuration:

```json
{
  "mcpServers": {
    "mcp-starter-kit": {
      "command": "node",
      "args": [
        "--env-file=<PROJECT_ROOT>/.env",
        "<PROJECT_ROOT>/build/index.js"
      ]
    }
  }
}
```

Then restart your MCP client.

## Customize

Start editing `src/index.ts`:
- rename the sample tool (`tool_name`)
- define a useful input schema
- replace the sample handler logic with your own behavior

## Development Notes

- Build output is written to `build/`.
- Keep secrets in `.env` (already ignored by Git).
- Update `.env.example` whenever you add required environment variables.