Keyword Search MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
β MCP Server β Keyword Search Tool (Case-Insensitive)
This project is a simple MCP (Model Context Protocol) Server built using FastAPI. It includes a tool that allows users to search for a keyword inside a file (case-insensitive).
π Documentation
You can view the detailed documentation here:
Assignment Documentation
Related MCP server: MCP Keyword Search
π Project Structure
mcp-server/
βββ server.py
βββ tools/
β βββ __init__.py
β βββ search_tool.py
βββ requirements.txt
βββ README.mdβοΈ 1. Setup Instructions
β Step 1: Clone or Create Project Folder
cd mcp-serverβ Step 2: Create and Activate Virtual Environment (Optional but Recommended)
python -m venv venv
# Activate it:
# On Windows:
venv\Scripts\activate
# On Linux/Mac:
source venv/bin/activateβ Step 3: Install Dependencies
pip install -r requirements.txtπ 2. Run the MCP Server
uvicorn server:app --reload --port 8000If successful, you will see:
Uvicorn running on http://127.0.0.1:8000Visit in browser:
http://127.0.0.1:8000Or API docs (auto-generated):
http://127.0.0.1:8000/docsπ 3. Search Keyword in a File (API Usage)
β
Request Format (POST /search)
{
"file_path": "path/to/file.txt",
"keyword": "example"
}β
Example using curl:
curl -X POST "http://127.0.0.1:8000/search" \
-H "Content-Type: application/json" \
-d '{"file_path": "sample.txt", "keyword": "hello"}'β Example Response:
{
"results": [
"Line 2: Hello World",
"Line 5: hElLo again"
]
}π 4. Code Summary
server.py
Defines API endpoint /search.
β 5. Features
β FastAPI-powered MCP server β Case-insensitive keyword search β Shows line number + text where keyword exists β Error handling for missing files
π 6. Future Improvements (Optional)
πΉ Search across directories
πΉ Regex support
πΉ Return JSON with
{line_number, content}formatπΉ File type filtering (.txt, .py, .md, etc.)
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Securely search and manage workspace context files for AI agents and teams.
Read and search folders on your own computer with explicit consent. Files are never uploaded.
An MCP server for search and retrieval over a local LanceDB database
Ingest and search LogsLoom logs from coding agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides programmatic search functionality for Obsidian vaults through a REST API interface, allowing external applications to search through notes and retrieve absolute paths to matching documents.230MIT
- FlicenseNot gradedqualityDmaintenanceEnables keyword searching within text files with configurable case sensitivity, returning matching lines with line numbers and occurrence counts.-
- FlicenseNot gradedqualityDmaintenanceEnables searching for keywords within files with case-sensitive/insensitive options, returning matching lines with line numbers for easy reference.-
- AlicenseNot gradedqualityDmaintenanceEnables searching for keywords in files with support for case-sensitive/insensitive matching, returning line numbers, full line content, and match counts for all occurrences.MIT