horse-race-mcp
v0.2.0MCP server exposing the horse-race Turso DB and the V3 odds-pattern recommender to any MCP client (Claude Desktop, ChatGPT Developer Mode, Cursor, etc.).
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
classify_odds_pattern
単勝オッズから V3 戦略のレースパターン (A:断然/B:やや断然/C:2強/D:混戦/E:大混戦) を機械判定します。 返り値には買い方・対象人気・見送り判定が含まれます。
| Parameter | Type | Description |
|---|---|---|
entrants * | array | 出走馬の一覧。popularity と odds は必須。 |
build_buy_order
V3 戦略に基づいてメイン買い目 + サブ (7-8番人気単勝 各100円) を組み立てます。 condition='重' なら全見送り判定になります。
| Parameter | Type | Description |
|---|---|---|
race * | object | |
base_amount | integer | メイン買い目の金額(円)。サブは常に100円ずつ。 |
query_races
race_information テーブルを条件検索。race_name は部分一致 (LIKE)、 year/grade/course は完全一致。既定で直近50件。
| Parameter | Type | Description |
|---|---|---|
course | string | 例: '東京', '京都' |
grade | string | |
limit | integer | |
race_name | string | 例: '天皇賞', 'ダービー' |
year_from | integer | |
year_to | integer |
get_race_results
race_code を指定して、そのレースの全着順・払戻情報を返す。
| Parameter | Type | Description |
|---|---|---|
race_code * | string | race_information.race_code (G1は 'G1_{name}_{year}'、G2/G3は '{year}{id:03d}') |
get_race_odds
race_odds テーブルから単勝確定オッズを取得。race_code / jra_race_code / race_name+year のいずれかで指定可能。
| Parameter | Type | Description |
|---|---|---|
jra_race_code | string | JRA 側 race_code |
race_code | string | netkeiba race_code ('nk_...') |
race_name | string | レース名部分一致検索 |
year | integer |
get_current_entrants
jra_race_code を指定して、classify_odds_pattern / build_buy_order の entrants 入力形式で出走馬一覧を返す。
| Parameter | Type | Description |
|---|---|---|
jra_race_code * | string |
get_popularity_roi
指定馬券種別×グレードにおける人気別の推定回収率(ROI%)を計算。 1番人気単勝 ROI などの基本統計を取る用途。
| Parameter | Type | Description |
|---|---|---|
bet_type | string | |
grade | string | |
popularity | integer | 特定の人気のみに絞る場合 |
get_race_specific_roi
レース名の部分一致で、そのレース名の過去全開催における人気別 ROI を算出。 'オークス', '天皇賞秋', 'ダービー' などで仮説#006 と同じ判定が可能。
| Parameter | Type | Description |
|---|---|---|
race_name * | string | |
bet_type | string |
get_condition_roi
馬場状態別の人気別ROI。重馬場が勝率0%かの検証、不良馬場が有利かの検証に。
| Parameter | Type | Description |
|---|---|---|
bet_type | string | |
grade | string |
list_bet_records
bet_records を日付範囲で取得。履歴閲覧用。
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
race_date_from | string | YYYY-MM-DD |
race_date_to | string | YYYY-MM-DD |
get_bet_summary
指定年(または全期間)の集計: 投資額・払戻・損益・ROI。
| Parameter | Type | Description |
|---|---|---|
year | integer |
add_bet_record
新規馬券購入を記録。HORSE_RACE_MCP_ALLOW_WRITE=1 のときのみ動作。
| Parameter | Type | Description |
|---|---|---|
amount * | integer | |
bet_type * | string | |
numbers * | string | 例: '7', '3-7', '2-5-8' |
race_date * | string | YYYY-MM-DD |
race_name * | string | |
co_fund | integer | |
jra_race_code | string | |
memo | string | |
race_code | string |
update_bet_result
bet_record の結果を更新。payout_self / profit は自己負担比率から自動計算。 HORSE_RACE_MCP_ALLOW_WRITE=1 のときのみ動作。
| Parameter | Type | Description |
|---|---|---|
bet_id * | integer | |
is_hit * | integer | |
payout_total * | number |