@claudinho/mcp 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +23 -13
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3465,6 +3465,9 @@ function formatShareSnippet(input, options = {}) {
|
|
|
3465
3465
|
blocks.push(card.join("\n"));
|
|
3466
3466
|
}
|
|
3467
3467
|
}
|
|
3468
|
+
if (input.degraded && input.matches.length > 0) {
|
|
3469
|
+
blocks.push("(Live data unavailable \u2014 showing the bundled schedule, not live scores.)");
|
|
3470
|
+
}
|
|
3468
3471
|
blocks.push(
|
|
3469
3472
|
shareFooter({
|
|
3470
3473
|
source: input.source,
|
|
@@ -3689,8 +3692,9 @@ async function toolGetToday(args) {
|
|
|
3689
3692
|
const { matches, degraded, source } = await getMatchesForDate(adapter, date);
|
|
3690
3693
|
const todays = fixturesByDate(date, matches, args.tz);
|
|
3691
3694
|
const opts = fmtOpts(args);
|
|
3692
|
-
|
|
3695
|
+
let text = `Matches on ${date}:
|
|
3693
3696
|
${matchList(todays, "No matches scheduled.", opts)}`;
|
|
3697
|
+
if (degraded) text += "\n\n(Live scores unavailable \u2014 showing the bundled schedule.)";
|
|
3694
3698
|
const marketSignals = await reliableMarketData(args, todays);
|
|
3695
3699
|
return {
|
|
3696
3700
|
text: withDisclaimer(text, source),
|
|
@@ -3708,7 +3712,7 @@ async function toolGetLive(args = {}) {
|
|
|
3708
3712
|
const adapter = resolveAdapter(args);
|
|
3709
3713
|
const { matches, degraded, source } = await getLiveMatches(adapter);
|
|
3710
3714
|
const opts = fmtOpts(args);
|
|
3711
|
-
const text = `Live now:
|
|
3715
|
+
const text = degraded ? "Live scores unavailable right now \u2014 could not reach the data provider." : `Live now:
|
|
3712
3716
|
${matchList(matches, "No matches in play right now.", opts)}`;
|
|
3713
3717
|
return {
|
|
3714
3718
|
text: withDisclaimer(text, source),
|
|
@@ -3728,8 +3732,9 @@ async function toolGetMatch(args) {
|
|
|
3728
3732
|
if (s && isReliableMarketSignal(s, { now })) marketSignal = s;
|
|
3729
3733
|
}
|
|
3730
3734
|
const base = matchLine(match, opts);
|
|
3731
|
-
|
|
3735
|
+
let text = marketSignal ? `${base}
|
|
3732
3736
|
${marketBlock(marketSignal, match).join("\n")}` : base;
|
|
3737
|
+
if (degraded) text += "\n\n(Live state unavailable \u2014 showing the scheduled fixture.)";
|
|
3733
3738
|
return {
|
|
3734
3739
|
text: withDisclaimer(text, liveSource),
|
|
3735
3740
|
data: {
|
|
@@ -3869,6 +3874,7 @@ function shareResult(kind, target, team, input, options) {
|
|
|
3869
3874
|
target,
|
|
3870
3875
|
...team ? { team } : {},
|
|
3871
3876
|
source: input.source ?? null,
|
|
3877
|
+
degraded: input.degraded ?? false,
|
|
3872
3878
|
informationalOnly: true,
|
|
3873
3879
|
style: options.style ?? "social",
|
|
3874
3880
|
snippet,
|
|
@@ -3886,7 +3892,7 @@ async function toolGetShareSnippet(args) {
|
|
|
3886
3892
|
const options = shareOptions(args);
|
|
3887
3893
|
const signalsFor = (ms) => args.includeMarkets === false ? Promise.resolve(/* @__PURE__ */ new Map()) : reliableSignalMap(args, ms);
|
|
3888
3894
|
if (args.live) {
|
|
3889
|
-
const { matches, source: source2 } = await getLiveMatches(resolveAdapter(args));
|
|
3895
|
+
const { matches, degraded: degraded2, source: source2 } = await getLiveMatches(resolveAdapter(args));
|
|
3890
3896
|
return shareResult(
|
|
3891
3897
|
"live",
|
|
3892
3898
|
"live",
|
|
@@ -3895,7 +3901,9 @@ async function toolGetShareSnippet(args) {
|
|
|
3895
3901
|
title: "Live match pulse",
|
|
3896
3902
|
matches,
|
|
3897
3903
|
source: source2,
|
|
3898
|
-
|
|
3904
|
+
degraded: degraded2,
|
|
3905
|
+
// Feed down ⇒ don't let an empty card read as "nothing is on".
|
|
3906
|
+
emptyNote: degraded2 ? "Live scores unavailable right now \u2014 couldn't reach the data provider." : "No matches in play right now.",
|
|
3899
3907
|
installLine: "npx @claudinho/cli live",
|
|
3900
3908
|
tz: args.tz,
|
|
3901
3909
|
locale: args.lang
|
|
@@ -3905,16 +3913,16 @@ async function toolGetShareSnippet(args) {
|
|
|
3905
3913
|
}
|
|
3906
3914
|
if (args.group) {
|
|
3907
3915
|
const group = args.group.toUpperCase();
|
|
3908
|
-
const { tables, degraded, source: source2 } = await getStandings(resolveAdapter(args), group);
|
|
3916
|
+
const { tables, degraded: degraded2, source: source2 } = await getStandings(resolveAdapter(args), group);
|
|
3909
3917
|
const snippet = formatShareTable(
|
|
3910
3918
|
{
|
|
3911
3919
|
tables,
|
|
3912
3920
|
// Degraded ⇒ static roster, no live provider: don't attribute one, and
|
|
3913
3921
|
// surface the not-live notice (the card gets pasted publicly).
|
|
3914
|
-
source:
|
|
3922
|
+
source: degraded2 ? void 0 : source2,
|
|
3915
3923
|
installLine: `npx @claudinho/cli table ${group}`,
|
|
3916
3924
|
emptyNote: `No group ${group}.`,
|
|
3917
|
-
degraded
|
|
3925
|
+
degraded: degraded2
|
|
3918
3926
|
},
|
|
3919
3927
|
options
|
|
3920
3928
|
);
|
|
@@ -3924,8 +3932,8 @@ async function toolGetShareSnippet(args) {
|
|
|
3924
3932
|
kind: "table",
|
|
3925
3933
|
target: "table",
|
|
3926
3934
|
group,
|
|
3927
|
-
source:
|
|
3928
|
-
degraded,
|
|
3935
|
+
source: degraded2 ? null : source2 ?? null,
|
|
3936
|
+
degraded: degraded2,
|
|
3929
3937
|
informationalOnly: true,
|
|
3930
3938
|
snippet,
|
|
3931
3939
|
tables: tables.map((tb) => ({ group: tb.group, standings: tb.rows }))
|
|
@@ -3933,7 +3941,7 @@ async function toolGetShareSnippet(args) {
|
|
|
3933
3941
|
};
|
|
3934
3942
|
}
|
|
3935
3943
|
if (args.matchId) {
|
|
3936
|
-
const { match, source: source2 } = await getMatchById(resolveAdapter(args), args.matchId);
|
|
3944
|
+
const { match, degraded: degraded2, source: source2 } = await getMatchById(resolveAdapter(args), args.matchId);
|
|
3937
3945
|
const matches = match ? [match] : [];
|
|
3938
3946
|
return shareResult(
|
|
3939
3947
|
"match",
|
|
@@ -3944,6 +3952,7 @@ async function toolGetShareSnippet(args) {
|
|
|
3944
3952
|
matches,
|
|
3945
3953
|
marketSignals: await signalsFor(matches),
|
|
3946
3954
|
source: source2,
|
|
3955
|
+
degraded: degraded2,
|
|
3947
3956
|
emptyNote: `No match found with id ${args.matchId}.`,
|
|
3948
3957
|
installLine: `npx @claudinho/cli match ${args.matchId}`,
|
|
3949
3958
|
tz: args.tz,
|
|
@@ -3974,7 +3983,7 @@ async function toolGetShareSnippet(args) {
|
|
|
3974
3983
|
);
|
|
3975
3984
|
}
|
|
3976
3985
|
const date = args.date ?? localDate((/* @__PURE__ */ new Date()).toISOString(), args.tz);
|
|
3977
|
-
const { matches: all, source } = await getMatchesForDate(resolveAdapter(args), date);
|
|
3986
|
+
const { matches: all, degraded, source } = await getMatchesForDate(resolveAdapter(args), date);
|
|
3978
3987
|
const todays = fixturesByDate(date, all, args.tz);
|
|
3979
3988
|
const human = formatDate(`${date}T12:00:00.000Z`, { tz: args.tz, locale: args.lang });
|
|
3980
3989
|
return shareResult(
|
|
@@ -3986,6 +3995,7 @@ async function toolGetShareSnippet(args) {
|
|
|
3986
3995
|
matches: todays,
|
|
3987
3996
|
marketSignals: await signalsFor(todays),
|
|
3988
3997
|
source,
|
|
3998
|
+
degraded,
|
|
3989
3999
|
emptyNote: `No matches scheduled for ${human}.`,
|
|
3990
4000
|
installLine: "npx @claudinho/cli today",
|
|
3991
4001
|
tz: args.tz,
|
|
@@ -3997,7 +4007,7 @@ async function toolGetShareSnippet(args) {
|
|
|
3997
4007
|
|
|
3998
4008
|
// src/server.ts
|
|
3999
4009
|
var SERVER_NAME = "claudinho";
|
|
4000
|
-
var SERVER_VERSION = "0.5.
|
|
4010
|
+
var SERVER_VERSION = "0.5.1";
|
|
4001
4011
|
var VOICE = asFlavorLevel(process.env.CLAUDINHO_FLAVOR) === "off" ? "" : `
|
|
4002
4012
|
Voice: when relaying scores, narrate with lively, regionally-appropriate football-commentary energy in the user's language. Each match line may end with a short exclamation ("\u2014 \xA1GOOOOL!") \u2014 use it as a tone cue. Keep every fact exact; never invent details and never impersonate or name a real commentator.`;
|
|
4003
4013
|
var INSTRUCTIONS = `Claudinho serves live scores, fixtures, and group standings for the 2026 men's football tournament.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claudinho/mcp",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"mcpName": "io.github.arturogarrido/claudinho",
|
|
5
5
|
"description": "MCP server for the 2026 men's football tournament — live scores, fixtures, standings, read-only prediction-market signals, and paste-ready match cards. Works with Claude Code, Cursor, Codex, Windsurf, Zed. Not affiliated with FIFA or Anthropic.",
|
|
6
6
|
"type": "module",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"tsup": "^8.0.0",
|
|
55
55
|
"typescript": "^5.7.0",
|
|
56
56
|
"vitest": "^4.1.0",
|
|
57
|
-
"@claudinho/core": "0.5.
|
|
57
|
+
"@claudinho/core": "0.5.1"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsup",
|