KrishnaMore19/mcp-server-1
3.2
If you are the rightful owner of mcp-server-1 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.
A Model Context Protocol (MCP) server designed for searching keywords in text files.
Tools
1
Resources
0
Prompts
0
MCP File Search Server
A Model Context Protocol (MCP) server for searching keywords in files.
Features
- Search for keywords in text files
- Case-sensitive and case-insensitive search options
- Returns matching lines with line numbers
- Error handling for file access issues
Installation
git clone https://github.com/YOUR_USERNAME/mcp-file-search-server.git
cd mcp-file-search-server
yarn install
Usage
Run with MCP Inspector:
npx @modelcontextprotocol/inspector node index.js
Tool: search_file
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| filePath | string | Yes | Path to the file to search |
| keyword | string | Yes | Keyword to search for |
| caseSensitive | boolean | No | Case-sensitive search (default: false) |
Example Input
{
"filePath": "./sample.txt",
"keyword": "Hello",
"caseSensitive": false
}
Example Output
{
"success": true,
"filePath": "C:\\Users\\krish\\Desktop\\mcp\\mcp-file-search-server\\sample.txt",
"keyword": "Hello",
"caseSensitive": false,
"totalMatches": 8,
"matches": [
{
"lineNumber": 1,
"content": "Hello World"
},
{
"lineNumber": 3,
"content": "Hello again from line 3"
}
]
}
Technologies
- Node.js
- @modelcontextprotocol/sdk v1.20.2
- Zod for validation
License
MIT
Screenshot: