Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Keyword Search MCP Serversearch for 'TODO' in my project's README.md file"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ā 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
š 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.)
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.