Model Context Protocol endpoint.
Open a dedicated Server-Sent Events stream for MCP notifications
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()->build();
$requestSecurity = new Operations\StackoneMcpGetSecurity(
basic: new Components\SchemeBasic(
username: '',
password: '',
),
);
$response = $sdk->mcp->mcpGet(
security: $requestSecurity,
mcpSessionId: '<id>',
xAccountId: '<id>'
);
if ($response->statusCode === 200) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\StackoneMcpGetSecurity | ✔️ | The security requirements to use for the request. |
mcpSessionId |
string | ✔️ | Session id |
xAccountId |
?string | ➖ | Account secure id for the target provider account (optional if x-account-id query parameter is provided) |
xAccountIdQueryParameter |
mixed | ➖ | Account secure id (alternative to x-account-id header) |
?Operations\StackoneMcpGetResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Send JSON-RPC request to the MCP server over HTTP streaming transport
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()->build();
$jsonRpcMessageDto = new Components\JsonRpcMessageDto(
jsonrpc: '2.0',
method: 'initialize',
params: new Components\Params(),
id: new Components\Id(),
);
$requestSecurity = new Operations\StackoneMcpPostSecurity(
basic: new Components\SchemeBasic(
username: '',
password: '',
),
);
$response = $sdk->mcp->mcpPost(
security: $requestSecurity,
jsonRpcMessageDto: $jsonRpcMessageDto,
xAccountId: '<id>'
);
if ($response->statusCode === 200) {
// handle response
}declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()->build();
$jsonRpcMessageDto = new Components\JsonRpcMessageDto(
jsonrpc: '2.0',
method: 'tools/call',
params: new Components\Params(),
id: new Components\Id(),
);
$requestSecurity = new Operations\StackoneMcpPostSecurity(
basic: new Components\SchemeBasic(
username: '',
password: '',
),
);
$response = $sdk->mcp->mcpPost(
security: $requestSecurity,
jsonRpcMessageDto: $jsonRpcMessageDto,
xAccountId: '<id>'
);
if ($response->statusCode === 200) {
// handle response
}declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()->build();
$jsonRpcMessageDto = new Components\JsonRpcMessageDto(
jsonrpc: '2.0',
method: 'tools/list',
params: new Components\Params(),
id: new Components\Id(),
);
$requestSecurity = new Operations\StackoneMcpPostSecurity(
basic: new Components\SchemeBasic(
username: '',
password: '',
),
);
$response = $sdk->mcp->mcpPost(
security: $requestSecurity,
jsonRpcMessageDto: $jsonRpcMessageDto,
xAccountId: '<id>'
);
if ($response->statusCode === 200) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\StackoneMcpPostSecurity | ✔️ | The security requirements to use for the request. |
jsonRpcMessageDto |
Components\JsonRpcMessageDto | ✔️ | JSON-RPC 2.0 message |
xAccountId |
?string | ➖ | Account secure id for the target provider account (optional if x-account-id query parameter is provided) |
xAccountIdQueryParameter |
mixed | ➖ | Account secure id (alternative to x-account-id header) |
mcpSessionId |
?string | ➖ | Session id; omit for initialize, include for subsequent calls |
?Operations\StackoneMcpPostResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |
Close an existing MCP session for the provided session id
declare(strict_types=1);
require 'vendor/autoload.php';
use StackOne\client;
use StackOne\client\Models\Components;
use StackOne\client\Models\Operations;
$sdk = client\StackOne::builder()->build();
$requestSecurity = new Operations\StackoneMcpDeleteSecurity(
basic: new Components\SchemeBasic(
username: '',
password: '',
),
);
$response = $sdk->mcp->mcpDelete(
security: $requestSecurity,
mcpSessionId: '<id>',
xAccountId: '<id>'
);
if ($response->statusCode === 200) {
// handle response
}| Parameter | Type | Required | Description |
|---|---|---|---|
security |
Operations\StackoneMcpDeleteSecurity | ✔️ | The security requirements to use for the request. |
mcpSessionId |
string | ✔️ | Session id |
xAccountId |
?string | ➖ | Account secure id for the target provider account (optional if x-account-id query parameter is provided) |
xAccountIdQueryParameter |
mixed | ➖ | Account secure id (alternative to x-account-id header) |
?Operations\StackoneMcpDeleteResponse
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\BadRequestResponse | 400 | application/json |
| Errors\UnauthorizedResponse | 401 | application/json |
| Errors\ForbiddenResponse | 403 | application/json |
| Errors\NotFoundResponse | 404 | application/json |
| Errors\RequestTimedOutResponse | 408 | application/json |
| Errors\ConflictResponse | 409 | application/json |
| Errors\UnprocessableEntityResponse | 422 | application/json |
| Errors\TooManyRequestsResponse | 429 | application/json |
| Errors\InternalServerErrorResponse | 500 | application/json |
| Errors\NotImplementedResponse | 501 | application/json |
| Errors\BadGatewayResponse | 502 | application/json |
| Errors\SDKException | 4XX, 5XX | */* |