JavaScript
import { createCognitioClient } from "@cognitio/sdk
const client = createCognitioClient()
await client.mcp.auth.authenticate({
...
}){
"status": "connected"
}{
"data": "<unknown>",
"errors": [
{}
],
"success": false
}{
"name": "NotFoundError",
"data": {
"message": "<string>"
}
}API Reference
Authenticate MCP OAuth
Start OAuth flow and wait for callback (opens browser)
POST
/
mcp
/
{name}
/
auth
/
authenticate
JavaScript
import { createCognitioClient } from "@cognitio/sdk
const client = createCognitioClient()
await client.mcp.auth.authenticate({
...
}){
"status": "connected"
}{
"data": "<unknown>",
"errors": [
{}
],
"success": false
}{
"name": "NotFoundError",
"data": {
"message": "<string>"
}
}