nand1234/mcp-server-typescript
If you are the rightful owner of mcp-server-typescript and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A TypeScript implementation of a Model Context Protocol (MCP) server with support for prompts, resources, and tools.
MCP Server
A TypeScript implementation of a Model Context Protocol (MCP) server with support for prompts, resources, and tools.
Project Structure
mcp/
├── package.json # Project dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── src/
├── server.ts # Main server implementation
├── prompts/ # Prompt definitions and handlers
│ ├── prompt_definition.ts
│ └── prompt.ts
├── resources/ # Resource definitions and handlers
│ ├── resource_definition.ts
│ └── resource.ts
└── tools/ # Tool definitions and handlers
├── tool_definition.ts
└── tool.ts
Features
- Prompts: Pre-defined prompt templates and handlers
- Resources: Resource management and definitions
- Tools: Custom tool implementations for the MCP server
Prerequisites
- Node.js (v14 or higher recommended)
- npm or yarn package manager
Installation
# Clone the repository
git clone https://github.com/nand1234/mcp-server-typescript.git
cd mcp-server-typescript
# Install dependencies
npm install
Development
# Build the project
npm run build
# Run in debugger mode
npm inspect
Configuration
Configuration details can be found in package.json and tsconfig.json.
Usage
This MCP server provides three main components:
Prompts
Prompts are defined in the src/prompts/ directory and provide reusable prompt templates.
Resources
Resources are defined in the src/resources/ directory and manage various data sources.
Tools
Tools are defined in the src/tools/ directory and implement custom functionality accessible through the MCP protocol.
Building
The project uses TypeScript and can be compiled using:
npm run build
Project Type
- Language: TypeScript
- Runtime: Node.js
- Protocol: Model Context Protocol (MCP)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Author
Nandkumar Ghatage
Support
For issues and questions, please open an issue in the repository.
server setting in mcp.json in vs code
{ "servers": { "nand-mcp": { "type": "stdio", "command": "node", "args": ["./dist/server.js"], "cwd": "/home/nandkumarg/projects/learning/mcp" } }, "inputs": [] }