MCP ExplorerExplorer

Example Mcp

@kodukion a month ago
1 Apache-2.0
FreeCommunity
AI Systems
An example MCP server built with TypeScript, featuring tools and prompt templates.

Overview

What is Example Mcp

example-mcp is an example implementation of a Model Context Protocol (MCP) server built using TypeScript and the official MCP SDK.

Use cases

Use cases for example-mcp include creating interactive applications that require user input processing, performing arithmetic operations, and managing long-running tasks with progress notifications.

How to use

To use example-mcp, install the necessary dependencies with ‘npm install’, then run the server in development mode using ‘npm run dev’ or build for production with ‘npm run build’ followed by ‘npm start’. Configure it in your ‘claude_desktop_config.json’ to integrate with Claude Desktop.

Key features

Key features of example-mcp include several tools like echo, add, and long-running operations, text resources with subscription capabilities, and both simple and complex prompt templates.

Where to use

example-mcp can be used in various fields such as software development, educational tools, and any application requiring context-aware interactions and operations.

Content

example-mcp

An example implementation of a Model Context Protocol (MCP) server.

Overview

This project demonstrates how to build an MCP server using TypeScript and the official MCP SDK. The server implements:

  • Several tools (echo, add, long-running operation)
  • Text resources with subscription capabilities
  • Simple and complex prompt templates

Getting Started

Prerequisites

  • Node.js (v16+)
  • npm or pnpm

Installation

npm install

Development

npm run dev

Production Build

npm run build
npm start

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "example": {
      "command": "node",
      "args": [
        "dist/index.js"
      ],
      "cwd": "/path/to/example-mcp"
    }
  }
}

Available Tools

  • echo: Echoes back the provided message
  • add: Adds two numbers together
  • longRunningOperation: Demonstrates progress notifications for long operations

Available Resources

  • example://text/{id}: Example text resources that can be accessed and subscribed to

Available Prompts

  • simple_prompt: A basic prompt without arguments
  • complex_prompt: A prompt that demonstrates argument handling

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers