home / mcp / reality calendar mcp server
Тестовое задание с MCP-сервером
Configuration
View docs{
"mcpServers": {
"alex-kamikaze-mcp-reality-calendar-test-task": {
"command": "uv",
"args": [
"run",
"mcp",
"dev",
"app.py"
],
"env": {
"HOST": "127.0.0.1",
"PORT": "8001",
"FILENAME": "data.xlsx",
"DATABASE_URI": "sqlite:///cache.db",
"CREDENTIALS_PATH": "./token.json"
}
}
}
}You will run a cache-enabled MCP server that interfaces with a Google Drive Excel file to provide tool data to an agent. It uses a local SQLite cache and background synchronization to keep data fresh, exposed through an OpenAI-compatible proxy so you can call tools securely from an OpenWebUI client.
You operate the MCP server by running it locally and then connecting an MCP client (such as an OpenWebUI setup) to invoke the available tools. The server exposes data about instruments and their descriptions, sourced from a Google Drive Excel file and cached locally for fast responses. Start the server, ensure the cache is loaded, and then request tools through the client. If you request tool information or actions, the server will use the cached data and background sync to keep the content up to date.
Key usage pattern: after starting, use your MCP client to call the provided tools. The system will fetch data from the local cache first and refresh in the background on a schedule, ensuring fast responses while staying in sync with the source file on disk.
Prerequisites you need: a Python environment compatible with the project, and a container or local runtime for running the MCP server. You will also provide a Google Drive credentials workflow to authorize access to the data source.
1) Prepare a working directory for the server and create an environment file with the required settings.
2) Create the environment file with the following parameters:
DATABASE_URI="sqlite:///cache.db"
CREDENTIALS_PATH="./token.json"
FILENAME="data.xlsx"
HOST="127.0.0.1"
PORT=8001To test the project locally, execute the test server command. This runs a development MCP server and opens a visual interface where you can validate that the functions behave as expected.
uv run mcp dev app.pyCreate a Google Cloud Platform project, enable Google Drive API, and set up an OAuth Desktop client. Save the downloaded credentials as credentials.json in the same folder as main.py. The application will prompt you to authorize your Google account and will generate token.json for future access.
SQLite-backed cache that stores parsed data from the Excel file and serves fast responses to queries.
APScheduler-based background tasks that periodically synchronize the on-disk Excel data with the cache.
Google Drive API client used to access the Excel file containing tool data.
OpenWebUI-compatible OpenAI proxy integration via mcpo to enable proxying tool calls.
Requests + BeautifulSoup-based scrapers to fetch and validate tool data from official instrument pages.