How to integrate Api sports MCP with OpenCode

How to integrate Api sports MCP with OpenCode This guide explains how to connect Api sports MCP to OpenCode using Composio Connect, which simplifies OAuth, API changes, and reliability concerns. There are two ways to set this up: Via Composio Connect MCP Via the Composio CLI

Api sports logoApi sports
Api Key

Api sports is a comprehensive sports data platform covering 2,000+ competitions with live scores and 15+ years of stats. Instantly access up-to-date sports information for analysis, apps, or chatbots.

67 Tools

How to integrate Api sports MCP with OpenCode

This guide explains how to connect Api sports MCP to OpenCode using Composio Connect, which simplifies OAuth, API changes, and reliability concerns.

There are two ways to set this up:

Also integrate Api sports with

Why use Composio?

Composio provides a single MCP server or CLI tool that exposes a set of meta-tools, allowing you to:

  • Connect to 1,000+ apps with on-demand tool loading, so you do not fill your LLM context window with unnecessary tool definitions.
  • Use programmatic tool calling through a remote Bash tool, letting LLMs write their own code to handle complex tool chaining. This reduces back-and-forth for frequent tool calls.
  • Handle large tool responses outside the LLM context to keep conversations lean.

Connect Api sports with OpenCode

Option 1: Using Composio CLI

1. Install Composio CLI

Install the Composio CLI, authenticate, and initialize your project:

bash
# Install the Composio CLI
curl -fsSL https://composio.dev/install | bash

# Authenticate with Composio
composio login

During login, you will be redirected to the sign-in page. Finish the flow and you are all set.

Composio CLI authorization screen

2. Authorize Api sports

Once the CLI is installed, it is essentially done. Give OpenCode access to your apps with these steps:

  1. Launch OpenCode.
  2. Prompt it to "Authenticate with Api sports Composio".
  3. Complete the authentication and authorization flow, and your Api sports integration is all set.
  4. Start asking anything you want.

Option 2: Using Composio MCP

You can also connect Api sports to OpenCode by adding Composio as an MCP server through the OpenCode CLI.

1. Add the Composio MCP server

bash
opencode mcp add

This launches an interactive prompt.

2. Fill in the fields

FieldValue
Namecomposio
Typeremote
URLhttps://connect.composio.dev/mcp
Require OAuthYes
Have client IDNo
OpenCode MCP server interactive prompt for Composio

Alternatively, you can skip the interactive prompt and paste the configuration directly into your OpenCode config file.

Open your global OpenCode config:

bash
open ~/.config/opencode/opencode.json

Add this under the mcp key and save the file.

bash
{
  "mcp": {
    "composio": {
      "type": "remote",
      "url": "https://connect.composio.dev/mcp",
      "enabled": true
    }
  }
}

3. Authenticate

Authenticate the Composio MCP server you just added:

bash
opencode mcp auth composio

This opens a browser session. Authorize Composio and you are done.

Composio browser authorization for OpenCode MCP

4. Verify installation

bash
opencode mcp list

5. Connect Api sports with OpenCode

Now, in the chat, ask the agent to connect to Api sports or give it any Api sports-related task.

For example, ask it to:

  • "Show today's football fixtures for La Liga"
  • "Get head-to-head record for Chelsea vs Arsenal"
  • "List injured players in Premier League this week"

It will prompt you to authenticate and authorize access to Api sports.

That is it. Composio tools are now available in OpenCode, and your Api sports account is ready to use.

Way Forward

Now that Api sports is connected, extend your setup by connecting the other apps you already use every day, so your agent can run true cross-app workflows end to end.

  • Connect Calendar to turn threads into scheduled meetings automatically.
  • Connect Slack or Teams to post summaries, approvals, and alerts where your team works.
  • Connect Notion, Linear, Jira, or Asana to convert requests into tickets, tasks, and docs.
  • Connect Drive, Dropbox, or OneDrive to fetch, file, and share attachments without manual steps.

Start with one workflow you do repeatedly, then keep adding apps as you find new handoffs. With everything behind a single MCP endpoint, your agent can coordinate multiple tools safely and reliably in one conversation.

TOOLS

Supported Tools

Every Api sports action and event your agent gets out of the box.

Get AFL Games

Tool to retrieve AFL games and matches.

Get AFL Game Player Statistics

Tool to retrieve player statistics from AFL (Australian Football League) game(s).

Get AFL Seasons

Tool to get the list of available seasons for AFL.

Get AFL Standings

Tool to retrieve AFL standings for a league.

Get Baseball Games Head-to-Head

Tool to get head-to-head baseball games between two teams.

Get Basketball Bets

Tool to get all available basketball bet types.

Get Basketball Bookmakers

Tool to get all available basketball bookmakers.

Get basketball statistics

Tool to get basketball statistics for a team in a given league and season.

