Connect Bash to Claude Code

Run shell commands in the project's own sandbox, or read files, list directories and search the filesystem under a narrower read-only grant. Add Toolspoke to Claude Code once and it can use 7 Bash actions. Your Bash credential stays in Toolspoke, and you choose which actions Claude Code may call.

Set it up in Claude Code

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Claude Code

    Run it in your project, then /mcp to sign in

    claude mcp add --transport http toolspoke https://toolspoke.com/mcp

    The sign-in opens in your browser, and Toolspoke asks you to approve it.

  2. Install Bash and connect it

    Add Bash to a project in your Toolspoke workspace.

    Bash needs no credential. There is nothing to go and fetch: the settings below are optional, and they are configuration rather than secrets.

  3. Choose what Claude Code may do

    All 7 actions start on. Switch off any of the 2 actions that change something in Bash, and Claude Code gets a refusal if it tries.

What you can ask Claude Code for

A few of the Bash actions that only read, so they are safe to try first.

  • List one directory in long format, including dotfiles
  • Return the contents of one text file, optionally from a starting line
  • Search file contents recursively and return matching lines as path:line:text
  • Find files and directories by name under a directory tree, using a shell glob such as "*.test.ts"

What Claude Code can do in Bash

5 actions read, one writes and one deletes or permanently changes something.

Reads

  • Sandbox info

    Report what this sandbox is: bash version, kernel, working directory, free space, and which of the common command-line tools are installed. Call this first when you are unsure whether a tool you want to use exists.

  • List directory

    List one directory in long format, including dotfiles. The path is passed to the shell as data, so this can never run a command, it is safe to grant on its own. Use find_files to search a tree.

  • Read file

    Return the contents of one text file, optionally from a starting line. The path is passed to the shell as data and cannot become a command. Output is truncated at 100,000 characters, so page through a large file with start_line.

  • Search files

    Search file contents recursively and return matching lines as path:line:text. The pattern is an extended regular expression (grep -E); binary files are skipped. No matches is a successful empty result, not an error.

  • Find files

    Find files and directories by name under a directory tree, using a shell glob such as "*.test.ts". Searches names only, use search_files to search contents.

Writes

  • Write file

    Create or overwrite one file with the given text, creating parent directories as needed, and report the byte count written. Only /workspace is writable. This replaces the file without warning and cannot append, read it first if you need to keep what is there.

Deletes or permanently changes

  • Run command

    Run an arbitrary shell command line in the sandbox and return its stdout, stderr and exit code. One self-contained line or `&&` chain: the process is discarded afterwards, so a cd, an export or a background job does not carry over to the next call. Killed at 20 seconds. A non-zero exit is raised as an error carrying stderr, and that call's stdout is lost, append `2>&1 || true` when you need the output of a failing command.

Bash in Claude Code: questions

Does Claude Code see my Bash credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Claude Code only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Claude Code from changing things in Bash?

Yes. Each of the 7 actions can be switched off for a project. Turn off the 2 that change something and Claude Code can only read.

Will 7 actions crowd Claude Code's context?

No. Toolspoke shows Claude Code five bridge tools, plus a guide where a toolkit has one, and Claude Code searches for the Bash action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Can I add it once for every project?

Yes. Add --scope user to the command and Claude Code keeps Toolspoke in every project on this machine. Without it, the server is added to the project you ran the command in.

What does it cost?

Tool calls are free on every plan. Bash runs in a sandbox, so a call bills the sandbox time it uses.

Try Bash in Claude Code

Free to start, and tool calls cost nothing on any plan.