> ## Documentation Index
> Fetch the complete documentation index at: https://docs.context.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Swytchcode

> Call Context.dev from AI agents through Swytchcode's managed API execution layer.

Swytchcode packages the Context.dev API as agent-ready tools with authentication, validation, retries, policies, and audit history handled by its execution layer.

<Card title="Open Context.dev on Swytchcode" icon="arrow-up-right-from-square" href="https://www.swytchcode.com/apis/context-dev">
  Review the Context.dev manifest and setup guide in Swytchcode's integration directory.
</Card>

## Install and connect

<Steps>
  <Step title="Install the CLI">
    ```bash theme={null}
    npm install -g swytchcode
    swy login
    ```
  </Step>

  <Step title="Add Context.dev to your project">
    Run these commands from the project your agent will use:

    ```bash theme={null}
    swy init
    swy get context_dev
    ```
  </Step>

  <Step title="Enable the tools you need">
    Inspect the downloaded manifest, then add only the methods your agent should be allowed to call:

    ```bash theme={null}
    swy list methods
    swy add context_dev.<method>
    ```
  </Step>

  <Step title="Connect Context.dev">
    ```bash theme={null}
    swy auth connect context_dev
    swy auth status
    ```

    Enter a Context.dev API key from the [dashboard](https://context.dev/dashboard) when prompted.
  </Step>
</Steps>

<Info>
  Swytchcode uses a Context.dev API key for REST API calls. This is separate from the browser-based OAuth flow used by the hosted Context.dev MCP server.
</Info>

## Verify the setup

Inspect an enabled method before calling it:

```bash theme={null}
swy list tooling
swy info context_dev.<method>
swy exec context_dev.<method> --dry-run
```

When the dry run validates, remove `--dry-run` and provide the method's required arguments. Calls consume credits from the connected Context.dev account.

## Use with an agent

Swytchcode can expose the enabled tools to supported MCP clients and agent frameworks. Follow its [MCP setup guide](https://docs.swytchcode.com/quickstarts/getting-started/mcp/) for your client, then ask the agent for a concrete result:

```text theme={null}
Use the Context.dev tool from Swytchcode to scrape https://www.context.dev and return the page title and source URL.
```

## Reference

<CardGroup cols={2}>
  <Card title="Context.dev on Swytchcode" icon="plug" href="https://www.swytchcode.com/apis/context-dev">
    Open the integration listing and manifest instructions.
  </Card>

  <Card title="Swytchcode CLI guide" icon="terminal" href="https://docs.swytchcode.com/quickstarts/getting-started/cli-only/">
    Install integrations, enable methods, connect accounts, and execute tools.
  </Card>

  <Card title="Swytchcode MCP setup" icon="robot" href="https://docs.swytchcode.com/quickstarts/getting-started/mcp/">
    Add Swytchcode to supported AI clients.
  </Card>

  <Card title="Context.dev API quickstart" icon="code" href="/quickstart">
    Call Context.dev directly with an SDK or REST.
  </Card>
</CardGroup>
