Cricket Mcp Server

by tarun7r

370 downloads
Not rated
GitHub

About

A MCP server for fetching cricket data from Cricbuzz, including player statistics, live match scores, upcoming schedules, and the latest news.

Details

Author
tarun7r
Downloads
370
Categories
Other

- Player statistics across Test, ODI, and T20 formats
- Live match fetching with current status
- Upcoming match schedule retrieval
- Latest cricket news headlines and descriptions
- Comprehensive error handling for network and data issues

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Cricket Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies with pip install -r requirements.txt, then configure the server in an MCP client using the command python cricket_server.py with stdio transport. Optionally run the Gradio web UI by setting the GOOGLE_API_KEY environment variable and executing python cricket_gradio.py.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "cricket mcp server": {
            "cricket": {
                "command": "python",
                "args": [
                    "cricket_server.py"
                ],
                "cwd": "/path/to/cricket-mcp-server"
            }
        }
    }
}

McpServers

{
    "cricket": {
        "command": "python",
        "args": [
            "cricket_server.py"
        ],
        "cwd": "/path/to/cricket-mcp-server"
    }
}

Cricket MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cricket data from Cricbuzz. This server offers real-time cricket statistics, player information, match schedules, and news updates.

Features

- Player Statistics: Get detailed cricket player stats including batting and bowling records across all formats (Test, ODI, T20)
- Live Matches: Fetch currently ongoing cricket matches
- Match Schedule: Get upcoming cricket match schedules
- Cricket News: Latest cricket news and updates

Installation

1. Clone or download this repository
2. Install the required dependencies:

pip install -r requirements.txt

Demo: Gradio Web UI

You can interact with the Cricket MCP Server using a conversational web interface powered by Gradio and Gemini.

1. Set your Gemini API key

You need a Google Gemini API key to use the conversational agent. Set it as an environment variable:

export GOOGLE_API_KEY="your-gemini-api-key"

2. Run the Gradio demo

python cricket_gradio.py

This will launch a web UI in your browser where you can chat with the cricket assistant, ask for stats, live matches, news, and more.

> Tip: The chat UI supports conversation memory and rich responses.

Demo Screenshot

Usage

Running as an MCP Server

The server can be integrated with MCP clients. Here's how to configure it:


    {
        "cricket": {
            "command": "python",
            "args": ["cricket_server.py"],
            "transport": "stdio",
        }
    }

For a more flexible setup, you can use environment variables to define the python executable and server script path.

Running Standalone

For testing purposes, you can run the server directly:

python cricket_server.py

Available Tools

1. get_player_stats

Get comprehensive cricket player statistics.

Parameters:
- player_name (str): Name of the cricket player
- match_format (str, optional): Specific format ("Test", "ODI", "T20"). If not provided, returns all formats.

Returns:
- Player basic info (name, country, role, image)
- ICC rankings for batting and bowling
- Detailed batting statistics
- Detailed bowling statistics

Example:
```python

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.