@personaai/sdkv0.9.0

mcp — @personaai/sdk

Generated field tables for mcp — do not edit

Generated from sdk/typescript/dist/typedoc.json — do not edit. Regenerate with node platform/scripts/typedoc-resources.mjs.

mcp

Auth: Requires Authorization: Bearer <keyId>.<secret> (server-side). For per-user calls add x-persona-external-user-id. See .

MCP connectors are Model Context Protocol servers (tools/resources). Supports OAuth owner vs user modes and testConnection/callTool.

Example

TypeScript

ts
const mcp = await persona.mcps.create({ name: 'GitHub', transport: 'sse', url: 'https://mcp.github.com/sse' });await persona.mcps.testConnection(mcp._id);

cURL

bash
curl https://api.persona.hasanraiyan.me/api/v1/developer/mcps \  -H "Authorization: Bearer $PERSONA_CREDENTIAL" -H "Content-Type: application/json" \  -d '{"name":"GitHub","transport":"sse","url":"https://mcp.github.com/sse"}'

Response

json
{  "success": true,  "data": { "_id": "mcp_123", "name": "GitHub" }}

Mcp

Like Provider (not Skill/Agent/Knowledge), this goes through a clean toSafeJson() DTO — oauth/apiKeyEncrypted are stripped in favor of hasApiKey/a summarized oauth object. Still _id-shaped, though (toSafeJson spreads the raw document minus secrets, doesn't rename it).

Source: types/mcp.ts:44

Interface

FieldTypeDescription
_idstring— _ types/mcp.ts:45_
domainstring— _ types/mcp.ts:46_
ownerType"PersonaUser" | "Project" | "ExternalUser"— _ types/mcp.ts:47_
ownerId?string— _ types/mcp.ts:48_
externalOwnerId?string— _ types/mcp.ts:49_
namestring— _ types/mcp.ts:50_
description?string— _ types/mcp.ts:51_
transportMcpTransport— _ types/mcp.ts:52_
urlstring— _ types/mcp.ts:53_
authTypeMcpAuthType— _ types/mcp.ts:54_
authModeMcpAuthMode— _ types/mcp.ts:55_
hasApiKeyboolean— _ types/mcp.ts:56_
oauth?McpOAuthConfig— _ types/mcp.ts:57_
isEnabledboolean— _ types/mcp.ts:58_
toolsMcpTool[]Populated by testConnection(); empty until it's been called at least once. — _ types/mcp.ts:60_
resourcesMcpResourceSummary[]Populated by testConnection(); empty until it's been called at least once. — _ types/mcp.ts:62_
resourceTemplatesMcpResourceTemplate[]Populated by testConnection(); empty until it's been called at least once. — _ types/mcp.ts:64_
createdAtstring— _ types/mcp.ts:65_
updatedAtstring— _ types/mcp.ts:66_

McpTransport

Source: types/mcp.ts:1

Kind 2097152

ts
type McpTransport = "http" | "sse"

McpAuthType

Source: types/mcp.ts:2

Kind 2097152

ts
type McpAuthType = "none" | "oauth" | "apiKey"

McpAuthMode

owner: one shared connection for the whole Project. user: each external user connects their own.

Source: types/mcp.ts:4

Kind 2097152

ts
type McpAuthMode = "owner" | "user"

McpTool

Source: types/mcp.ts:6

Interface

FieldTypeDescription
namestring— _ types/mcp.ts:7_
descriptionstring— _ types/mcp.ts:8_

McpResourceSummary

Source: types/mcp.ts:11

Interface

FieldTypeDescription
uristring— _ types/mcp.ts:12_
namestring— _ types/mcp.ts:13_
descriptionstring— _ types/mcp.ts:14_
mimeTypestring— _ types/mcp.ts:15_

McpResourceTemplate

A resource whose uri has placeholder params to fill before calling readResource().

Source: types/mcp.ts:19

Interface

FieldTypeDescription
uriTemplatestring— _ types/mcp.ts:20_
namestring— _ types/mcp.ts:21_
descriptionstring— _ types/mcp.ts:22_
mimeTypestring— _ types/mcp.ts:23_
toolNamestring— _ types/mcp.ts:24_

McpOAuthConfig

Source: types/mcp.ts:27

Interface

FieldTypeDescription
clientIdstring | null— _ types/mcp.ts:28_
hasClientSecretboolean— _ types/mcp.ts:29_
authorizationEndpointstring | null— _ types/mcp.ts:30_
tokenEndpointstring | null— _ types/mcp.ts:31_
scopesstring[]— _ types/mcp.ts:32_
dynamicallyRegisteredboolean— _ types/mcp.ts:33_
ownerConnectedbooleanWhether the MCP's owner has completed the owner-mode OAuth flow. — _ types/mcp.ts:35_

McpOAuthInput

Source: types/mcp.ts:69

Interface

FieldTypeDescription
clientIdstring— _ types/mcp.ts:70_
clientSecretstring— _ types/mcp.ts:71_
scopes?string[]— _ types/mcp.ts:72_

CreateMcpInput

Source: types/mcp.ts:75

Interface

FieldTypeDescription
namestring— _ types/mcp.ts:76_
transportMcpTransport— _ types/mcp.ts:77_
urlstring— _ types/mcp.ts:78_
description?string— _ types/mcp.ts:79_
authType?McpAuthType— _ types/mcp.ts:81_
authMode?McpAuthMode— _ types/mcp.ts:83_
oauth?McpOAuthInputRequired when authType: 'oauth' and useDynamicRegistration isn't set. — _ types/mcp.ts:85_
apiKey?stringRequired when authType: 'apiKey'. Sent as a static bearer token — always owner-shared, regardless of authMode. — _ types/mcp.ts:87_
useDynamicRegistration?booleanUse RFC 7591 Dynamic Client Registration instead of a manually-configured oauth block. — _ types/mcp.ts:89_
isEnabled?boolean— _ types/mcp.ts:91_

UpdateMcpInput

All fields optional — only what you pass is changed.

Source: types/mcp.ts:95

Interface

FieldTypeDescription
name?string— _ types/mcp.ts:96_
description?string— _ types/mcp.ts:97_
transport?McpTransport— _ types/mcp.ts:98_
url?string— _ types/mcp.ts:99_
authType?McpAuthType— _ types/mcp.ts:100_
authMode?McpAuthMode— _ types/mcp.ts:101_
isEnabled?boolean— _ types/mcp.ts:102_
useDynamicRegistration?boolean— _ types/mcp.ts:103_
oauth?Partial<McpOAuthInput>— _ types/mcp.ts:104_
apiKey?stringReplaces the stored key entirely; omit to leave the existing key untouched. — _ types/mcp.ts:106_

DiscoverMcpsParams

Source: types/mcp.ts:109

Interface

FieldTypeDescription
page?number— _ types/mcp.ts:111_
limit?number— _ types/mcp.ts:113_
search?stringFree-text match against name/description. — _ types/mcp.ts:115_
scope?"mine"Restricts to the asserted external user's own MCPs (ProjectRuntimeContext only). — _ types/mcp.ts:117_

McpTestConnectionResult

Source: types/mcp.ts:120

Interface

FieldTypeDescription
toolsMcpTool[]— _ types/mcp.ts:121_
resourcesMcpResourceSummary[]— _ types/mcp.ts:122_
resourceTemplatesMcpResourceTemplate[]— _ types/mcp.ts:123_

McpReadResourceResult

Source: types/mcp.ts:126

Interface

FieldTypeDescription
textstring— _ types/mcp.ts:127_
mimeTypestring— _ types/mcp.ts:128_

McpUserConnectionStatus

Source: types/mcp.ts:131

Interface

FieldTypeDescription
connectedboolean— _ types/mcp.ts:132_