================================================================================
  Paperclip Agent Configuration - SindByte MCP
  Updated: 2026-04-20 (TTrading Desk Repair validated config)
================================================================================

MCP SERVER ENDPOINT (Current Working Config)
--------------------------------------------
  MCP URL:      http://127.0.0.1:5559/mcp
  API Provider: http://127.0.0.1:8091/v1/models  (48 models)
  Paperclip:    http://127.0.0.1:3100/api
  Transport:    HTTP JSON-RPC 2.0

  Tool calls use POST to /mcp with JSON-RPC payload:
    method = "tools/call"
    params = { name = "ToolName::Action", arguments = { ... } }

METHOD 1: Disable Worktree Isolation (Recommended)
--------------------------------------------------
If you run one agent at a time, disable worktree isolation so the agent
runs directly in your project folder and finds .mcp.json automatically.

In Paperclip UI:
  Agent Settings -> Adapter Config -> JSON

Paste:
  {
    "adapterConfig": {
      "worktreeIsolation": false
    }
  }

This is the simplest method. The agent sees .mcp.json, .opencode/,
.agents/, and all untracked files in your project.


METHOD 2: Keep Worktree Isolation + Explicit MCP Config
-------------------------------------------------------
If you need parallel agents on the same project, keep worktree isolation
but pass the MCP config path explicitly via extraArgs.

In Paperclip UI:
  Agent Settings -> Adapter Config -> JSON

Paste (adjust path to your project):
  {
    "adapterConfig": {
      "extraArgs": [
        "--mcp-config",
        "F:\\00_MR\\MR_Komponents\\Internet-SLL\\HTP_JSON_Lib\\.mcp.json"
      ]
    }
  }

NOTE: .mcp.json MUST be committed to git for this to work, since worktrees
only contain tracked files.


METHOD 3: Shared Workspace Strategy
-----------------------------------
Alternative to worktreeIsolation: use project_primary workspace strategy.

In Paperclip UI:
  Agent Settings -> Adapter Config -> JSON

Paste:
  {
    "workspaceStrategy": {
      "type": "project_primary"
    }
  }


VERIFICATION
------------
After starting a Paperclip agent, check that SindByte tools appear:

  1. Open the agent's transcript/log in Paperclip UI
  2. Look for MCP tool discovery messages
  3. Or ask the agent: "List your available tools"

If ~233 tools are listed (FileTools, SystemTools, DataTools, Trading, etc.),
SindByte MCP is connected successfully.


QUICK DIAGNOSTIC FROM POWERSHELL
--------------------------------
Test SindByte MCP directly without involving the agent:

  # Test JSON-RPC tool call (the actual working format)
  $body = @{
      jsonrpc = "2.0"
      id      = 1
      method  = "tools/call"
      params  = @{
          name      = "SystemTools::GetBaseDir"
          arguments = @{}
      }
  } | ConvertTo-Json -Depth 5

  Invoke-RestMethod -Uri "http://127.0.0.1:5559/mcp" -Method POST `
      -ContentType "application/json" -Body $body

  Expected: Returns JSON with result.content[0].text containing base dir.


KNOWN ISSUES
------------
  Paperclip issue #2940: MCP config (.mcp.json) not loaded in git worktree
  execution mode. This is why worktreeIsolation: false is recommended.

  Link: https://github.com/paperclipai/paperclip/issues/2940

  PROB-AUTO-001: GET /mcp returns NullReferenceException. This is a known
  minor issue. Actual tool calls must use POST with JSON-RPC method.

================================================================================
