For the complete documentation index, see llms.txt. This page is also available as Markdown.

Protocol

JSON-RPC 2.0 protocol reference — endpoint, supported methods, request/response envelopes, and authentication.

The bx-mcp server communicates using the JSON-RPC 2.0 protocol over HTTP POST. This reference covers the endpoint, supported methods, and request/response structures.


📍 Endpoint

POST /~bxmcp/boxlang.bxm
Attribute
Value

URL

http://localhost:8080/~bxmcp/boxlang.bxm

Method

POST

Content-Type

application/json

Auth

Bearer token via Authorization header (optional)


🔐 Authentication

If authToken is configured, include the token in all requests:

Authorization: Bearer your-auth-token

If authToken is empty or not configured, omit the header. See Security & Access Control for authentication configuration options.


📦 Request Envelope

All requests follow the JSON-RPC 2.0 specification:

Field
Type
Description

jsonrpc

string

Protocol version — must be "2.0"

method

string

The RPC method to call

params

object

Method-specific parameters

id

string/number

Request identifier, echoed in response


📨 Response Envelope

Success Response

Error Response


🛠️ Supported Methods

tools/list

List all available MCP tools.

Request:

Result:

curl example:


tools/call

Invoke a specific tool by name with arguments.

Request:

Result: Tool results are wrapped by the MCP protocol:

The actual tool output is in result.content[0].text as a JSON-encoded string. Use jq to extract and pretty-print it:


prompts/list

List all available MCP prompts.

Request:

curl example:


prompts/get

Get a specific prompt by name with optional arguments.

Request:

curl example:


resources/list

List available MCP resources.


resources/read

Read a specific resource by URI.


📋 Standard Error Codes

Code
Message
Description

-32700

Parse error

Invalid JSON was received

-32600

Invalid Request

The JSON sent is not a valid Request object

-32601

Method not found

The method does not exist

-32602

Invalid params

Invalid method parameter(s)

-32603

Internal error

Internal JSON-RPC error

-32000

Tool execution error

The tool threw an exception

-32001

Tool not found

The named tool is not registered

-32002

Unauthorized

Invalid or missing authentication token

Last updated

Was this helpful?