mcp-ts-template 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -24
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,11 +1,8 @@
1
1
  <div align="center">
2
- <br />
3
- <img src="https://raw.githubusercontent.com/modelcontextprotocol/brand-assets/main/mcp-icon-dark-bg.png" alt="MCP Logo" width="140" />
4
- <br />
5
- <h1>Model Context Protocol (MCP) TypeScript Server Template</h1>
6
- <p><b>The definitive, production-grade template for building powerful and scalable Model Context Protocol servers with TypeScript, featuring built-in observability (OpenTelemetry), declarative tooling, robust error handling, and a modular, DI-driven architecture.</b></p>
2
+ <h1>mcp-ts-template</h1>
3
+ <p><b>The definitive, production-grade template for building powerful and scalable Model Context Protocol (MCP) servers with TypeScript, featuring built-in observability (OpenTelemetry), declarative tooling, robust error handling, and a modular, DI-driven architecture.</b></p>
7
4
 
8
- [![Version](https://img.shields.io/badge/Version-2.0.2-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--06--18-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-06-18/changelog.mdx) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Status](https://img.shields.io/badge/Status-Stable-brightgreen.svg?style=flat-square)](https://github.com/cyanheads/mcp-ts-template/issues) [![TypeScript](https://img.shields.io/badge/TypeScript-^5.9-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.1.8-blueviolet.svg?style=flat-square)](https://bun.sh/) [![Code Coverage](https://img.shields.io/badge/Coverage-73.99%25-brightgreen.svg?style=flat-square)](./coverage/lcov-report/)
5
+ [![Version](https://img.shields.io/badge/Version-2.0.3-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--06--18-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-06-18/changelog.mdx) [![Model Context Protocol](https://img.shields.io/badge/MCP%20SDK-^1.18.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Status](https://img.shields.io/badge/Status-Stable-brightgreen.svg?style=flat-square)](https://github.com/cyanheads/mcp-ts-template/issues) [![TypeScript](https://img.shields.io/badge/TypeScript-^5.9-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.1.8-blueviolet.svg?style=flat-square)](https://bun.sh/) [![Code Coverage](https://img.shields.io/badge/Coverage-73.99%25-brightgreen.svg?style=flat-square)](./coverage/lcov-report/)
9
6
 
10
7
  </div>
11
8
 
@@ -56,7 +53,6 @@ This template is packed with production-grade features designed for high-perform
56
53
  ```
57
54
 
58
55
  3. **Build the Project**
59
-
60
56
  ```bash
61
57
  bun build # or bun rebuild
62
58
  ```
@@ -196,16 +192,16 @@ Refer to **`.env.example`** for a complete list of configurable options.
196
192
 
197
193
  Key scripts available in `package.json`:
198
194
 
199
- | Script | Description |
200
- | :------------------------ | :------------------------------------------------------------------------------------ |
201
- | `bun run devdocs` | Generates a comprehensive development documentation prompt for AI analysis. |
202
- | `bun run rebuild` | Clears logs, cache, and compiles the TypeScript source code to JavaScript in `dist/`. |
203
- | `bun run start:http` | Starts the compiled server using the HTTP transport. |
204
- | `bun run start:stdio` | Starts the compiled server using the STDIO transport. |
205
- | `bun run test` | Runs all unit and integration tests with Vitest. |
206
- | `bun run test:coverage` | Runs all tests and generates a code coverage report. |
207
- | `bun run devcheck` | A comprehensive script that runs linting, type-checking, and formatting. |
208
- | `bun run validate-server` | Validates your `server.json` manifest against the official MCP registry schema. |
195
+ | Script | Description |
196
+ | :---------------------- | :------------------------------------------------------------------------------------------------------------- |
197
+ | `bun run devdocs` | Generates a comprehensive development documentation prompt for AI analysis. |
198
+ | `bun run rebuild` | Clears logs, cache, and compiles the TypeScript source code to JavaScript in `dist/`. |
199
+ | `bun run start:http` | Starts the compiled server using the HTTP transport. |
200
+ | `bun run start:stdio` | Starts the compiled server using the STDIO transport. |
201
+ | `bun run test` | Runs all unit and integration tests with Vitest. |
202
+ | `bun run test:coverage` | Runs all tests and generates a code coverage report. |
203
+ | `bun run devcheck` | A comprehensive script that runs linting, type-checking, and formatting. |
204
+ | `bun run publish-mcp` | **(Recommended)** An all-in-one script to sync, validate, commit, and publish your server to the MCP Registry. |
209
205
 
210
206
  You can find these scripts in the `scripts/` directory.
211
207
 
@@ -213,20 +209,37 @@ You can find these scripts in the `scripts/` directory.
213
209
 
214
210
  ## 📦 Publishing to the MCP Registry
215
211
 
216
- This template is configured for easy publishing to the public [MCP Registry](https://modelcontext.com/registry), making your server discoverable by any MCP-compatible client.
212
+ This template is configured for easy publishing to the public [MCP Registry](https://modelcontext.com/registry), making your server discoverable by any MCP-compatible client. The recommended method is to use the all-in-one publishing script.
217
213
 
218
- For a complete walkthrough, including setting up authentication and using the publisher CLI, please refer to my detailed guide:
214
+ For a complete walkthrough, including alternative methods and CI/CD automation, please refer to the detailed guide:
219
215
 
220
216
  **[➡️ How to Publish Your MCP Server](./docs/publishing-mcp-server-registry.md)**
221
217
 
222
- ### Quick Steps & Validation
218
+ ### The Easy Way: All-in-One Publish Script
219
+
220
+ This template includes a powerful script that automates the entire publishing workflow—from syncing versions and validating schemas to committing changes and publishing.
223
221
 
224
- 1. **Update Your Details**: Make sure `package.json` and `server.json` reflect your server's name, version, and your `io.github.*` namespace.
225
- 2. **Validate Locally**: Before attempting to publish, always run the local validation script to catch schema errors:
222
+ 1. **Ensure you are on the `main` branch with no uncommitted changes.**
223
+ 2. **Run the script:**
226
224
  ```bash
227
- bun run validate-server
225
+ bun run publish-mcp
228
226
  ```
229
- 3. **Publish**: Authenticate with the publisher CLI (`mcp-publisher login github`) and then publish your server (`mcp-publisher publish`).
227
+
228
+ The script will guide you through the process, including pausing for you to complete the GitHub browser login.
229
+
230
+ ### Script Flags for More Control
231
+
232
+ The script also supports flags for more granular control:
233
+
234
+ - `--validate-only`: Syncs metadata, validates `server.json`, then stops.
235
+ - `--no-commit`: Skips the automatic Git commit step.
236
+ - `--publish-only`: Skips local file changes and proceeds directly to publishing.
237
+
238
+ Example:
239
+
240
+ ```bash
241
+ bun run publish-mcp --validate-only
242
+ ```
230
243
 
231
244
  This template also includes a GitHub Actions workflow (`.github/workflows/publish-mcp.yml`) that can be configured to automate this process whenever you push a new Git tag.
232
245
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-ts-template",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "mcpName": "io.github.cyanheads/mcp-ts-template",
5
5
  "description": "The definitive, production-grade template for building powerful and scalable Model Context Protocol (MCP) servers with TypeScript, featuring built-in observability (OpenTelemetry), declarative tooling, robust error handling, and a modular, DI-driven architecture.",
6
6
  "main": "dist/index.js",
@@ -58,7 +58,7 @@
58
58
  "test:integration": "INTEGRATION=1 bun test tests/integration",
59
59
  "audit": "bun audit",
60
60
  "audit:fix": "bun audit --fix",
61
- "validate-server": "bun scripts/validate-mcp-publish-schema.ts"
61
+ "publish-mcp": "bun scripts/validate-mcp-publish-schema.ts"
62
62
  },
63
63
  "resolutions": {
64
64
  "@hono/node-server": "1.19.2",
@@ -73,7 +73,7 @@
73
73
  "@modelcontextprotocol/sdk": "^1.18.0",
74
74
  "@opentelemetry/instrumentation-winston": "^0.50.0",
75
75
  "@supabase/supabase-js": "^2.57.4",
76
- "axios": "^1.12.1",
76
+ "axios": "^1.12.2",
77
77
  "chrono-node": "^2.8.4",
78
78
  "dotenv": "^16.6.1",
79
79
  "hono": "^4.9.7",
@@ -104,7 +104,7 @@
104
104
  "@opentelemetry/sdk-trace-node": "^2.1.0",
105
105
  "@opentelemetry/semantic-conventions": "^1.37.0",
106
106
  "@types/js-yaml": "^4.0.9",
107
- "@types/node": "^24.3.3",
107
+ "@types/node": "^24.4.0",
108
108
  "@types/node-cron": "^3.0.11",
109
109
  "@types/sanitize-html": "^2.16.0",
110
110
  "@types/validator": "13.15.3",
@@ -121,7 +121,7 @@
121
121
  "msw": "^2.11.2",
122
122
  "prettier": "^3.6.2",
123
123
  "tsx": "^4.20.5",
124
- "typedoc": "^0.28.12",
124
+ "typedoc": "^0.28.13",
125
125
  "typescript": "^5.9.2",
126
126
  "typescript-eslint": "8.43.0",
127
127
  "vite": "^7.1.5",