m

mcp-example-stdio

@a-polishchuk/mcp-example-stdio
0 Stars 8 次浏览 a-polishchuk 更新于 2026-08-23

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "Yes or No MCP": {
      "args": [
        "-y",
        "tsx",
        "\u003cabsolute_path_to\u003e/stdio-example.ts",
        "--stdio"
      ],
      "command": "npx"
    }
  }
}

服务介绍

MCP Example: Server over stdio

This repository demonstrates a simple MCP (Model Context Protocol) server implementation that communicates over stdio using TypeScript.

Features

  • Example MCP server using stdio
  • Written in TypeScript
  • Easily extensible for custom MCP commands

Prerequisites

  • Node.js (v18 or newer recommended)
  • npm

Setup

  1. Install dependencies:

    npm install
    
  2. Go to Cursor Settings -> MCP -> Add new MCP:

    {
        "mcpServers": {
            "Yes or No MCP": {
                "command": "npx",
                "args": [
                    "-y",
                    "tsx",
                    "<absolute_path_to>/stdio-example.ts",
                    "--stdio"
                ]
            }
        }
    }
    

    Replace <absolute_path_to> with the absolute path to your stdio-example.ts file.

  3. Use MCP server:
    Ask LLM in Cursor some question and add "yes or no" in the end, Cursor will call MCP tool.

File Overview

  • stdio-example.ts: Main MCP server implementation.
  • copy-this-to-mcp-json.json: Example configuration for MCP server setup.

License

MIT

相关 MCP 服务