Cover image
Try Now
2025-04-12

Inicio de compras de mecanografiado para el servidor MCP con recursos, aviso y herramienta

3 years

Works with Finder

1

Github Watches

1

Github Forks

2

Github Stars

Hello World MCP Server

A simple Model Context Protocol (MCP) server implementation built with TypeScript. This server demonstrates basic MCP functionality including resources, prompts, and tools.

Features

  • SSE and STDIO transport support
  • Resource handling with static and dynamic resources
  • Sample prompt implementation
  • Example tool that echoes messages
  • Debug tool for server introspection

Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn

Installation

npm install

Build

npm run build

Running the Server

HTTP/SSE Transport (Web Browsers)

npm run start:http

This starts the server on http://localhost:3000 with:

  • SSE endpoint at /sse
  • Message endpoint at /messages

STDIO Transport (Command Line)

npm run start

This runs the server in stdio mode for command-line integrations.

Testing the Server

Testing with cURL

  1. Start the HTTP server:

    npm run start:http
    
  2. In a terminal window, connect to the SSE endpoint:

    curl -N http://localhost:3000/sse
    

    You should see a response like:

    event: endpoint
    data: /messages?sessionId=YOUR_SESSION_ID
    
  3. In another terminal window, send a request to invoke the echo tool:

    curl -X POST \
      "http://localhost:3000/messages?sessionId=YOUR_SESSION_ID" \
      -H 'Content-Type: application/json' \
      -d '{
        "jsonrpc": "2.0",
        "id": 1,
        "method": "tools/invoke",
        "params": {
          "name": "echo",
          "parameters": {
            "message": "Testing the MCP server!"
          }
        }
      }'
    
  4. You should see a response in the SSE terminal window:

    event: message
    data: {"jsonrpc":"2.0","id":1,"result":{"content":[{"type":"text","text":"Hello Testing the MCP server!"}]}}
    
  5. Try the debug tool to see available server methods:

    curl -X POST \
      "http://localhost:3000/messages?sessionId=YOUR_SESSION_ID" \
      -H 'Content-Type: application/json' \
      -d '{
        "jsonrpc": "2.0",
        "id": 2,
        "method": "tools/invoke",
        "params": {
          "name": "debug",
          "parameters": {}
        }
      }'
    

Testing with MCP Inspector

For a visual interface, you can use the MCP Inspector tool:

  1. Connect to http://localhost:3000/sse in the MCP Inspector
  2. Browse available resources and tools
  3. Invoke tools interactively

MCP Inspector HTTP Mode

MCP Inspector STDIO Mode

Server API

Resources

  • hello://world - A static hello world resource
  • greeting://{name} - A dynamic greeting with a name parameter

Tools

  • echo - Echoes back a message with "Hello" prefix
  • debug - Lists all available tools and methods

Prompts

  • helpful-assistant - A basic helpful assistant prompt

Troubleshooting

  • If you get "Headers already sent" errors, make sure you're not manually setting headers
  • Session ID handling is crucial for proper message routing
  • Check the server console for debugging information

License

MIT

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • huahuayu
  • Una puerta de enlace de API unificada para integrar múltiples API de explorador de blockchain similar a Esterscan con soporte de protocolo de contexto modelo (MCP) para asistentes de IA.

  • deemkeen
  • Controle su MBOT2 con un combo de potencia: MQTT+MCP+LLM

  • zhaoyunxing92
  • 本项目是一个钉钉 MCP (Protocolo del conector de mensajes )服务 , 提供了与钉钉企业应用交互的 API 接口。项目基于 Go 语言开发 支持员工信息查询和消息发送等功能。 支持员工信息查询和消息发送等功能。

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

    Reviews

    3 (1)
    Avatar
    user_hzMWTlOm
    2025-04-15

    IDA Pro MCP by mrexodia is an essential tool for any serious reverse engineer. Its powerful features and user-friendly interface make it a must-have for analyzing binaries efficiently. The seamless integration of advanced functions helps streamline the reversing process, saving both time and effort. Highly recommended for anyone looking to enhance their reverse engineering toolkit!