mcp-ts-template 2.0.1 → 2.0.2

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 +25 -20
  2. package/package.json +3 -2
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  <h1>Model Context Protocol (MCP) TypeScript Server Template</h1>
6
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>
7
7
 
8
- [![Version](https://img.shields.io/badge/Version-2.0.1-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/)
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/)
9
9
 
10
10
  </div>
11
11
 
@@ -196,16 +196,16 @@ Refer to **`.env.example`** for a complete list of configurable options.
196
196
 
197
197
  Key scripts available in `package.json`:
198
198
 
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-publish` | Validates your `server.json` manifest against the official MCP registry schema. |
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. |
209
209
 
210
210
  You can find these scripts in the `scripts/` directory.
211
211
 
@@ -213,17 +213,22 @@ You can find these scripts in the `scripts/` directory.
213
213
 
214
214
  ## 📦 Publishing to the MCP Registry
215
215
 
216
- This template includes a GitHub Actions workflow (`.github/workflows/publish-mcp.yml`) that automates publishing your server to the public [MCP Registry](https://modelcontext.com/registry).
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.
217
217
 
218
- ### How It Works
218
+ For a complete walkthrough, including setting up authentication and using the publisher CLI, please refer to my detailed guide:
219
219
 
220
- 1. **Tag a Release**: Publishing is triggered whenever you push a new Git tag that follows the pattern `v*` (e.g., `v1.0.0`, `v2.1.3`).
221
- 2. **Workflow Execution**: The Action logs into the MCP Registry using GitHub OIDC, validates the `server.json` manifest, and then publishes the package.
222
- 3. **Validation**: Before publishing, it is highly recommended to run the local validation script to catch any schema errors early:
223
- `bash
224
- bun run validate-publish
225
- `
226
- This ensures that your `server.json` is compliant with the registry's requirements.
220
+ **[➡️ How to Publish Your MCP Server](./docs/publishing-mcp-server-registry.md)**
221
+
222
+ ### Quick Steps & Validation
223
+
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:
226
+ ```bash
227
+ bun run validate-server
228
+ ```
229
+ 3. **Publish**: Authenticate with the publisher CLI (`mcp-publisher login github`) and then publish your server (`mcp-publisher publish`).
230
+
231
+ 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.
227
232
 
228
233
  ## 🤝 Contributing
229
234
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-ts-template",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
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",
@@ -57,7 +57,8 @@
57
57
  "test:unit": "bun test tests/unit",
58
58
  "test:integration": "INTEGRATION=1 bun test tests/integration",
59
59
  "audit": "bun audit",
60
- "audit:fix": "bun audit --fix"
60
+ "audit:fix": "bun audit --fix",
61
+ "validate-server": "bun scripts/validate-mcp-publish-schema.ts"
61
62
  },
62
63
  "resolutions": {
63
64
  "@hono/node-server": "1.19.2",