Get Formula 1 Circuits

Tool to get the list of available Formula 1 circuits.

Get Coaches

Tool to fetch coaches and their career history.

Get Countries

Tool to fetch available countries for league queries.

Get Fighters Records

Tool to get fighter career statistics.

Get Fixtures

Tool to retrieve football fixtures/matches.

Get fixtures events

Tool to get events (goals, cards, substitutions, VAR, etc.

Get Head-to-Head Fixtures

Tool to get head-to-head fixtures between two teams.

Get Fixture Lineups

Tool to retrieve starting XI and substitutes for a fixture.

Get fixtures players

Tool to get player statistics from a fixture.

Get Fixtures Rounds

Tool to get the rounds for a league or cup.

Get fixture statistics

Tool to get statistics for a fixture.

Get Formula 1 Competitions

Tool to retrieve Formula 1 competitions (Grand Prix races).

Get Formula 1 Races

Tool to retrieve Formula 1 race information for a given season.

Get Formula 1 Starting Grid

Tool to retrieve the starting grid for a Formula 1 race.

Get games events

Tool to get events (goals, penalties, etc.

Get AFL Games Quarters

Tool to retrieve AFL game quarter scores.

Get game statistics by teams

Tool to get team statistics from a game by ID.

Get Injuries

Tool to get injured or suspended players.

Get Leagues

Tool to retrieve leagues and cups.

Get League Seasons

Tool to get the list of available seasons for all leagues.

Get MMA Categories

Tool to fetch the list of all available MMA categories.

Get MMA Fighters

Tool to fetch MMA fighters data.

Get MMA Fights

Tool to retrieve the list of MMA fights according to given parameters.

Get MMA Fight Results

Tool to retrieve results from one or several MMA fights.

Get MMA Fighter Statistics

Tool to get fighter statistics from MMA fights.

Get NBA game statistics

Tool to get NBA game statistics including player stats for both teams.

Get NFL Standings Conferences

Tool to retrieve the list of available conferences for the NFL to be used in the standings endpoint.

Get Odds

Tool to fetch pre-match odds.

Get Odds Bets

Tool to get all available pre-match bet types.

Get Odds Bookmakers

Tool to list all available pre-match bookmakers.

Get In-Play Odds

Tool to fetch in-play odds for fixtures in progress.

Get Live Odds Bets

Tool to fetch all available bet types for in-play odds.

Get Odds Mapping

Tool to get the list of available fixture IDs for the odds endpoint.

Get Players

Tool to get player statistics.

Get Players Profiles

Tool to get the list of all available players.

Get Players Seasons

Tool to list all available seasons for player statistics.

Get Players Squads

Tool to get player squads.

Get player statistics

Tool to get player statistics for a specific basketball game.

Get Players Teams

Tool to get the list of teams and seasons in which a player played during his career.

Get Players Top Assists

Tool to get the 20 best players (top assists) for a league or cup.

Get Players Top Red Cards

Tool to get the 20 players with the most red cards for a league or cup.

Get Players Top Scorers

Tool to get the 20 best players (top scorers) for a league or cup.

Get Players Top Yellow Cards

Tool to get the 20 players with the most yellow cards for a league or cup.

Get Predictions

Tool to get predictions about a fixture.

Get Formula 1 Driver Rankings

Tool to retrieve Formula 1 driver rankings for a season.

Get Fastest Laps Rankings

Tool to get the ranking of the fastest laps for a Formula 1 race.

Get Race Rankings

Tool to retrieve rankings for a specific Formula 1 race.

Get Formula 1 Team Rankings

Tool to retrieve Formula 1 team rankings for a specific season.

Get Sidelined

Tool to get sidelined information (injuries, suspensions, etc.

Get Standings Divisions

Tool to retrieve the list of available divisions for an NFL competition to be used in the standings endpoint.

Get Standings Groups

Tool to retrieve the list of available groups for a league to be used in the standings endpoint.

Get Standings Stages

Tool to retrieve the list of available stages for a league to be used in the standings endpoint.

Get Teams

Tool to retrieve available teams.

Get Team Seasons

Tool to get the list of seasons available for a team.

Get team statistics

Tool to get detailed statistics of a team for a given league and season.

Get Timezone

Tool to fetch the complete list of available timezones for fixture queries.

Get Transfers

Tool to get all available transfers for players and teams.

Get Trophies

Tool to get trophies for a player or coach.

Get Venues

Tool to retrieve available venues.

FAQ

Frequently asked questions

With a standalone Api sports MCP server, the agents and LLMs can only access a fixed set of Api sports tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Api sports and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. OpenCode fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Api sports tools.

Yes, absolutely. You can configure which Api sports scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Api sports data and credentials are handled as safely as possible.

Start with Api sports.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Api sports tool your agent needs.Free to start.

Start building