MCP.so
Sign In
Servers

MCP Quick Start Server

@scriptstar

MCP Server example for up and running in Node

Overview

What is MCP Quick Start Server?

A simple quick-start example of a Model Context Protocol (MCP) server built with TypeScript and the @modelcontextprotocol/sdk. It demonstrates how to define basic tools, resources, and prompts for developers learning MCP.

How to use MCP Quick Start Server?

Clone the repository, run npm install, then npm run build to compile TypeScript to JavaScript. Start the server with node build/index.js or npm start. For development, use npm run dev for live-reload. The server communicates via stdin/stdout using StdioServerTransport.

Key features of MCP Quick Start Server

  • Tool add: sums two numbers and returns the result.
  • Tool fetch-chuck-jokes: fetches a random Chuck Norris joke.
  • Resource greeting: provides a personalized greeting via URI template.
  • Prompt getGreetingAndJoke: guides an AI to greet then tell a joke.
  • Built with TypeScript and the official MCP SDK.

Use cases of MCP Quick Start Server

  • Learning how to structure an MCP server with tools, resources, and prompts.
  • Prototyping and testing MCP client-server interactions.
  • Starting point for building more complex MCP-based applications.

FAQ from MCP Quick Start Server

What are the prerequisites?

Node.js v18.x or later and npm.

How do I build and run the server?

Run npm run build to compile, then npm start or node build/index.js to start.

What tools, resources, and prompts are included?

Tools: add (sum two numbers) and fetch-chuck-jokes (random joke). Resource: greeting://{name} returns a personal greeting. Prompt: getGreetingAndJoke with a name argument sets up a conversation.

How does the server communicate?

It uses StdioServerTransport – listening on stdin and responding on stdout via JSON-RPC messages.

Can I modify and extend this server?

Yes, the source is in src/ with separate modules for tools, resources, and prompts. The README suggests adding more complex tools, resources, or other transport layers.

Tags

More from Developer Tools