@battlegrid/mcp-server 31.2.12 → 31.2.14
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/README.md +62 -23
- package/SKILL.md +4 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -706,33 +706,45 @@ The v3 authoring contract below is unchanged and still current:
|
|
|
706
706
|
|
|
707
707
|
## Quick Start
|
|
708
708
|
|
|
709
|
-
###
|
|
709
|
+
### Remote server, OAuth — start here
|
|
710
710
|
|
|
711
|
-
```
|
|
712
|
-
|
|
711
|
+
```
|
|
712
|
+
https://mcp.battlegrid.trade/mcp
|
|
713
713
|
```
|
|
714
714
|
|
|
715
|
-
|
|
715
|
+
Give that URL to your MCP client over its streamable-http (remote) transport and authorize: the
|
|
716
|
+
client registers itself by Dynamic Client Registration, BattleGrid's consent page opens in your
|
|
717
|
+
browser, and you sign in and click **Authorize**. No npm install, no API key. The grant is listed —
|
|
718
|
+
and revocable — under **Profile → MCP → OAuth Sessions**.
|
|
716
719
|
|
|
717
|
-
|
|
718
|
-
BATTLEGRID_API_KEYS=bg_live_alice_key,bg_live_bob_key npx @battlegrid/mcp-server
|
|
719
|
-
```
|
|
720
|
+
### API key and the stdio proxy — the fallback
|
|
720
721
|
|
|
721
|
-
|
|
722
|
+
Reach for a key when your client has no remote transport at all, when your agent runs headless or in
|
|
723
|
+
CI and cannot open a browser to consent, or when one process drives several BattleGrid accounts. It
|
|
724
|
+
is fully supported for each of those, and nothing about it is deprecated.
|
|
722
725
|
|
|
723
|
-
|
|
726
|
+
**Single account (stdio transport):**
|
|
724
727
|
|
|
728
|
+
```bash
|
|
729
|
+
BATTLEGRID_API_KEY=bg_live_xxx npx @battlegrid/mcp-server
|
|
725
730
|
```
|
|
726
|
-
|
|
731
|
+
|
|
732
|
+
**Multiple accounts (stdio transport):**
|
|
733
|
+
|
|
734
|
+
```bash
|
|
735
|
+
BATTLEGRID_API_KEYS=bg_live_alice_key,bg_live_bob_key npx @battlegrid/mcp-server
|
|
727
736
|
```
|
|
728
737
|
|
|
729
|
-
|
|
738
|
+
When multiple keys are provided, the server discovers each account's identity and injects a required `account` parameter into every tool so the AI agent can choose which account to act as. OAuth has no equivalent — one grant authorizes one account.
|
|
730
739
|
|
|
731
740
|
## Configuration
|
|
732
741
|
|
|
733
742
|
### Claude Desktop
|
|
734
743
|
|
|
735
|
-
**
|
|
744
|
+
**OAuth (no key):** Settings → **Connectors** → **Add custom connector**. Paste
|
|
745
|
+
`https://mcp.battlegrid.trade/mcp`, save, and authorize on the consent page Claude opens.
|
|
746
|
+
|
|
747
|
+
**API key (fallback) — single account:**
|
|
736
748
|
|
|
737
749
|
```json
|
|
738
750
|
{
|
|
@@ -748,7 +760,7 @@ No npm install required — connect directly from any MCP client that supports s
|
|
|
748
760
|
}
|
|
749
761
|
```
|
|
750
762
|
|
|
751
|
-
**
|
|
763
|
+
**API key (fallback) — multiple accounts:**
|
|
752
764
|
|
|
753
765
|
```json
|
|
754
766
|
{
|
|
@@ -766,22 +778,44 @@ No npm install required — connect directly from any MCP client that supports s
|
|
|
766
778
|
|
|
767
779
|
### Claude Code
|
|
768
780
|
|
|
781
|
+
**OAuth (no key):**
|
|
782
|
+
|
|
769
783
|
```bash
|
|
770
|
-
claude mcp add
|
|
784
|
+
claude mcp add --transport http battlegrid https://mcp.battlegrid.trade/mcp
|
|
771
785
|
```
|
|
772
786
|
|
|
773
|
-
|
|
787
|
+
Then start `claude`, run `/mcp`, select **battlegrid** and choose **Authenticate** — the consent page
|
|
788
|
+
opens in your browser and the entry reads connected once you authorize.
|
|
789
|
+
|
|
790
|
+
**API key (fallback):**
|
|
774
791
|
|
|
775
792
|
```bash
|
|
776
793
|
# Single account
|
|
777
|
-
|
|
794
|
+
claude mcp add battlegrid -e BATTLEGRID_API_KEY=bg_live_xxx -- npx @battlegrid/mcp-server
|
|
778
795
|
|
|
779
796
|
# Multiple accounts
|
|
780
|
-
|
|
797
|
+
claude mcp add battlegrid -e BATTLEGRID_API_KEYS=bg_live_alice_key,bg_live_bob_key -- npx @battlegrid/mcp-server
|
|
781
798
|
```
|
|
782
799
|
|
|
783
800
|
### Cursor
|
|
784
801
|
|
|
802
|
+
**OAuth (no key):** Settings → **MCP** → **Add new global MCP server** opens `~/.cursor/mcp.json`.
|
|
803
|
+
|
|
804
|
+
```json
|
|
805
|
+
{
|
|
806
|
+
"mcpServers": {
|
|
807
|
+
"battlegrid": {
|
|
808
|
+
"url": "https://mcp.battlegrid.trade/mcp"
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
Back in Settings → MCP, click **Needs login** on `battlegrid` and authorize on BattleGrid's consent
|
|
815
|
+
page; the entry turns green once its tools load.
|
|
816
|
+
|
|
817
|
+
**API key (fallback):** the same file, with the stdio proxy in place of the remote entry.
|
|
818
|
+
|
|
785
819
|
```json
|
|
786
820
|
{
|
|
787
821
|
"mcpServers": {
|
|
@@ -808,12 +842,16 @@ ChatGPT Desktop connects via **OAuth 2.1** — no npm package or API key needed.
|
|
|
808
842
|
4. ChatGPT discovers OAuth endpoints, registers as a client (Dynamic Client Registration), and opens BattleGrid's consent page
|
|
809
843
|
5. Log in to BattleGrid and click **Authorize**
|
|
810
844
|
|
|
811
|
-
|
|
845
|
+
Authentication is a property of the **path**, not of the client — every client above reaches
|
|
846
|
+
BattleGrid either way, so pick the row that matches your runtime rather than your client:
|
|
847
|
+
|
|
848
|
+
| | Remote + OAuth | API key |
|
|
812
849
|
|---|---|---|
|
|
813
|
-
| **Transport** | stdio proxy (`@battlegrid/mcp-server`)
|
|
814
|
-
| **Auth** | API key (`bg_live_*`)
|
|
815
|
-
| **Setup** |
|
|
816
|
-
| **
|
|
850
|
+
| **Transport** | streamable-http, direct to `mcp.battlegrid.trade` | stdio proxy (`@battlegrid/mcp-server`), or the same URL with a Bearer header |
|
|
851
|
+
| **Auth** | OAuth 2.1 with Dynamic Client Registration | API key (`bg_live_*`) as a Bearer token |
|
|
852
|
+
| **Setup** | paste the URL, authorize in the browser | npm package + env vars |
|
|
853
|
+
| **Needs a browser** | yes, once, to consent | no — works headless and in CI |
|
|
854
|
+
| **Multi-account** | one grant per account | `BATTLEGRID_API_KEYS`, several accounts through one proxy |
|
|
817
855
|
|
|
818
856
|
## Account management
|
|
819
857
|
|
|
@@ -1041,7 +1079,7 @@ Nine skills ship from this repo, all inside the npm tarball (`SKILL.md`, `skills
|
|
|
1041
1079
|
**`battlegrid`** (repo root) is the connection skill and is authored here: how to connect, the
|
|
1042
1080
|
`{ account, request }` envelope, the two scopes, and where to go for everything else.
|
|
1043
1081
|
|
|
1044
|
-
The
|
|
1082
|
+
The nine `skills/battlegrid-*` are **exported from BattleGrid's server repository** — they are the
|
|
1045
1083
|
same instructions BattleGrid's own in-app Commander runs on, which is why they name the same tools
|
|
1046
1084
|
you reach over MCP:
|
|
1047
1085
|
|
|
@@ -1055,6 +1093,7 @@ you reach over MCP:
|
|
|
1055
1093
|
| `battlegrid-strategy-doctor` | Diagnose an agent that is not doing what was expected — why it has not traded, why it stopped, whether it is healthy — from typed fields, then rank the fixes with the exact lever each needs |
|
|
1056
1094
|
| `battlegrid-strategy-examples` | Full-surface composition patterns: custom report sections and header grammar, benchmark sections, condition trees with verdicts and enforcement gates, tiered signal weights and the aggregate gate math, routing gates, ATR trade levels, position management, plus validated desk-grade playbooks and TradingView process ports |
|
|
1057
1095
|
| `battlegrid-trade-analysis` | Read your own trading position: where the money is, whether each agent is doing its job, what is open and how close it sits to its protections, and whether the automation is actually running |
|
|
1096
|
+
| `battlegrid-trade-proposal` | Find and stage a trade for one of your agents: check what is already held, scan every active coin against the agent's own gates, propose on one through the agent's own conversational turn, present the outcome with its conviction, and approve or decline only on your word |
|
|
1058
1097
|
|
|
1059
1098
|
> **`skills/battlegrid-*` is generated — do not edit it here.** It is written by
|
|
1060
1099
|
> `server/scripts/export-mcp-skills.mjs` in `playbattlegrid/battlegrid-app` and arrives by pull
|
package/SKILL.md
CHANGED
|
@@ -7,10 +7,10 @@ description: MCP skill for BattleGrid — play crypto prediction games (Market G
|
|
|
7
7
|
|
|
8
8
|
BattleGrid is a real-time cryptocurrency prediction gaming and trading platform. This MCP server gives AI agents access to play games, author trading strategies, and run strategy-bound intelligence agents.
|
|
9
9
|
|
|
10
|
-
## The other
|
|
10
|
+
## The other nine skills
|
|
11
11
|
|
|
12
12
|
This skill covers **connection**: how to reach BattleGrid, the request envelope, and what each scope
|
|
13
|
-
grants. Everything about *using* the platform lives in the
|
|
13
|
+
grants. Everything about *using* the platform lives in the nine skills installed beside it, exported
|
|
14
14
|
from BattleGrid's own server so they name exactly the tools you reach here:
|
|
15
15
|
|
|
16
16
|
| For | Activate |
|
|
@@ -22,9 +22,10 @@ from BattleGrid's own server so they name exactly the tools you reach here:
|
|
|
22
22
|
| Putting an agent on standing duty (Radar, Arena presets) | `battlegrid-radar-deployment` |
|
|
23
23
|
| Reading the market — regime, funding, leaders, a coin deep-dive | `battlegrid-market-analysis` |
|
|
24
24
|
| Reading your own position, agents, and open trades | `battlegrid-trade-analysis` |
|
|
25
|
+
| Finding and staging a trade for one of your agents — scan its coins, propose on one, approve or decline on your word | `battlegrid-trade-proposal` |
|
|
25
26
|
| Working out why an agent has not traded or has stopped | `battlegrid-strategy-doctor` |
|
|
26
27
|
|
|
27
|
-
Those
|
|
28
|
+
Those nine carry the working arcs and the exact contracts. What follows here is the minimum needed
|
|
28
29
|
to connect and to know which one to open.
|
|
29
30
|
|
|
30
31
|
## Discover the live surface first
|
package/dist/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ import { type Implementation, type Prompt, type Resource } from '@modelcontextpr
|
|
|
49
49
|
* being asked. Move it for a change to THIS package — a proxy fix, a dependency bump, a docs
|
|
50
50
|
* correction. Never move it to track the server.
|
|
51
51
|
*/
|
|
52
|
-
export declare const PACKAGE_VERSION = "31.2.
|
|
52
|
+
export declare const PACKAGE_VERSION = "31.2.14";
|
|
53
53
|
export declare const DEFAULT_URL = "https://mcp.battlegrid.trade/mcp";
|
|
54
54
|
export interface EnvConfig {
|
|
55
55
|
apiKeys: string[];
|
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema, ListPromptsRequestSchema
|
|
|
52
52
|
* being asked. Move it for a change to THIS package — a proxy fix, a dependency bump, a docs
|
|
53
53
|
* correction. Never move it to track the server.
|
|
54
54
|
*/
|
|
55
|
-
export const PACKAGE_VERSION = '31.2.
|
|
55
|
+
export const PACKAGE_VERSION = '31.2.14';
|
|
56
56
|
export const DEFAULT_URL = 'https://mcp.battlegrid.trade/mcp';
|
|
57
57
|
const MAX_RETRIES = 3;
|
|
58
58
|
const RETRY_DELAYS_MS = [2000, 4000, 8000];
|