Here is an example of how to reference a credential in the TypeScript SDK for Bearer Authentication.
import { agent, subAgent, mcpTool, credential } from "@inkeep/agents-sdk";import { CredentialStoreType } from "@inkeep/agents-core";// Step 1: Reference the credential created in the environment fileconst stripeCredential = credential({ id: 'stripe-credential', name: 'Stripe Credential', type: CredentialStoreType.memory, credentialStoreId: 'memory-default', retrievalParams: { "key": "<environment-variable-name>", // where <environment-variable-name> is the name of the environment variable that contains the credential value, for example, STRIPE_API_KEY },});// Step 2: Use credential in MCP toolconst stripeTool = mcpTool({ id: 'stripe-tool', name: 'Stripe Tool', description: 'Access Stripe payment services', serverUrl: 'https://mcp.stripe.com/mcp', credential: stripeCredential,});