> ## Documentation Index
> Fetch the complete documentation index at: https://docs.msu.io/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Proxy Request

> Proxy request to MCP (Model Context Protocol) resources

## Body parameters

<ParamField body="rawBody" type="string" required>
  Raw JSON-RPC 2.0 request body to forward to the MCP server
</ParamField>

<ParamField body="sessionId" type="string">
  MCP session ID
</ParamField>

## Response

Standard MCP JSON-RPC 2.0 response from the upstream MCP server. Content-Type may be `application/json` or `text/event-stream` (SSE).

<ResponseField name="jsonrpc" type="string">
  JSON-RPC version. Always `"2.0"`
</ResponseField>

<ResponseField name="id" type="integer">
  Request ID echoed from the original request
</ResponseField>

<ResponseField name="result" type="object">
  Result payload. Shape depends on the MCP method called.
</ResponseField>

<ResponseField name="error" type="object">
  Set only when a JSON-RPC error occurs.

  <Expandable title="properties">
    <ResponseField name="code" type="integer">
      JSON-RPC error code
    </ResponseField>

    <ResponseField name="message" type="string">
      Human-readable error message
    </ResponseField>

    <ResponseField name="data" type="object">
      Additional error data
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://openapi.msu.io/v1rc1/resource/mcp' \
    --header 'Content-Type: application/json' \
    --header 'x-nxopen-api-key: YOUR_API_KEY' \
    --data '{
      "rawBody": "{\"jsonrpc\":\"2.0\",\"method\":\"tools/list\",\"id\":1}",
      "sessionId": "YOUR_SESSION_ID"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://openapi.msu.io/v1rc1/resource/mcp', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-nxopen-api-key': 'YOUR_API_KEY'
    },
    body: JSON.stringify({
      rawBody: '{"jsonrpc":"2.0","method":"tools/list","id":1}',
      sessionId: 'YOUR_SESSION_ID'
    })
  });
  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  url = "https://openapi.msu.io/v1rc1/resource/mcp"
  headers = {
    "x-nxopen-api-key": "YOUR_API_KEY"
  }
  body = {
    "rawBody": '{"jsonrpc":"2.0","method":"tools/list","id":1}',
    "sessionId": "YOUR_SESSION_ID"
  }

  response = requests.post(url, headers=headers, json=body)
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {}
  }
  ```

  ```json Error Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
      "code": -32601,
      "message": "Method not found",
      "data": {}
    }
  }
  ```
</ResponseExample>
