- Home
- MCP servers
- Typescript MCP Boiler
Typescript MCP Boiler
- typescript
0
GitHub Stars
typescript
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can quickly build a TypeScript MCP Server to expose tools and resources that clients connect to using the Model Context Protocol (MCP). This boilerplate gives you a ready starting point with a few example tools and resources, plus a simple workflow to build, run, and test your server locally.
How to use
You will run your MCP server locally and connect to it with an MCP client or Cursor MCP to explore available tools and resources. Your client can invoke the tools to perform operations and retrieve content from resources. Typical usage involves starting the server, then issuing requests like performing arithmetic with the calculator tool or greeting a user with the greet tool, and querying the system-info resource for server state.
How to install
Prerequisites: you need Node.js and npm installed on your machine.
// 1) Install dependencies
npm install
// 2) Build the TypeScript sources
npm run build
// 3) Run the server
node build/index.js
Configuration and usage notes
Configure the server name in the source entry point to reflect your project. For example, set the server name to your desired identifier and adjust the capabilities you enable. The boilerplate includes example tools and a server information resource to help you get started.
Cursor MCP can connect to your local server using a configuration file. Create or edit the file at .cursor/mcp.json to point to your local MCP server, for example with an absolute path to the built entry, so the Cursor client can launch and test interactions.
Examples of testing with Cursor MCP
You can test common interactions such as the calculator tool, the greet tool, and the system-info resource to verify the server responds as expected.
Development tips
Add new MCP tools by extending the server with new tool definitions. Each tool is registered with a name, a Zod-based schema for inputs, and an async handler that returns a structured content payload.
Available tools
calculator
Adds, subtracts, multiplies, or divides two numbers, returning a formatted result as MCP content.
greet
Generates a greeting in Korean or English based on the language parameter and returns the greeting as MCP content.
get_weather
Fetches weather information for a specified city and unit, returning a structured weather report as MCP content.