sohv/simple-mcp-server
3.2
If you are the rightful owner of simple-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 provides a Model Context Protocol (MCP) server for keyword searching in files, featuring both an Express HTTP server and an MCP server using stdio transport.
Tools
1
Resources
0
Prompts
0
Simple MCP Server
This project contains a proper MCP (Model Context Protocol) server for keyword searching in files.
Files
server.js- Express HTTP server (original implementation)mcp-server.js- MCP server implementation using stdio transportmcp-config.json- Configuration file for MCP clients
MCP Inspector Setup
MCP Inspector is a debugging tool that allows you to test and inspect your MCP server.
Installation
You can run the MCP Inspector using:
npm run inspector
This will start the MCP Inspector with your server, opening a web interface where you can:
- Test the
search_filetool - Inspect server capabilities
- Debug requests and responses
- Monitor server communication
Using the MCP Server
The MCP server provides a search_file tool that searches for keywords in files.
Tool Parameters:
keyword(string, required): The keyword to search forfile(string, required): The file path to search in
Example Usage in MCP Inspector:
- Run
npm run inspector - Open the web interface that appears
- Use the
search_filetool with parameters like:{ "keyword": "hello", "file": "sample.txt" }
Running the Servers
- MCP Server:
npm run mcp(runs on stdio) - MCP Inspector:
npm run inspector(opens debugging interface)
Endpoints
GET /search— HTTP GET endpoint on the Express server. Query parameters:keyword(string) andfile(path). Returns JSON withoccurrencesand matchinglines.POST /mcp— HTTP POST endpoint on the Express server (basic MCP connection/info endpoint used by the original Express implementation).- MCP (stdio) tool:
search_file— The MCP stdio server (mcp-server.js) exposes asearch_filetool which accepts{ "keyword": "...", "file": "..." }and returns match details (line numbers and contents).