Skip to main content
Glama
TuShArBhArDwA

MCP Keyword Search Server

MCP Keyword Search Server

This project implements a Model Context Protocol (MCP) server and client using Node.js.
It allows you to search for a specific keyword within a given text file — demonstrating how MCP tools can communicate via standard input/output.


Table of Contents


Related MCP server: Ressl MCP

Features

  • Built with @modelcontextprotocol/sdk

  • Implements a custom MCP tool: keyword-search

  • Searches text files for specific keywords

  • Clean, color-coded output using chalk

  • Fully open-source and lightweight


Project Structure

mcp-server/ ├── index.js # MCP Server implementation ├── client.js # Client sending keyword-search requests ├── sample.txt # Sample input file ├── package.json ├── .gitignore ├── LICENSE └── README.md


Setup Instructions

1. Clone the repository

git clone https://github.com/TuShArBhArDwA/mcp-keyword-search-server.git
cd mcp-keyword-search-server

2. Install dependencies

npm install

3. Run the client

node client.js

You should see output similar to:

Starting MCP Keyword Search Server...

Sending keyword-search request...

Search Result:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Found 1 line(s):
This is Tushar
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

How It Works

  • The MCP server (index.js) defines a tool keyword-search using the SDK.

  • The client (client.js) sends an MCP request with file path and keyword.

  • The server reads the file, finds matching lines, and returns the result.


Example File

sample.txt

Hello world
This is Tushar
Keyword search test

Example Request:

{
  "filePath": "sample.txt",
  "keyword": "Tushar"
}

Response

Found 1 line(s):
This is Tushar

Screenshots

Salesforce Custom Object Screenshot

MCP Server Output Screenshot


License

This project is licensed under the MIT License - see the LICENSE file for details.


Contact

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TuShArBhArDwA/mcp-keyword-search-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server