MCP Server TS Starter
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP server TS starter
A production-ready Model Context Protocol server in TypeScript, ready to customize with coding agents. It runs over stdio for local clients and Streamable HTTP for remote ones, with OAuth, tests through real MCP clients, and a release pipeline.
Features
Current protocol: built on the official MCP SDK v2, for the 2026-07-28 spec, while still serving older clients.
Two transports: stdio for Claude Code, Claude Desktop, and Cursor, plus stateless Streamable HTTP that scales horizontally.
Secure HTTP: OAuth per the MCP authorization spec, or static tokens. It won't start without an auth mode, and it blocks DNS rebinding.
Sample tools:
get_time,search_docs, andwhoami, with input and output schemas, annotations, and readable errors, plusdocs://resources.Backend integration:
list_notesandcreate_notecall a REST API with timeouts, validated responses, and errors the model can act on. See Connect a backend API.Real tests: every tool is tested through a real MCP client over HTTP and stdio, on both protocol eras.
Publishing: releases to npm, the MCP Registry, and GHCR, with a test that keeps
server.jsonandpackage.jsonin step.Agent-ready:
AGENTS.md, skills, and checks that run on every commit.
Related MCP server: MCP TypeScript Template
Quick start
You need Node 26 or later and pnpm:
git clone https://github.com/opikdev/mcp-server-ts-starter
cd mcp-server-ts-starter
pnpm install
pnpm inspectThe MCP Inspector opens in your browser. Connect, list the tools, and call get_time.
To run it over HTTP in Docker instead:
docker compose up --build --wait mcpThe server is now at http://localhost:3000/mcp, with the dev token dev-token-change-me-0123.
Usage
Task | Command |
Try the tools in the MCP Inspector |
|
Serve over HTTP on your machine |
|
Run lint, types, tests, and repo checks |
|
Test the built package and Docker image |
|
Build the npm package |
|
To use the server from Claude Code, Claude Desktop, Cursor, or VS Code, see Connect a client. Before you serve over HTTP outside your machine, read Configure HTTP auth. To ship a release, see Publish a release.
To add a tool, create a file in src/tools/ like src/tools/time.ts, register it in src/server.ts, and add tests to test/integration/tools.test.ts.
Project structure
Path | Purpose |
| One file per tool |
| Resources and their data |
| Clients for backend APIs the tools call |
| The HTTP app, auth gate, and server startup |
| OAuth and static token verifiers |
| Unit, integration, and end-to-end tests |
| Architecture, guides, and decisions |
Contributing
Read CONTRIBUTING.md before opening a pull request, and follow the code of conduct.
Security
Report vulnerabilities privately, as described in SECURITY.md.
License
Released under the MIT License.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
One OAuth connector for your team's remote MCP servers, with Tool Packs, guardrails and logs.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceA production-ready TypeScript MCP server providing basic tools (add, echo, timestamp), resources (server info, greetings, data access), and prompt templates (analyze, code-review, summarize). Serves as a foundation for building custom MCP servers with extensible architecture.523 npm-
- AlicenseNot gradedqualityDmaintenanceA production-grade TypeScript template for building Model Context Protocol (MCP) servers with declarative tools/resources, authentication, storage abstraction, and support for both local and edge deployment. Provides example echo tools and resources to demonstrate MCP server development patterns.348 npmApache 2.0
- AlicenseBqualityDmaintenanceA TypeScript starter template for building MCP servers with example tools (echo, math operations, time, flight status) and resources (server info, greetings). Provides a modular architecture for easily extending with custom tools and resources.421 npmISC
- AlicenseNot gradedqualityBmaintenanceA feature-complete MCP server template in TypeScript demonstrating tools, resources, prompts, and both stdio and HTTP transports.8MIT