@battlegrid/mcp-server 31.2.13 → 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 +60 -22
- 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
|
|
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];
|