BattleGrid MCP Server
OfficialClick on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@BattleGrid MCP ServerList current market grid sessions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@battlegrid/mcp-server
MCP server for BattleGrid — play crypto prediction games, author trading strategies, and manage intelligence agents from AI agents.
It is a thin, authenticated stdio proxy to BattleGrid's remote MCP server (Stripe @stripe/mcp pattern — no business logic). It discovers tools, prompts, and resources live from the server and re-exposes them to local MCP clients (Claude Desktop, Claude Code, Cursor). Capabilities are always discovered live — this package never hardcodes the tool catalog.
v4 — breaking major (strategy conditions)
v4 pairs with the BattleGrid server's MCP contract v4.0.0. The package major tracks the server's wire contract, because the proxy announces battlegrid@<package version> in its own stdio handshake — the number a client reads has to be the contract it will actually reach. Upgrade the package and the server major together.
apply_strategy_planrequires the conditions axis. The plan post-state now carries requiredconditionsandconditionVerdicts; a payload built from the v3 field list is rejected withplan.conditions: Required. Add both fields to the projection you already build — apply takes an allowlisted projection ofapprovedPlan, never the object itself (diff,viability,mismatches,signalRules,creationSeed,proposedRevision,bindingImpact,authoringCatalogDigestare all rejected as unknown keys, and so are thepostStatefields apply does not accept:id,scope,systemKey,visibility,cadence,isActive,forkedFromStrategyId). The exact field list is step 7 of Strategy authoring (compile → review → apply) below. Only a client that forwards post-state fields generically — stripping the derived keys rather than enumerating the kept ones — picks the axis up without an edit. The proxy itself is unchanged: it embeds no schemas, pins no contract version, and forwards{ request }verbatim.
The v3 authoring contract below is unchanged and still current:
Strict authoring envelopes.
get_strategy_section_template,update_strategy_signal_rule,compile_strategy_plan, andapply_strategy_planpublish one strict server-owned object,{ request: canonicalPayload }. In multi-account mode the proxy addsaccountonly as a sibling ofrequest, producing exactly{ account, request }; on a call it strips onlyaccountand forwards the unchanged{ request }. It never descends into, flattens, or reconstructs the nested request.create_strategyis retired. Direct strategy creation no longer exists. Author strategies with the compile → review → apply workflow below, and bind them to agents at agent-creation time (create_intelligence_agent({ …, strategyId })). There is no alias, shim, or flat-payload fallback.Rediscover after deployment. Publishing the package does not refresh a running proxy's cached capability snapshot. After the server cutover, restart/reconnect the proxy process and re-run
tools/list,prompts/list, andresources/list.
Earlier majors: v1.x single/multi-account stdio proxy; v2.0.0 moved the default
BATTLEGRID_API_URLto the/mcpsuffix; v3.0.0 the strategy-authoring major. See Rediscovery & versioning.
Related MCP server: Enterprise Crypto MCP Gateway
Quick Start
Single account (stdio transport)
BATTLEGRID_API_KEY=bg_live_xxx npx @battlegrid/mcp-serverMultiple accounts (stdio transport)
BATTLEGRID_API_KEYS=bg_live_alice_key,bg_live_bob_key npx @battlegrid/mcp-serverWhen 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.
Remote server (streamable-http transport)
https://mcp.battlegrid.trade/mcpNo npm install required — connect directly from any MCP client that supports streamable-http.
Configuration
Claude Desktop
Single account:
{
"mcpServers": {
"battlegrid": {
"command": "npx",
"args": ["@battlegrid/mcp-server"],
"env": {
"BATTLEGRID_API_KEY": "bg_live_xxx"
}
}
}
}Multiple accounts:
{
"mcpServers": {
"battlegrid": {
"command": "npx",
"args": ["@battlegrid/mcp-server"],
"env": {
"BATTLEGRID_API_KEYS": "bg_live_alice_key,bg_live_bob_key"
}
}
}
}Claude Code
claude mcp add battlegrid -- npx @battlegrid/mcp-serverSet your API key(s):
# Single account
export BATTLEGRID_API_KEY=bg_live_xxx
# Multiple accounts
export BATTLEGRID_API_KEYS=bg_live_alice_key,bg_live_bob_keyCursor
{
"mcpServers": {
"battlegrid": {
"command": "npx",
"args": ["@battlegrid/mcp-server"],
"env": {
"BATTLEGRID_API_KEY": "bg_live_xxx"
}
}
}
}Use BATTLEGRID_API_KEYS (comma-separated) for multiple accounts.
ChatGPT Desktop
ChatGPT Desktop connects via OAuth 2.1 — no npm package or API key needed. ChatGPT handles the OAuth flow automatically.
Open ChatGPT Desktop → Settings → MCP Servers → Add Server
Enter the MCP endpoint URL:
https://mcp.battlegrid.trade/mcpSelect OAuth as the authentication method
ChatGPT discovers OAuth endpoints, registers as a client (Dynamic Client Registration), and opens BattleGrid's consent page
Log in to BattleGrid and click Authorize
Claude Desktop / Cursor | ChatGPT Desktop | |
Transport | stdio proxy ( | Direct HTTPS |
Auth | API key ( | OAuth 2.1 (Bearer token) |
Setup | npm package + env vars | URL + OAuth consent |
Multi-account |
| One OAuth grant per account |
Account management
Single account
Set BATTLEGRID_API_KEY with one API key. All tool calls use that account, and the tools are exactly the server-native shapes — the authoring tools take the strict { request } envelope with no account field.
Multiple accounts
Set BATTLEGRID_API_KEYS with a comma-separated list of API keys (one per BattleGrid account). On startup the proxy:
Calls
GET /mcp/identityfor each key to discover the account usernameInjects a required
accountenum parameter into every tool — as a sibling of the existing input, never nested inside itRoutes each tool call to the correct account using the matching Bearer token, stripping only
accountbefore forwarding
For the strict authoring tools, the multi-account input is exactly { account, request }:
{
"name": "compile_strategy_plan",
"inputSchema": {
"type": "object",
"properties": {
"account": {
"type": "string",
"enum": ["alice", "bob"],
"description": "Which BattleGrid account to use for this action"
},
"request": {
"oneOf": [
{ "properties": { "operation": { "const": "CREATE" } } },
{ "properties": { "operation": { "const": "UPDATE" } } },
{ "properties": { "operation": { "const": "RESTORE" } } }
]
}
},
"required": ["account", "request"],
"additionalProperties": false
}
}The proxy consumes only the outer account and forwards the unchanged { request } upstream. Never put account inside request, and never flatten request fields beside it.
If a key fails identity discovery (revoked, invalid), it is skipped with a warning. If all keys fail, the process exits. BATTLEGRID_API_KEYS takes precedence over BATTLEGRID_API_KEY when both are set.
Getting an API key
Go to battlegrid.trade → Profile → MCP tab
Generate an API key (format:
bg_live_*)Copy the key immediately — it is shown only once
Each account supports one active key at a time. Generating a new key automatically revokes the previous one — restart any running proxy process afterward, since keys are read once at startup.
For paid games and autonomous wagering, enable Server-Signed Wagers in the MCP tab (mcp:wager scope). Strategy discovery and non-financial configuration writes only need mcp:read.
Strategy authoring (compile → review → apply)
Strategies are authored through one strict, whole-plan workflow. Compilation writes nothing; apply_strategy_plan is the only write. Always review the exact returned plan before confirming.
Choose the operation and revision.
list_strategies(addincludeInactive:truewhen preparing a RESTORE) andget_strategyreturn the currentrevision; thread it into the next revisioned call.Discover the report vocabulary live. Walk
list_strategy_categories→list_strategy_vocabulary→get_metric_construction_hints→get_strategy_column_contract, and useget_strategy_section_template/preview_strategy_report. Do not guess metric, transform, parameter, template, or enabled-timeframe facts — they are server-discovered.Compile one complete plan. Call
compile_strategy_plan({ request })where the nested request is exactly one strict branch plus a boundedcoinSelection,intentSummary, andassumptions:CREATE supplies the full new strategy.
UPDATE supplies at least one changed axis and
expectedRevision.RESTORE targets an owned inactive revision (with any repair axes).
Review before confirming. Inspect the returned
approvedPlan(complete post-state, proposed revision, diff, bound-agent impact, expiry) andreviewContext(column contracts, point-in-time report preview, open positions, quota/name admission). The plan token expires after five minutes; recompile after expiry or drift.Apply only the exact reviewed plan. After explicit user approval, call
apply_strategy_plan({ request: { plan, planToken, confirm: true } }). Buildplanfrom the compiledapprovedPlanby copying, byte-identical:operation;postState.idasstrategyId;expiresAt;expectedRevisionfor UPDATE/RESTORE;explicitRuleOverridesasrules; and frompostState—name,description,tagline,timeframe,regimeAutoDerive,regimeTimeframe,marketReadText,sections(including every generatedcustom:key),conditions,conditionVerdicts,minAggregateScore,minRequiredCount,minAtrPct. Send nothing else — the server re-derives the scorecard, diff, viability, mismatches, seed, revision, and bound-agent impact, and rejectsdiff,viability,mismatches,signalRules,creationSeed,proposedRevision,bindingImpact,authoringCatalogDigest, andreviewContextas unknown keys. Changed configuration propagates to every bound agent immediately.
update_strategy_signal_rule({ request }) is the thin, focused one-rule edit. In multi-account mode every one of these calls uses the { account, request } sibling envelope.
Strategy-bound agents. Bind a strategy to an intelligence agent at creation time — create_intelligence_agent({ …, strategyId }) (discover strategyId via list_strategies). Rebinding via update_intelligence_agent requires confirm:true. There is no direct create_strategy operation.
Capabilities
Tools, prompts, and resources are discovered live from the connected server via tools/list, prompts/list, and resources/list. This package intentionally does not copy the server's catalog, formulas, signal IDs, or defaults — inspect the live connection for the authoritative, current surface. Broadly, the server exposes game play (Market Grid), market context, account state, leaderboards, intelligence agents and automation, strategy discovery/authoring, and trading signals/decisions.
Environment variables
Variable | Required | Description |
| One of these | Comma-separated API keys for multiple accounts |
| One of these | Single API key (fallback if |
| No | Override server URL (default: |
Rediscovery & versioning
Package/server major pairing. This package's major version pairs with the BattleGrid server's published MCP contract version (
MCP_CONTRACT_VERSION). The pairing is not decorative: the proxy re-announces itself asbattlegrid@<package version>to the local client, under the same server name the remote handshake uses, so a package major left behind tells clients a contract number that no longer exists. Run matching majors.Rediscover after a server cutover. Package publication does not refresh a running proxy's cached startup snapshot. Restart/reconnect the proxy and re-run
tools/list,prompts/list, andresources/listafter the server deploys.Restart after key rotation. API keys are read once at process startup; rotate a key, then restart the proxy.
Version | Changes |
1.x | Single/multi-account stdio proxy, identity discovery, connection retry, capability discovery |
2.0.0 | Default |
3.0.0 | Strategy-authoring major: strict |
3.0.1 | Docs only — |
4.0.0 | Realigns the package major with the server's MCP contract v4.0.0, which broke on the conditions axis: |
Maintainer release procedure
.github/workflows/publish.ymlis the executable release authority. If this recipe and the workflow diverge, correct them together before creating a release tag.
Publishing runs only in GitHub-hosted Actions. Never run npm publish from the BattleGrid application VM or a maintainer workstation. The maintainer's shell prepares and pushes one immutable tag; the workflow checks out that pinned commit, tests, builds, packs, and publishes it with npm provenance.
Release environments and prerequisites
Responsibility | Environment |
Confirm npm publishing trust | npmjs.com package settings |
Verify the release and push its tag | Clean |
Build, test, pack, and publish | GitHub-hosted |
Verify registry publication | Any shell |
Before tagging:
Merge the complete release into
main; never release a feature-branch commit.Use Node 22 or 24 locally. CI uses Node 24; odd-numbered Node releases are not supported by the test toolchain.
Ensure
package.json,package-lock.json, andsrc/index.ts's exportedVERSIONall contain the intended version.Confirm npm's Trusted Publisher for
@battlegrid/mcp-serveris GitHub Actions with organizationplaybattlegrid, repositorybattlegrid-mcp, workflow filenamepublish.yml, no environment name, andnpm publishallowed. The workflow uses short-lived OIDC credentials; do not add a long-livedNPM_TOKEN.
Verify and tag the merged commit
Run from a clean battlegrid-mcp checkout, substituting the intended unused version:
release_version=4.0.0
release_tag="mcp-server@${release_version}"
git fetch origin --tags
git switch main
git pull --ff-only origin main
test -z "$(git status --porcelain)"
test "$(node -p "require('./package.json').version")" = "$release_version"
test "$(node -p "require('./package-lock.json').version")" = "$release_version"
test "$(node -p "require('fs').readFileSync('src/index.ts','utf8').match(/VERSION = '([^']+)'/)[1]")" = "$release_version"
test -z "$(git tag --list "$release_tag")"
npm ci
npm test
npm run build
npm pack --dry-run
release_commit="$(git rev-parse HEAD)"
git tag -a "$release_tag" "$release_commit" -m "Publish @battlegrid/mcp-server $release_version"
git show --no-patch --decorate "$release_tag"
git push origin "$release_tag"A tag matching mcp-server@* starts the publish workflow. Wait for that exact tag run to complete successfully before querying npm; a temporary registry E404 while the workflow is still running is not a publication failure.
The workflow fails closed unless the tag version, package version, lockfile version, and source handshake version are identical. It then runs the test suite, TypeScript build, and package dry run before npm publish --access public --provenance.
Verify publication
npm view "@battlegrid/mcp-server@${release_version}" version dist.integrity \
--json --registry=https://registry.npmjs.org/
npm view @battlegrid/mcp-server dist-tags \
--json --registry=https://registry.npmjs.org/
npm view "@battlegrid/mcp-server@${release_version}" dist.attestations \
--json --registry=https://registry.npmjs.org/Require the exact version, latest pointing at that version, and a provenance attestation. Record the release tag and commit. Restart/reconnect running proxies and rediscover tools/list, prompts/list, and resources/list; publication alone does not refresh their startup cache.
If publishing fails, inspect the tag's workflow before taking action. An ENEEDAUTH failure means the npm Trusted Publisher fields do not match the workflow. Fix the publisher configuration and rerun the failed job without moving the tag. Never retarget or reuse a published tag, and never mutate a tagged release with npm audit fix; dependency remediation goes through a new reviewed commit and version.
Skills
Install the BattleGrid skill for AI agent instructions:
npx skills add playbattlegrid/battlegrid-mcpLicense
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables AI agents to interact with the ProfitPlay prediction market to trade short-term price movements of cryptocurrencies and stocks. It provides tools for market analysis, automated betting, account registration, and leaderboard tracking.Last updated91
- Flicense-qualityBmaintenanceEnables MCP-compatible AI clients to access live crypto market data and AI-driven quantitative analysis, with structured outputs and full observability.Last updated
- Flicense-qualityDmaintenanceEnables AI agents to trade on Limitless prediction markets on Base via MCP, with tools for wallet management, market discovery, order placement, and portfolio tracking.Last updated1
- Alicense-qualityCmaintenanceEnables AI assistants to interact with the PocketOption trading platform via MCP, including balance checks, candle data, asset screening, and trade placement, with support for multi-agent coordination.Last updated4MIT
Related MCP Connectors
No-KYC managed MCP for AI agents: sandboxed TypeScript trading SDK, isolated sub-accounts, futures.
HiveCapital MCP Server — autonomous investment layer for AI agents
MCP server exposing the Backtest360 engine API as tools for AI agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/playbattlegrid/battlegrid-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server