Skip to content
Open source · MIT

Use the parts on their own.

Toolrails is built on two open-source packages. They work with any MCP tool list, on Node, Deno, Bun and edge runtimes, with no Toolrails account.

@toolrails/tool-search

Give it any list of tools and a request. It returns the few tools that matter and what they depend on.

terminal
npm i @toolrails/tool-search
search.ts
import { createIndex } from '@toolrails/tool-search'

const index = await createIndex(tools, { enrich: true })
const hits = await index.search('list open tickets', {
  filter: { read_only: true },
  limit: 5,
})
  • in-memory
  • Postgres + pgvector
  • Vercel AI SDK

Injection guardv0.2.0

@toolrails/injection-guard

Pass it content from an outside source. It returns a verdict and cleaned content, and catches attacks split across messages.

terminal
npm i @toolrails/injection-guard
guard.ts
import { guard } from '@toolrails/injection-guard'

const { verdict, content } = await guard(result, {
  source: 'gmail.get_message',
  trust: 'untrusted',
  mode: 'thorough',
})
  • local classifier
  • pluggable AI review
  • multi-message window
Self-host

The core, both packages and every integration run from one Docker Compose file. Only billing and the managed sign-in apps are hosted-only.

docker compose up