Use Anthropic SDK with Swytchcode tool calling

Build Anthropic agent workflows that execute through Swytchcode.

Book a demo

6

Setup steps

1

Provider path

Auditable

Tool calls

Safe

Execution

CLI

Ship in one command.

Pull the manifest, set your policy, execute. No SDK sprawl, no boilerplate. Just the tool you need, right now.

npm install @swytchcode/runtime @anthropic-ai/sdk dotenv
swytchcode login
swytchcode get github

How it connects

Connect Anthropic SDK in minutes

Follow these steps to connect your agent, load a toolkit, and start executing tools through Swytchcode.

  1. 1

    Install the Swytchcode CLI

    Install the CLI so Claude can discover and execute trusted tools from your project.

    npm install -g swytchcode
  2. 2

    Initialize your project and connect GitHub

    Set up a Swytchcode project, install the GitHub integration, enable a tool, and connect your account via OAuth.

    swytchcode init
    swytchcode get github
    swytchcode add method github.user.starred.update
    swytchcode auth connect github
  3. 3

    Install the SDK

    Install the Runtime SDK together with the Anthropic SDK.

    npm install @swytchcode/runtime @anthropic-ai/sdk dotenv
  4. 4

    Add your Anthropic API key

    Store your key in a .env file so the SDK can authenticate with Claude.

    ANTHROPIC_API_KEY=sk-ant-...
  5. 5

    Build your agent

    Initialize Swytchcode with the Anthropic provider, load your tools, and let Claude call them directly.

    import { Swytchcode, TOOL_USE_INSTRUCTIONS } from '@swytchcode/runtime'
    import { AnthropicProvider } from '@swytchcode/runtime/providers/anthropic'
    
    const swx = new Swytchcode(new AnthropicProvider())
    const tools = await swx.tools.get({ toolkits: ['github'] })
  6. 6

    Run the application

    Swytchcode validates the request, resolves credentials, evaluates policy, executes the call, and returns the result to Claude.

    node main.js

Works with

APIs your team already uses

GitHub
Stripe

Ready to ship anthropic sdk integrations?

Install the CLI and pull your first manifest in under a minute. No account required.

Book a demo