mcp-ts-template
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-ts-template add 3 and 5"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-ts-template
Production-ready Model Context Protocol (MCP) server template in TypeScript, built on the official @modelcontextprotocol/sdk. Ships an example tool, resource, and prompt.
Use this template
gh repo create my-mcp --template vidyasagarr7/mcp-ts-templateRelated MCP server: MCP Server Starter
Layout
src/
server.ts # stdio entry point (transport wiring only)
index.ts # createServer(): registers tools/resources/prompts
core/tools.ts # pure domain logic (testable, no MCP concerns)
version.ts
tests/ # vitest specsGolden rule: transport in server.ts, registration in index.ts, logic in core/.
Develop
npm install
npm run dev # run server from source over stdio
npm test # vitest
npm run typecheck
npm run build
npm run inspect # launch MCP Inspector against the built serverTry the server by hand
npm run build
# Initialize handshake over stdio:
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"probe","version":"0"}}}' | node dist/server.jsRegister a new tool
Add pure logic to
src/core/tools.ts.Add a unit test in
tests/.Register it in
src/index.tsviaserver.registerTool(...)with azodinput schema.
Connect from a client
Point any MCP client (Claude Desktop, MCP Inspector, etc.) at the built binary:
{
"mcpServers": {
"my-mcp": { "command": "node", "args": ["/abs/path/dist/server.js"] }
}
}Make it yours (rename checklist)
package.json:name,description,binkey,repository,keywordssrc/index.ts:new McpServer({ name: ... })Replace the example
addtool /greetingresource /summarizeprompt with your ownKeep transport in
server.ts, registration inindex.ts, logic incore/
License
MIT
Available Tools
1 tooladdAddA
Add two numbers
Inputs: a (required), b (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion between tools. The tool's purpose is clear and unambiguous.
With a single tool, naming is trivially consistent. The name 'add' follows a simple verb pattern appropriate for its function.
As a template server, a single tool is slightly minimal but acceptable. It provides a basic starting point for extension.
Within the narrow domain of adding two numbers, the tool is complete. However, for a broader utility server, it lacks other arithmetic operations like subtract, multiply, or divide.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Kickstart development with a customizable TypeScript template featuring sample tools for greeting,…
A Model Context Protocol server for Wix AI tools
A simple Typescript MCP server built using the official MCP Typescript SDK and smithery/cli. This…
Related MCP Servers
- AlicenseCqualityDmaintenanceA production-ready template for creating Model Context Protocol servers with TypeScript, providing tools for efficient testing, development, and deployment.147MIT
- AlicenseCqualityDmaintenanceA TypeScript-based template for building Model Context Protocol servers, featuring fast testing, automated version management, and a clean structure for MCP tool implementations.14MIT
- AlicenseNot gradedqualityDmaintenanceA TypeScript template for building Model Context Protocol servers that provides a structured foundation with automated tools, testing, and synchronization capabilities.Creative Commons Attribution Non Commercial Share Alike 4.0 International
- FlicenseNot gradedqualityDmaintenanceA customizable, production-ready template for building Model Context Protocol servers with dual transport support (stdio and HTTP), TypeScript, Docker support, and extensible architecture for tools, resources, and prompts.-