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.
- package/README.md +25 -20
- 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
|
-
[](./CHANGELOG.md) [](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-06-18/changelog.mdx) [](./LICENSE) [](https://github.com/cyanheads/mcp-ts-template/issues) [](https://www.typescriptlang.org/) [](https://bun.sh/) [](./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
|
|
200
|
-
|
|
|
201
|
-
| `bun run devdocs`
|
|
202
|
-
| `bun run rebuild`
|
|
203
|
-
| `bun run start:http`
|
|
204
|
-
| `bun run start:stdio`
|
|
205
|
-
| `bun run test`
|
|
206
|
-
| `bun run test:coverage`
|
|
207
|
-
| `bun run devcheck`
|
|
208
|
-
| `bun run validate-
|
|
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
|
|
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
|
-
|
|
218
|
+
For a complete walkthrough, including setting up authentication and using the publisher CLI, please refer to my detailed guide:
|
|
219
219
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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.
|
|
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",
|