Skip to main content
Glama
Sports Odds Comparison MCP Server

Sports Odds Comparison MCP Server

README.md
<!-- campaign-validation-warning:start -->
> **Validation warning:** Automated build or test validation did not pass before publication. This project may not work as intended; review and fix it before relying on it. Any claims below that it works or its tests pass may be outdated.
<!-- campaign-validation-warning:end -->

# Sports Odds Comparison MCP Server with Sportmicro API

## Project Overview
This is an MCP server for comparing only the documented odds data that Sportmicro returns for a selected sports-data question. The goal is to build a read-only odds-research MCP server that makes availability, filters, source data, and missing markets explicit to the AI client.

## Features
- Odds-research MCP tools
- Supported sport and event filters
- Structured comparison-ready results
- Missing-data explanations
- Validated tool schemas
- Read-only operation

## Prerequisites
- Node.js
- TypeScript
- @modelcontextprotocol/sdk
- Sportmicro API Key 

## Installation
1. Clone the repository:
   ```bash
   git clone https://github.com/yourusername/sportmicro-odds-comparison-mcp.git
   cd sportmicro-odds-comparison-mcp
   ```
2. Install dependencies:
   ```bash
   npm install
   ```
3. Set up environment variables. Create a `.env` file:
   ```bash
   echo "SPORTMICRO_API_KEY=your_api_key" > .env
   ```

## Environment Variables
- `SPORTMICRO_API_KEY`: Your API key for accessing the Sportmicro API.

## API Usage
### Endpoints
- **Player Projections:**  Get projections for a fixture:
  `GET https://football.sportmicro.com/player-projections?match_id=eq.{match_id}`

### Example Code
```javascript
const response = await fetch(`https://football.sportmicro.com/player-projections?match_id=eq.${matchId}`, {
  headers: {
    Authorization: `Bearer ${process.env.SPORTMICRO_API_KEY}`
  }
});

if (!response.ok) {
  throw new Error(`Sportmicro returned ${response.status}`);
}

const data = await response.json();
console.log(data);
```  

## Project Structure
```plaintext
.
├── src
│   ├── index.ts          # Main entry file
│   ├── api.ts            # API calls to Sportmicro
│   ├── models             # Data models and types
│   └── utils              # Utility functions
├── .env.example           # Example environment file
├── .gitignore             # Git ignore file
├── LICENSE                # License file
└── package.json           # Project metadata and dependencies
```  

## License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.

## Acknowledgments
- [Sportmicro](https://sportmicro.com) for providing the API documentation.