npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

leonvz-mcp-demo

v1.0.0

Published

A comprehensive MCP server demonstrating tools, resources, and prompts

Downloads

3

Readme

LeonVZ MCP Demo Server

A comprehensive Model Context Protocol (MCP) server that demonstrates all three main categories of MCP capabilities:

  • 🔧 Tools - Execute actions and perform computations
  • 📄 Resources - Provide access to data and files
  • 💬 Prompts - Reusable templates for LLM interactions

Installation

Option 1: Use with npx (Recommended)

The easiest way to use this MCP server is with npx:

npx leonvz-mcp-demo

Option 2: Install globally

npm install -g leonvz-mcp-demo
leonvz-mcp-demo

Option 3: Install locally

npm install leonvz-mcp-demo
npx leonvz-mcp-demo

Claude Desktop Integration

To use this server with Claude Desktop, add it to your configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "leonvz-mcp-demo": {
      "command": "npx",
      "args": ["-y", "leonvz-mcp-demo"]
    }
  }
}

Alternatively, if you installed it globally:

{
  "mcpServers": {
    "leonvz-mcp-demo": {
      "command": "leonvz-mcp-demo"
    }
  }
}

What is MCP?

The Model Context Protocol (MCP) is an open standard for connecting AI applications to external data sources and tools. It allows AI models to:

  • Access real-time data through Resources (like GET endpoints)
  • Execute actions through Tools (like POST endpoints)
  • Use structured interaction patterns through Prompts (reusable templates)

Think of MCP as a standardized API specifically designed for AI interactions.

Categories Explained

🔧 Tools

Tools allow AI models to execute actions and perform computations. They can have side effects and are used when you want the AI to do something.

Examples in this server:

  • calculate - Perform mathematical operations
  • create_file - Create new files with content
  • list_files - List files in the data directory
  • get_system_info - Get system information and metrics
  • get_weather - Simulate weather data retrieval

📄 Resources

Resources provide AI models with access to data. They're like GET endpoints - they retrieve information but shouldn't have side effects.

Examples in this server:

  • config://server/settings - Server configuration data
  • user://profile/{userId} - Dynamic user profile lookup
  • file://data/{filename} - File content access
  • logs://application/recent - Application logs

💬 Prompts

Prompts are reusable templates that structure how AI models should approach specific tasks. They provide consistency and best practices.

Examples in this server:

  • code-review - Structure code review feedback
  • compose-email - Help write professional emails
  • meeting-summary - Organize meeting notes
  • project-plan - Create project plans and timelines

Quick Start

1. Install and Test

# Install the package
npm install -g leonvz-mcp-demo

# Test with MCP Inspector
npx @modelcontextprotocol/inspector leonvz-mcp-demo

The MCP Inspector opens an interactive web interface where you can test all the tools, resources, and prompts.

2. Connect to Claude Desktop

Add this to your Claude Desktop configuration file and restart Claude:

{
  "mcpServers": {
    "leonvz-mcp-demo": {
      "command": "npx",
      "args": ["-y", "leonvz-mcp-demo"]
    }
  }
}

Development Setup (Optional)

If you want to contribute or modify the server:

1. Clone and Install Dependencies

git clone https://github.com/leonvanzyl/mcp-demo.git
cd mcp-demo
npm install

2. Build the Server

npm run build

3. Test Locally

npm run inspector

Usage Examples

Testing Tools

Try asking Claude (when connected):

  • "Calculate 15 multiplied by 7"
  • "Create a file called 'notes.txt' with some content"
  • "What's the current system information?"
  • "What's the weather in Tokyo?"

Testing Resources

Try asking Claude:

  • "Show me the server configuration"
  • "Get the profile for user 1"
  • "Read the contents of app.log"
  • "What files are available?"

Testing Prompts

Try asking Claude:

  • "Use the code-review prompt to review this JavaScript function"
  • "Help me compose a professional email using the compose-email prompt"
  • "Create a meeting summary for our team standup"

Project Structure

mcp-demo/
├── src/
│   └── server.ts          # Main MCP server implementation
├── dist/                  # Compiled JavaScript output
├── mcp-data/             # Auto-created data directory
│   ├── config.json       # Sample configuration
│   ├── users.json        # Sample user data
│   └── app.log          # Sample log file
├── package.json
├── tsconfig.json
└── README.md

Key Features

File Operations

  • Create and manage files in the mcp-data directory
  • List files with metadata (size, modification time)
  • Read file contents through resources

User Management

  • Dynamic user profile lookup by ID
  • JSON-based user data storage
  • Profile metadata with timestamps

System Integration

  • Real-time system information
  • Simulated metrics (CPU, memory, disk)
  • Platform and runtime details

AI-Assisted Workflows

  • Code review templates with focus areas
  • Email composition for various purposes
  • Meeting summary structuring
  • Project planning assistance

Development

Run in Development Mode

npm run dev

Available Scripts

  • npm run build - Compile TypeScript to JavaScript
  • npm run start - Run the compiled server
  • npm run dev - Build and run in one command
  • npm run inspector - Open MCP Inspector for testing

Understanding MCP Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   MCP Client    │    │   MCP Server    │    │  Data Sources   │
│  (Claude, etc.) │◄──►│  (This Demo)    │◄──►│ (Files, APIs)   │
└─────────────────┘    └─────────────────┘    └─────────────────┘
  • Client: AI applications that need context (Claude Desktop, IDEs, etc.)
  • Server: This demo server that provides tools, resources, and prompts
  • Data Sources: Files, APIs, databases that the server accesses

Real-World Applications

MCP servers can be built for:

  • Development Tools: Code analysis, documentation, deployment
  • Business Systems: CRM access, report generation, data analysis
  • Content Management: File operations, content retrieval, publishing
  • Communication: Email templates, meeting management, notifications
  • Data Integration: Database access, API integration, data transformation

Learn More

License

MIT License - Feel free to use this as a starting point for your own MCP servers!