A Model Context Protocol server template for building custom servers.
My MCP Server
A Model Context Protocol server built with @intelagent/mcp-shared.
Quick Start
npm install
npm run build
npm start
Add to Claude Code
Create .mcp.json in your project root:
{
"mcpServers": {
"my-mcp-server": {
"command": "node",
"args": ["path/to/dist/index.js"]
}
}
}
Tools
| Tool | Description |
|---|---|
reverse_string |
Reverse a string |
word_count |
Count words and characters |
server_info |
Server metadata and health check |
Development
npm run dev # Run with tsx (no build needed)
npm run build # Compile TypeScript
npm test # Run tests
npm run test:watch # Watch mode
Adding a New Tool
- Define types in
src/types.ts - Add business logic to a service in
src/services/ - Define the tool in
src/tools/using theToolDefinitioninterface - Wire it up in
src/index.ts - Add tests in
tests/
See the enrichment MCP for a full production example.
License
MIT
Tools (3)
reverse_stringReverse a stringword_countCount words and charactersserver_infoServer metadata and health checkConfiguration
{"mcpServers": {"my-mcp-server": {"command": "node", "args": ["path/to/dist/index.js"]}}}