toolscript-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
toolscript-mcp
A standalone MCP server for code mode. The model writes one JavaScript program that calls the tools of your other MCP servers in a sandbox. The program filters and joins the data there. Only the result goes back into the context.
The goal is a server that works with any MCP client, for example Claude Code, Claude Desktop, Cursor and Codex.
Status: pre-release. The server is not built yet, and the package is not on npm. This repository holds the core and the sandbox runner. See Roadmap.
Why
When a model calls MCP tools one by one, every full result goes into its context. Large results fill the context with raw JSON, and each step costs a round trip. With code mode, the loops, filters and joins run in a program. The model sees only the answer.
Related MCP server: pi-code-mode-mcp
How it will work
Your MCP client connects to toolscript-mcp. toolscript-mcp connects to your other MCP servers.
The model finds tools with
search_tools.The model sends one program to
run_code.The program runs in a separate Node process. Each nested tool call goes through your allow, deny and ask rules.
The return value of the program goes back to the model.
An example program:
const issues = await call("mcp__jira__search_issues", {
jql: "assignee = currentUser() AND statusCategory != Done",
})
const cutoff = Date.now() - 14 * 24 * 3600 * 1000
return issues.issues
.filter(i => Date.parse(i.fields.updated) < cutoff)
.map(i => ({ key: i.key, title: i.fields.summary }))The model sees a short list of keys and titles, not every full issue.
Sandbox
Layer | Linux | macOS | Windows |
Node | Yes | Yes | Yes |
Node permission model and an empty environment | Yes | Yes | Planned |
No network access |
|
| No |
CPU limit |
|
| No, wall-clock limit only |
The Node vm module is not a security boundary by itself. The sandbox limits accidents. It does not contain hostile
code. Read SECURITY.md.
Roadmap
Move the core and the sandbox runner out of the Claude Code plugin.
Start the sandbox on Linux, macOS and Windows.
Read a server config, connect to your MCP servers and add
search_tools.Add
run_codewith allow, deny and ask rules.Write the docs and publish 0.1.0 to npm.
Credits
toolscript-mcp is derived from claude-code-mode by Gabriele
Pavanello, under the MIT License, at commit eea4077. The sandbox runner, its protocol, tool search, output
projection and the hint format are his work.
Do you use only Claude Code? Then use his plugin. It reuses the MCP connections and the permission checks of Claude Code.
toolscript-mcp is an independent project. Gabriele Pavanello does not endorse it. It is not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.
Licence
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Create, deploy and run serverless JavaScript functions on microfn from any MCP client.
Build and run AI workflows, agents, data tables and 1000+ API integrations from any MCP client.
Sandbox workspace tools: search, file read, DB queries, integrations. Returns synthetic data.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides secure execution of arbitrary JavaScript code within a sandboxed QuickJS WASM environment, allowing language models or other MCP clients to safely run JavaScript code snippets without compromising the host system.5-
- AlicenseAqualityFmaintenanceComposes arbitrary MCP tools using JavaScript, enabling discovery, composition, and execution of other MCP servers through a single 'exec' tool.19 npm1MIT
- AlicenseNot gradedqualityBmaintenanceProvides a persistent JavaScript kernel that treats any configured MCP server as a capability catalog, exposing all its tools to the model through just two tools (js and js_reset) while keeping the model-visible schema small and injecting host parameters like projectPath.MIT
- AlicenseNot gradedqualityCmaintenanceLets agents run a small JavaScript program in a sandboxed worker that composes typed Jev judgments — claim checking, text screening, best-item picking, label classification, passage comparison, and yes/no questions — in a single call, returning only schema-validated results. A companion search tool exposes each judgment's JSON input and output schemas.1MIT