MCP Example: Server over stdio

by a-polishchuk

239 downloads
Not rated
GitHub

About

MCP Example: Server over stdio is a simple demonstration MCP server that communicates over stdio using TypeScript. It is designed for use with Cursor and provides a yes/no answer tool for LLM interactions.

Details

Author
a-polishchuk
Downloads
239
Categories
Other

- Example MCP server using stdio transport
- Written in TypeScript
- Easily extensible for custom MCP commands
- Requires Node.js v18 or newer

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Example: Server over stdio
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install Node.js v18 or newer, run npm install, then add the provided JSON configuration to Cursor's MCP settings, replacing <absolute_path_to> with the absolute path to stdio-example.ts. After setup, ask an LLM in Cursor a question ending with "yes or no" to invoke the tool.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

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

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
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.