Skip to main content
Glama
arunachalam-b

Greeting MCP Server

Greeting MCP Server

A simple Model Context Protocol (MCP) server built with Next.js that provides a greeting tool. This project serves as a clean foundation for building custom MCP servers.

Features

  • Simple Greeting Tool: Provides a greet_user tool that responds with friendly greetings

  • MCP Server Integration: Built using the Vercel MCP adapter for seamless integration

  • No Authentication Required: Simple setup without API keys or user management

  • TypeScript Support: Fully typed with TypeScript for better development experience

Related MCP server: Hello World MCP Server

Getting Started

  1. Install dependencies:

    npm install
  2. Run the development server:

    npm run dev
  3. Open your browser: Visit http://localhost:3000 to see the server info page

  4. Configure your MCP Client: Add this server to your MCP client configuration:

    {
        "mcpServers": {
            "greeting-server": {
                "url": "http://localhost:3000/api/llm/mcp"
            }
        }
    }
  5. Test the greeting tool: In your MCP client, you can now use the greet_user tool:

    • greet_user() - Get a general greeting

    • greet_user(name: "Alice") - Get a personalized greeting

MCP Tool Reference

greet_user

Greets the user with a friendly message.

Parameters:

  • name (optional): The name of the user to greet

Examples:

  • Without name: Returns "Hello! How are you doing today?"

  • With name: Returns "Hello, [name]! Nice to meet you!"

Project Structure

src/
├── app/
│   ├── api/llm/[transport]/route.ts  # MCP server endpoint
│   ├── layout.tsx                    # App layout
│   └── page.tsx                      # Info page
├── components/ui/                    # Basic UI components
└── lib/utils.ts                      # Utility functions

Customization

This project is designed to be a clean starting point for your own MCP server. To customize:

  1. Modify the greeting tool in src/app/api/llm/[transport]/route.ts

  2. Add new tools by adding more server.tool() calls

  3. Add authentication if needed using the experimental_withMcpAuth wrapper

  4. Update the UI in src/app/page.tsx to reflect your server's purpose

Learn More

Related MCP Connectors

Related MCP Servers

  • -
    license
    C
    quality
    Not graded
    maintenance
    A simple boilerplate MCP server that provides a basic greeting tool for demonstration purposes. Serves as a starting template for developers to quickly create and deploy custom MCP servers.
    1
    7 npm
    -
  • A
    license
    C
    quality
    D
    maintenance
    A simple MCP server that provides a basic greeting tool for saying hello with customizable names. Serves as a boilerplate template for developers to quickly create and deploy new MCP servers.
    1
    7 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A simple demonstration MCP server that provides a basic 'say_hello' tool for greeting users by name, serving as a template for building MCP servers with TypeScript.
    3 npm
    1
    ISC
  • -
    license
    Not graded
    quality
    C
    maintenance
    A simple MCP server that provides a 'hello' tool to return a personalized greeting, demonstrating integration with Claude Desktop.
    -