tathagat11/my-mcp-server
If you are the rightful owner of my-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 henry@mcphub.com.
A simple Model Context Protocol (MCP) server implemented in Python using FastMCP.
My MCP Server
A simple Model Context Protocol (MCP) server implemented in Python using FastMCP
.
This server provides the following capabilities to an MCP client (like Claude):
- Google Search: Allows the client to perform Google searches via the Custom Search API.
- Memory Store: Allows the client to store and retrieve simple key-value memories persisted in a local JSON file (
data/memories.json
).
Prerequisites
- Python 3.11+
- uv (Python package installer and virtual environment manager)
- Google API Key and Custom Search Engine (CSE) ID for the Google Search tool.
Setup
-
Install
uv
:- PowerShell (Windows):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- Shell (macOS, Linux):
curl -LsSf https://astral.sh/uv/install.sh | sh
- PowerShell (Windows):
-
Clone the Repository:
git clone <your-repository-url> cd my-mcp
-
Create and Activate Virtual Environment:
uv venv # Activate the environment: # Windows (CMD): .venv\Scripts\activate.bat # Windows (PowerShell): .venv\Scripts\Activate.ps1 # macOS/Linux (Bash/Zsh): source .venv/bin/activate
-
Install Dependencies:
uv pip sync pyproject.toml
(This installs dependencies specified in your
pyproject.toml
) -
Configure Environment Variables:
- Create a file named
.env
in the root directory (my-mcp
). - Add your Google API credentials to the
.env
file:GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY_HERE" GOOGLE_CSE_ID="YOUR_GOOGLE_CSE_ID_HERE"
- Replace the placeholder values with your actual key and ID. You can obtain these from the Google Cloud Console (API Key, enable Custom Search API) and the Programmable Search Engine control panel (Search engine ID).
- Create a file named
Running the Server
Ensure your virtual environment is activated. Then, run the main script:
uv run main.py
The server will start and listen for connections from an MCP client using standard input/output (stdio
). The server logs messages, including warnings about missing API keys or tool registration status, to standard error.