Example requests
Ask your coding agent which API or MCP server you want to reach. It can define the credential, write the actions, and attach them.“Connect to our internal billing API and add actions to look up and refund an invoice.”
“Attach the DeepWiki MCP server to the research agent so it can answer questions about any GitHub repo.”
Define a custom API key credential
UsedefineCredential() for static secrets. The key is the credential slug users will set in the web app or CLI, and fields describes the secret shape.
src/credentials/acme.ts
src/actions/create-acme-ticket.ts
Wrap a custom app
If you have several actions for the same service, you can define an app wrapper and create actions from it. This keeps the credential definition shared across all actions.src/apps/acme.ts
src/actions/create-acme-ticket.ts
Connect an MCP server
Agents can connect to any MCP server you define in code. MCP tools are attached through the agent’stools array, just like actions.
src/agents/researcher.ts
Current limitations
keystroke.config.ts has an integrations option, but custom HTTP integration mounting is not a shipped user-facing extension point yet. Today, use:
defineCredential()plus actions for custom APIs.defineApp()for a reusable app/action wrapper.defineMcp()for custom MCP servers attached to agents.
Hosted MCP management and managed service settings in the web app are not general-availability features today. Treat code-defined MCP servers as the supported custom MCP path.
Next steps
Using credentials in code
Understand credential declaration, scopes, and defaults.
Actions
Build the action that consumes your custom credential.
Build agents
Attach actions and MCP servers as agent tools.
Connect and manage apps
Store the API key or OAuth credential your code will resolve.