Model Context Protocol endpoint.
Close an existing MCP session for the provided session id
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne();
async function run() {
const result = await stackOne.mcp.mcpDelete({
apiKey: "<YOUR_API_KEY_HERE>",
}, {
mcpSessionId: "<id>",
xAccountId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { mcpMCPDelete } from "@stackone/stackone-client-ts/funcs/mcpMCPDelete.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore();
async function run() {
const res = await mcpMCPDelete(stackOne, {
apiKey: "<YOUR_API_KEY_HERE>",
}, {
mcpSessionId: "<id>",
xAccountId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("mcpMCPDelete failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneMcpDeleteRequest | ✔️ | The request object to use for the request. |
security |
operations.StackoneMcpDeleteSecurity | ✔️ | The security requirements to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<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.SDKError | 4XX, 5XX | */* |
Open a dedicated Server-Sent Events stream for MCP notifications
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne();
async function run() {
const result = await stackOne.mcp.mcpGet({
apiKey: "<YOUR_API_KEY_HERE>",
}, {
mcpSessionId: "<id>",
xAccountId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { mcpMCPGet } from "@stackone/stackone-client-ts/funcs/mcpMCPGet.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore();
async function run() {
const res = await mcpMCPGet(stackOne, {
apiKey: "<YOUR_API_KEY_HERE>",
}, {
mcpSessionId: "<id>",
xAccountId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("mcpMCPGet failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneMcpGetRequest | ✔️ | The request object to use for the request. |
security |
operations.StackoneMcpGetSecurity | ✔️ | The security requirements to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<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.SDKError | 4XX, 5XX | */* |
Send JSON-RPC request to the MCP server over HTTP streaming transport
import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne();
async function run() {
const result = await stackOne.mcp.mcpPost({
apiKey: "<YOUR_API_KEY_HERE>",
}, {
jsonRpcMessageDto: {
id: {},
jsonrpc: "2.0",
method: "initialize",
params: {},
},
xAccountId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { mcpMCPPost } from "@stackone/stackone-client-ts/funcs/mcpMCPPost.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore();
async function run() {
const res = await mcpMCPPost(stackOne, {
apiKey: "<YOUR_API_KEY_HERE>",
}, {
jsonRpcMessageDto: {
id: {},
jsonrpc: "2.0",
method: "initialize",
params: {},
},
xAccountId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("mcpMCPPost failed:", res.error);
}
}
run();import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne();
async function run() {
const result = await stackOne.mcp.mcpPost({
apiKey: "<YOUR_API_KEY_HERE>",
}, {
jsonRpcMessageDto: {
id: {},
jsonrpc: "2.0",
method: "tools/call",
params: {},
},
xAccountId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { mcpMCPPost } from "@stackone/stackone-client-ts/funcs/mcpMCPPost.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore();
async function run() {
const res = await mcpMCPPost(stackOne, {
apiKey: "<YOUR_API_KEY_HERE>",
}, {
jsonRpcMessageDto: {
id: {},
jsonrpc: "2.0",
method: "tools/call",
params: {},
},
xAccountId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("mcpMCPPost failed:", res.error);
}
}
run();import { StackOne } from "@stackone/stackone-client-ts";
const stackOne = new StackOne();
async function run() {
const result = await stackOne.mcp.mcpPost({
apiKey: "<YOUR_API_KEY_HERE>",
}, {
jsonRpcMessageDto: {
id: {},
jsonrpc: "2.0",
method: "tools/list",
params: {},
},
xAccountId: "<id>",
});
console.log(result);
}
run();The standalone function version of this method:
import { StackOneCore } from "@stackone/stackone-client-ts/core.js";
import { mcpMCPPost } from "@stackone/stackone-client-ts/funcs/mcpMCPPost.js";
// Use `StackOneCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const stackOne = new StackOneCore();
async function run() {
const res = await mcpMCPPost(stackOne, {
apiKey: "<YOUR_API_KEY_HERE>",
}, {
jsonRpcMessageDto: {
id: {},
jsonrpc: "2.0",
method: "tools/list",
params: {},
},
xAccountId: "<id>",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("mcpMCPPost failed:", res.error);
}
}
run();| Parameter | Type | Required | Description |
|---|---|---|---|
request |
operations.StackoneMcpPostRequest | ✔️ | The request object to use for the request. |
security |
operations.StackoneMcpPostSecurity | ✔️ | The security requirements to use for the request. |
options |
RequestOptions | ➖ | Used to set various options for making HTTP requests. |
options.fetchOptions |
RequestInit | ➖ | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries |
RetryConfig | ➖ | Enables retrying HTTP requests under certain failure conditions. |
Promise<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.SDKError | 4XX, 5XX | */* |