MCP Server - TypeScript
A production-ready Model Context Protocol (MCP) server built with TypeScript.
Features
Tools: Execute actions (add, echo, timestamp)
Resources: Access data (server info, greetings, data by ID)
Prompts: Reusable prompt templates (analyze, code-review, summarize)
Project Structure
Installation
Configuration
Copy
.env.example
to.env
:cp .env.example .envEdit
.env
with your configuration:SERVER_NAME=mcp-server SERVER_VERSION=1.0.0
Development
Build and run the server:
Testing with Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json
):
Available Capabilities
Tools
add
- Add two numbersecho
- Echo text backtimestamp
- Get current timestamp
Resources
info://server
- Server informationgreeting://{name}
- Personalized greetingdata://{id}
- Data by ID
Prompts
analyze
- Analysis prompt templatecode-review
- Code review prompt templatesummarize
- Summarization prompt template
Production Deployment
Build the project:
npm run buildThe compiled server is in
build/index.js
Run with:
node build/index.js
Adding New Capabilities
New Tool
Edit src/tools/index.ts
and add:
New Resource
Edit src/resources/index.ts
and add:
New Prompt
Edit src/prompts/index.ts
and add:
License
MIT
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
A production-ready TypeScript MCP server providing basic tools (add, echo, timestamp), resources (server info, greetings, data access), and prompt templates (analyze, code-review, summarize). Serves as a foundation for building custom MCP servers with extensible architecture.