Supports publishing the MCP server as an npm package, making it easily installable and usable by others
Built with TypeScript support, allowing developers to create strongly-typed MCP tools with better developer experience
Utilizes Zod for schema validation in MCP tools, enabling type-safe input validation for tool parameters
mcp-practice
A Model Context Protocol (MCP) server built with mcp-framework.
Quick Start
Related MCP server: mcp-framework-starter
Project Structure
Adding Components
The project comes with an example tool in src/tools/ExampleTool.ts. You can add more tools using the CLI:
Tool Development
Example tool structure:
Publishing to npm
Update your package.json:
Ensure
nameis unique and follows npm naming conventionsSet appropriate
versionAdd
description,author,license, etc.Check
binpoints to the correct entry file
Build and test locally:
npm run build npm link mcp-practice # Test your CLI locallyLogin to npm (create account if necessary):
npm loginPublish your package:
npm publish
After publishing, users can add it to their claude desktop client (read below) or run it with npx
After Publishing
Add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Building and Testing
Make changes to your tools
Run
npm run buildto compileThe server will automatically load your tools on startup