RESSL-MCP-SERVER

r1cksync/RESSL-MCP-SERVER

3.2

If you are the rightful owner of RESSL-MCP-SERVER and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

This project implements a Model Context Protocol (MCP) server with a tool that searches for keywords within files.

Tools
1
Resources
0
Prompts
0

MCP Server - File Keyword Search

This project implements a Model Context Protocol (MCP) server with a tool that searches for keywords within files.

Project Structure

ressl assignment/
├── backend/               # MCP Server implementation
│   ├── src/
│   │   ├── index.ts      # Main server entry point
│   │   └── fileSearch.ts # File search tool implementation
│   ├── package.json
│   ├── tsconfig.json
│   └── README.md         # Detailed backend documentation
├── frontend/             # (Reserved for future UI)
└── task.txt             # Project requirements

Task Description

Task: MCP Server Development

  • Build an MCP server
  • Implement a tool that searches for a specified keyword within a file

Quick Start

  1. Navigate to the backend directory:

    cd backend
    
  2. Install dependencies:

    npm install
    
  3. Build the project:

    npm run build
    
  4. Run the server:

    npm start
    

Features

✅ MCP Server implementation using @modelcontextprotocol/sdk ✅ File keyword search tool with the following capabilities:

  • Search any text file for specified keywords
  • Case-sensitive and case-insensitive search modes
  • Returns line numbers and content with highlighted matches
  • Handles multiple matches per line
  • Comprehensive error handling

Tool: search_file

The implemented tool allows searching for keywords in files:

Parameters:

  • filePath: Path to the file to search
  • keyword: The keyword to search for
  • caseSensitive: Optional boolean for case-sensitive search (default: false)

Returns:

  • All matching lines with line numbers
  • Matches highlighted with ** markers
  • Total count of matches

Technology Stack

  • Language: TypeScript
  • Runtime: Node.js
  • MCP SDK: @modelcontextprotocol/sdk
  • Module System: ES Modules (ESM)

Documentation

For detailed information about the MCP server implementation, see .

Testing

A test file is provided at backend/test-file.txt for testing the search functionality.

License

MIT