- Home
- MCP servers
- Model Context Protocol
Model Context Protocol
- python
3
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"vijayk-213-model-context-protocol": {
"command": "uvicorn",
"args": [
"mcp_server:app",
"--host",
"127.0.0.1",
"--port",
"8000",
"--reload"
],
"env": {
"GEMINI_API_KEY": "YOUR_GEMINI_API_KEY",
"MCP_SERVER_URL": "http://127.0.0.1:8000"
}
}
}
}You can run an MCP Server that exposes file system operations over HTTP and integrates with the Google Gemini API to summarize file contents. This server lets you read, create, copy, move, and delete files, streaming large files as needed, all through a simple MCP interface. It is built with Python, FastAPI, and the MCP framework, and can be deployed locally or to Cloud Run for scalable access.
How to use
To work with the MCP Server, start by running the local server and then interact with it through an MCP client. The server provides endpoints to read text from files and to invoke MCP functions. You can leverage Gemini-based summarization for content processing as part of your workflows.
How to install
Prerequisites: you need Python 3.9 or newer installed on your machine.
-
Clone the project to your workspace.
-
Create and activate a virtual environment.
-
Install dependencies from the requirements file.
-
Set environment variables for the MCP server and Google Gemini integration.
-
Start the MCP server using the recommended runtime command.
Configuration and startup details
Environment variables you need to configure include the MCP server URL and the Gemini API key. The server will be accessible at the host and port you specify when starting the MCP server.
Example MCP server configuration
{
"mcpServers": {
"filefs": {
"type": "stdio",
"name": "filefs_mcp",
"command": "uvicorn",
"args": ["mcp_server:app", "--host", "127.0.0.1", "--port", "8000", "--reload"],
"env": [
{"name": "MCP_SERVER_URL", "value": "http://127.0.0.1:8000"},
{"name": "GEMINI_API_KEY", "value": "YOUR_GEMINI_API_KEY"}
]
}
}
}
Usage notes
The server supports reading common text-based formats and streaming large files. Use the provided MCP endpoints to read text from files and to invoke functions that leverage Gemini-based summarization for content processing. When you deploy to Cloud Run, ensure the service is exposed with a stable URL and that environment credentials for Gemini are securely provided.
Troubleshooting and tips
If you encounter connection issues, verify that the MCP server is running on the expected host and port, and that the Gemini API key is set correctly. Check that the environment variables are propagated to the running process and that the server has network access to the Gemini API.
Available tools
readTextFromFile
Reads the contents of a text file from the specified path and returns the text content, supporting multiple encodings and streaming for large files.
invokeMcpFunction
Calls an MCP function exposed by the server to perform a specific operation on a file or dataset, enabling chained processing workflows.