انتقل إلى المحتوى
رجوع
MCP and AI agents6 دقيقة قراءة

Connect your AI client

Create a scoped token, add the server URL to your client, and verify the connection — with config examples.

الترجمة غير متاحة بعد — يتم عرض الإنجليزية.

Two things are needed: a token, and a client that speaks MCP over HTTP.

1. Create a token #

In the app, open Settings → Harness Access and create a token. Pick the smallest set of scopes that does the job:

ScopeGrants
mcp:readAll read and analysis tools
trade:proposeFiling setups into the Diary for approval
trade:executePlacing, closing and cancelling live orders

Read-only is the right starting point. Execution tokens are only issued while your account is enabled for autonomous execution — the kill switch must be off and autonomy set above Propose only. If minting fails, check Settings → Risk limits.

Copy the token once. It starts with jw3_mcp_ and is not shown again.

2. Add the server to your client #

Every MCP client has some form of "add a custom server". Use these values:

FieldValue
Namejw3
URLhttps://www.jw3.ai/mcp
TransportStreamable HTTP (HTTP, not stdio)
HeaderAuthorization: Bearer jw3_mcp_…

A generic JSON configuration looks like this:

json
{
  "mcpServers": {
    "jw3": {
      "type": "http",
      "url": "https://www.jw3.ai/mcp",
      "headers": {
        "Authorization": "Bearer jw3_mcp_your_token_here"
      }
    }
  }
}

Note

The exact key names differ between clients (headers vs requestInit, type: "http"

vs transport). The two values that are fixed are the URL and the

`Authorization` header. If your client validates the config strictly, use its own

documentation for the wrapper and keep those two values as shown.

Clients that only launch local stdio servers can still connect through a generic bridge that forwards to the HTTP endpoint — configure the bridge with the same URL and header.

3. Verify #

Ask the client to list tools, or make the call yourself:

bash
curl -sS https://www.jw3.ai/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $JW3_TOKEN" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'

A working connection returns the tool list. Then try a read:

bash
curl -sS https://www.jw3.ai/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $JW3_TOKEN" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
       "params":{"name":"list_connections","arguments":{}}}'

list_connections returns your connected venues — the natural first check because it needs nothing but mcp:read.

4. Ask a good first question #

Useful first prompts once the tools are visible:

  • "List my connected venues, then show open positions on the one with futures."
  • "Read today's diary and summarise what I traded and why."
  • "What are my current risk limits and how much of today's loss budget is used?"
  • "Run the trend verdict on BTC/USDT on KuCoin and explain the timeframes."

Troubleshooting #

SymptomCause and fix
401 / -32001 unauthorizedToken wrong, revoked, or the header is missing. Re-paste the exact header
405 Method GET not allowedThe server is POST-only; some clients probe with GET first — that probe is expected to fail
Tools list emptyThe client did not send the Authorization header on the request
missing scope on a toolToken lacks trade:propose or trade:execute; mint a new one
Works in curl, not in the clientThe client is dropping custom headers — check its header syntax
Connection times outCorporate proxy blocking www.jw3.ai; test the curl above first

Never put a token in a public repo, a screenshot, or a client config you might share.

قائمة التحقق

  • Token minted with the scopes you want
  • Client configured with the /mcp URL and bearer header
  • A tools/list call returns the JW3 tool set

Related documents