About MCP Tool Template
A repository template for developers building MCP tools for AI agents. It uses Zod schemas, MCP interface implementations, and tests as the foundation for each tool.
Key features
- 01Organize tools in src/tools
- 02Define input and output schemas with Zod
- 03Implement the MCP protocol interface
- 04Add tests for tools
Use cases
- 01Create a new MCP tool
- 02Define a tool's input and output structure
- 03Validate an MCP interface implementation
- 04Run tests for MCP tools
MCP support
The template provides a starting point for building MCP-compatible tools and expects tools to implement the MCP protocol interface.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Tool Template
A template repository for building Model Context Protocol (MCP) tools.
Overview
This template provides a foundation for creating MCP-compatible tools that can be used with AI agents. Each tool follows the Model Context Protocol specification for standardized AI tool interactions.
Installation
npm install
Creating New Tools
Tools are defined in the src/tools directory. Each tool should:
- Define input/output schemas using Zod
- Implement the MCP protocol interface
- Include comprehensive tests
Tool Structure
src/
└── calculator/
├── tools/
│ ├── index.ts
│ ├── add.ts
│ └── subtract.ts
├── index.ts
├── prompt.ts
└── schema.ts
Testing
Run the test suite:
npm run test
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.