A Modular Command-line Program for fetching and filtering NFL transaction data, including player movements, injuries, disciplinary actions, and more from ProSportsTransactions.com.
A Modular Command-line Program (MCP) for scraping NFL transaction data from ProSportsTransactions.com.
# Clone the repository git clone cd nfl_transactions_mcp # Install requirements pip install -r requirements.txt
To use this MCP with Cursor, add the following configuration to your .cursor/mcp.json
file:
{ "mcpServers": { "nfl-transactions": { "command": "python server.py", "env": {} } } }
# Run the MCP server via Cursor cursor run-mcp nfl-transactions
Fetches NFL transactions based on specified filters.
Parameters:
start_date
(required): Start date in YYYY-MM-DD formatend_date
(required): End date in YYYY-MM-DD formattransaction_type
(optional, default: "All"): Type of transaction to filterteam
(optional): Team nameplayer
(optional): Player nameoutput_format
(optional, default: "json"): Output format (csv, json, or dataframe)Example:
{ "jsonrpc": "2.0", "method": "fetch_transactions", "params": { "start_date": "2023-01-01", "end_date": "2023-12-31", "transaction_type": "Injury", "team": "Patriots" }, "id": 1 }
Lists all NFL teams available for filtering.
Example:
{ "jsonrpc": "2.0", "method": "list_teams", "id": 2 }
Lists all transaction types available for filtering.
Example:
{ "jsonrpc": "2.0", "method": "list_transaction_types", "id": 3 }
This MCP is designed to be easily integrated with AI agents or super agents. An agent can make JSON-RPC requests to interact with this MCP and retrieve NFL transaction data based on user queries.
Example agent integration:
# Example of an agent calling the MCP import json import subprocess def call_mcp(method, params=None): request = { "jsonrpc": "2.0", "method": method, "params": params or {}, "id": 1 } # Call the MCP via cursor cmd = ["cursor", "run-mcp", "nfl-transactions"] proc = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True) # Send the request and get the response response, _ = proc.communicate(json.dumps(request)) return json.loads(response) # Example: Get Patriots injury transactions from 2023 result = call_mcp("fetch_transactions", { "start_date": "2023-01-01", "end_date": "2023-12-31", "transaction_type": "Injury", "team": "Patriots" }) print(f"Found {len(result['data'])} transactions")
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!