{"id":29504500,"url":"https://github.com/austinnoronha/mcp_server_with_uv","last_synced_at":"2026-05-05T11:36:30.437Z","repository":{"id":303963509,"uuid":"1017322231","full_name":"austinnoronha/mcp_server_with_uv","owner":"austinnoronha","description":"This is a sample Model Context Protocol (MCP) server built with Python, demonstrating how to expose tools and resources to LLMs and MCP clients.","archived":false,"fork":false,"pushed_at":"2025-07-10T15:07:30.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-10T18:43:54.725Z","etag":null,"topics":["fastapi","learning","mcp","mcp-server","python","python3","uv"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/austinnoronha.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-10T11:03:15.000Z","updated_at":"2025-07-10T15:07:34.000Z","dependencies_parsed_at":"2025-07-10T18:49:20.929Z","dependency_job_id":"673aeaa8-b181-44c8-a62f-c1068779c4b2","html_url":"https://github.com/austinnoronha/mcp_server_with_uv","commit_stats":null,"previous_names":["austinnoronha/mcp_server_with_uv"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/austinnoronha/mcp_server_with_uv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinnoronha%2Fmcp_server_with_uv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinnoronha%2Fmcp_server_with_uv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinnoronha%2Fmcp_server_with_uv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinnoronha%2Fmcp_server_with_uv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austinnoronha","download_url":"https://codeload.github.com/austinnoronha/mcp_server_with_uv/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austinnoronha%2Fmcp_server_with_uv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265465929,"owners_count":23770459,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastapi","learning","mcp","mcp-server","python","python3","uv"],"created_at":"2025-07-15T23:02:06.456Z","updated_at":"2026-05-05T11:36:25.414Z","avatar_url":"https://github.com/austinnoronha.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cricket Prediction MCP Server\n\n[![Python](https://img.shields.io/badge/Python-3.10%2B-blue?logo=python)](https://www.python.org/)\n[![MCP](https://img.shields.io/badge/MCP-ModelContextProtocol-blueviolet)](https://modelcontextprotocol.io/)\n[![uv](https://img.shields.io/badge/uv-fast%20Python%20installer-brightgreen)](https://astral.sh/uv/)\n\n![MCP Client Start](./media/screen_start.png)\n![MCP Client Tools](./media/screen_tool_use.png)\n![MCP Client Tools](./media/screen_tool_captian.png)\n![MCP Client GUI with Bootstrap/jQuery](./media/screen_gui_chat.png)\n\nThis is a sample [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server built with Python, demonstrating how to expose tools and resources to LLMs and MCP clients. It also includes a sample MCP client that integrates with Google Gemini.\n\n## Features\n\n- **Predict Winner Tool**: Predicts the winner between two cricket teams (mock logic).\n- **Get Player Stats Tool**: Returns mock stats for a cricket player.\n- **Get Indian Captian Information Tool**: Returns mock stats or leader stats for a cricket player, including trophies and retirement status.\n- **Match Data CSV Resource**: Exposes mock cricket match data as a CSV resource, with support for sampling rows.\n- **MCP Client**: Example client using MCP and Google Gemini (API key required).\n- **Web GUI Client**: A Bootstrap + jQuery chat interface for interacting with the MCP server via FastAPI.\n\n## Setup\n\n1. **Install [uv](https://astral.sh/uv/):**\n   ```sh\n   # Follow instructions at https://astral.sh/uv/\n   ```\n2. **Install dependencies:**\n   ```sh\n   uv venv\n   uv add \"mcp[cli]\" httpx pre-commit fastapi uvicorn jinja2 python-dotenv\n   ```\n3. **Set up your Google Gemini API key:**\n   - Create a `.env` file in the project root with the following content:\n     ```env\n     GEMINI_KEY=your-gemini-api-key-here\n     ```\n\n## Pre-commit Hooks\n\nSet up pre-commit hooks to ensure code quality:\n\n1. **Install pre-commit hooks:**\n   ```sh\n   uv run pre-commit install\n   ```\n2. **Run all pre-commit hooks manually:**\n   ```sh\n   uv run pre-commit run --all\n   ```\n\n## Running the Server\n\nRun the MCP server (now named `mcp_server.py`):\n```sh\nuv run mcp dev mcp_server.py\n```\n\n## Running the Client\n\nRun the MCP client (requires `.env` with Gemini API key):\n```sh\nuv run python mcp_client.py\n```\n\n## MCP Client GUI (Bootstrap + jQuery)\n\nA simple web-based chat client is provided using Bootstrap and jQuery, served by FastAPI.\n\n### How to Start the GUI Client\n\n1. **Start the FastAPI backend:**\n   ```sh\n   uvicorn app:app --reload\n   ```\n2. **Open your browser and go to:**\n   ```\n   http://localhost:8000\n   ```\n3. **Use the chat interface to interact with the MCP server.**\n   - Type your message and click \"Send\".\n   - A loading spinner will appear while waiting for a response.\n   - The assistant's reply will be shown in the chat window.\n\n## Usage\n\nThis server exposes the following MCP tools and resources:\n\n### Tools\n- `predict_winner(team1: str, team2: str) -\u003e str`: Predicts the winner between two teams (mock logic).\n- `get_player_stats(player_name: str) -\u003e str`: Returns mock stats for a player.\n- `get_indian_captian_information(player_name: str) -\u003e str`: Returns stats for a cricket player and Indian captain, including trophies won, years range, and retirement status. If the player does not exist, returns a not-exist message.\n\n### Resources\n- `match_data_csv() -\u003e str`: Returns mock match data as CSV. [ToDo]\n\n## About MCP\n\nModel Context Protocol (MCP) standardizes how applications provide context and tools to LLMs. Learn more at [modelcontextprotocol.io](https://modelcontextprotocol.io/).\n\n---\n\nThis project is for demonstration purposes only and uses mock data and logic.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinnoronha%2Fmcp_server_with_uv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustinnoronha%2Fmcp_server_with_uv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustinnoronha%2Fmcp_server_with_uv/lists"}