ByteChef LogoByteChef

Claude Code

Runs Claude Code on the ByteChef server, with the MCP servers you attach to it and the skills you select.

Categories: Artificial Intelligence

Type: claudeCode/v1


Actions

Chat

Name: chat

Sends a message to Claude Code. Claude Code can use the tools of the attached MCP servers and the selected skills.

Properties

NameLabelTypeDescriptionRequired
scriptMessageSTRINGThe message to send to Claude Code.true
skillsSkillsARRAY
Items [INTEGER($skillId)]
Skills from the ByteChef skill library (Settings > AI > Skills) that Claude Code can use. ByteChef writes them to .claude/skills in the working directory at the start of each run.false
workspaceNameWorkspace NameSTRINGName of the working directory, which is kept between runs. Claude Code steps of this workflow with the same workspace name share files; steps with different names do not. Letters, digits, '-' and '_' only.false

Example JSON Structure

{
  "label" : "Chat",
  "name" : "chat",
  "parameters" : {
    "script" : "",
    "skills" : [ 1 ],
    "workspaceName" : ""
  },
  "type" : "claudeCode/v1/chat"
}

Output

Sample Output:

Sample result

Type: STRING


Additional Instructions

Before you start

Claude Code runs as the Claude Code CLI on the ByteChef server. The component is off by default.

  1. Set bytechef.component.claude-code.enabled to true (environment variable BYTECHEF_COMPONENT_CLAUDE_CODE_ENABLED=true).
  2. Install the claude CLI on the server, on the PATH of the user that runs ByteChef.
  3. Set ANTHROPIC_API_KEY in the environment of the ByteChef server.

Chat checks that the CLI is installed before it starts and fails with a setup message when it is not. Restart ByteChef after you install the CLI.

Claude Code runs with all tool permissions on the server, and it is not confined to its working directory. It can read and write every file that the server user can, including the working directories of other workflows and tenants. Run ByteChef as a user that has access only to what Claude Code needs.

MCP Servers

Add MCP Server elements from the MCP Client component to the MCP Servers slot to give Claude Code the tools of those servers. Each element uses its own MCP Client connection:

  • Server URL and Transport Type tell Claude Code where the server is and how to reach it.
  • The connection's authorization (bearer token or OAuth2) becomes the Authorization header of every request. OAuth2 tokens are read when the run starts.
  • Server Name is the prefix of the server's tool names. It defaults to the host of the server URL. When two servers have the same name, the second one gets a _2 suffix.

Skills

Select skills from the ByteChef skill library (Settings > AI > Skills) in the Skills property of Chat. Every file of each selected skill is available to Claude Code, including its scripts and templates.

How a run works

Each deployed workflow has its own working directory, and it is kept between runs. Files that Claude Code writes in one run, for example a cloned repository or notes, are there in the next run. The directory is below bytechef.component.claude-code.workspace.basedir (default ~/bytechef/data/claude-code-workspaces):

  • Deployed workflows: <tenant>/<automation or embedded>/<deployment id>/<environment>/<workflow id>/<workspace name>.
  • Test runs in the workflow editor: <tenant>/test/job-<job id>/<workspace name>. Each test run gets a new, empty directory.

Workspace Name (advanced, default default) selects the directory. Claude Code steps of the same workflow with the same workspace name share files. Steps with different names do not. Only one run at a time uses a directory: a second run waits until the first run ends. This applies to the runs of one ByteChef node. When several nodes share the base directory, for example on a network file system, runs on different nodes can use the same directory at the same time.

At the start of each run, ByteChef deletes the .claude directory in the working directory and writes the selected skills to .claude/skills again. Claude Code loads only the settings of the working directory. The settings, plugins and output styles in the home directory of the server user are not used. A CLAUDE.md file in the working directory is kept, so Claude Code can keep project notes in it from run to run.

Workspace cleanup

Every bytechef.component.claude-code.workspace.cleanup-interval (default 1 hour), each ByteChef node removes from its own disk:

  • the directories of editor test runs older than workspace.test-retention (default 24 hours);
  • the directories of deleted tenants, deployments, integration instances and workflows;
  • deployed directories in which nothing changed for workspace.idle-retention. This is off by default.

A directory that a run of the same node is using is not removed.

Workspace size limit

bytechef.component.claude-code.workspace.max-size (default 1 GB, 0 for no limit) limits the size of each working directory:

  • Write, Edit, MultiEdit and NotebookEdit are refused when they would make the directory larger than the limit. Claude Code is told how much space is used and to delete files.
  • A Bash command that makes the directory larger than the limit finishes, and Claude Code is told that the directory is over its limit. While it is over the limit, only single commands that start with rm, rmdir, truncate -s 0 or find ... -delete run. Commands joined with ;, &&, | or a newline, redirections, command substitutions and find with -exec are refused.

One command can go over the limit by the amount that it writes. The skills that ByteChef writes to .claude/skills do not count. The limit applies to the working directory only, not to files that Claude Code writes in other directories of the server.

How is this guide?

Last updated on

On this page