{"id":47607344,"url":"https://github.com/shellicar/mcp-exec","last_synced_at":"2026-04-01T19:35:44.520Z","repository":{"id":345500499,"uuid":"1186068837","full_name":"shellicar/mcp-exec","owner":"shellicar","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-26T20:07:41.000Z","size":123,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T06:07:03.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shellicar.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-19T08:30:08.000Z","updated_at":"2026-03-26T19:52:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shellicar/mcp-exec","commit_stats":null,"previous_names":["shellicar/mcp-exec"],"tags_count":3,"template":false,"template_full_name":"shellicar/pnpm-starter","purl":"pkg:github/shellicar/mcp-exec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellicar%2Fmcp-exec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellicar%2Fmcp-exec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellicar%2Fmcp-exec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellicar%2Fmcp-exec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellicar","download_url":"https://codeload.github.com/shellicar/mcp-exec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellicar%2Fmcp-exec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-01T19:35:41.130Z","updated_at":"2026-04-01T19:35:44.499Z","avatar_url":"https://github.com/shellicar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @shellicar/mcp-exec\n\n\u003e An MCP server that runs commands without a shell, with built-in rules to block destructive operations\n\n[![npm package](https://img.shields.io/npm/v/@shellicar/mcp-exec.svg)](https://npmjs.com/package/@shellicar/mcp-exec)\n[![build status](https://github.com/shellicar/mcp-exec/actions/workflows/node.js.yml/badge.svg)](https://github.com/shellicar/mcp-exec/actions/workflows/node.js.yml)\n\n## Features\n\n* 🛡️ Built-in validation rules blocking destructive operations before execution\n* 🔗 Pipeline support with stdout piped to stdin across commands\n* ⚙️ Three chaining modes: sequential, bail-on-error, and independent\n* 📂 Per-step working directory, environment variables, and stdin injection\n* 📝 Output redirection to file with append support\n* 🔌 Pluggable rule system for custom validation rules\n* 🧹 ANSI code stripping for clean output\n\n## Installation \u0026 Quick Start\n\n```sh\nnpm i --save @shellicar/mcp-exec\n```\n\n```sh\npnpm add @shellicar/mcp-exec\n```\n\n```ts\nimport { createExecServer } from '@shellicar/mcp-exec';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\n\nconst server = createExecServer();\nconst transport = new StdioServerTransport();\nawait server.connect(transport);\n```\n\n\u003c!-- BEGIN_ECOSYSTEM --\u003e\n\n## @shellicar TypeScript Ecosystem\n\n### MCP Servers\n\n- [`@shellicar/mcp-exec`](https://github.com/shellicar/mcp-exec) - An MCP server that runs commands without a shell, with built-in rules to block destructive operations.\n\n### Core Libraries\n\n- [`@shellicar/core-config`](https://github.com/shellicar/core-config) - A library for securely handling sensitive configuration values like connection strings, URLs, and secrets.\n- [`@shellicar/core-di`](https://github.com/shellicar/core-di) - A basic dependency injection library.\n\n### Reference Architectures\n\n- [`@shellicar/reference-foundation`](https://github.com/shellicar/reference-foundation) - A comprehensive starter repository. Illustrates individual concepts.\n- [`@shellicar/reference-enterprise`](https://github.com/shellicar/reference-enterprise) - A comprehensive starter repository. Can be used as the basis for creating a new Azure application workload.\n\n### Build Tools\n\n- [`@shellicar/build-clean`](https://github.com/shellicar/build-clean) - Build plugin that automatically cleans unused files from output directories.\n- [`@shellicar/build-version`](https://github.com/shellicar/build-version) - Build plugin that calculates and exposes version information through a virtual module import.\n- [`@shellicar/build-graphql`](https://github.com/shellicar/build-graphql) - Build plugin that loads GraphQL files and makes them available through a virtual module import.\n- [`@shellicar/graphql-codegen-treeshake`](https://github.com/shellicar/graphql-codegen-treeshake) - A graphql-codegen preset that tree-shakes unused types from TypeScript output.\n\n### Framework\n\n- [`@shellicar/svelte-adapter-azure-functions`](https://github.com/shellicar/svelte-adapter-azure-functions) - A [SvelteKit adapter](https://kit.svelte.dev/docs/adapters) that builds your app into an Azure Function.\n- [`@shellicar/cosmos-query-builder`](https://github.com/shellicar/cosmos-query-builder) - Helper class for type safe advanced queries for Cosmos DB (Sql Core).\n- [`@shellicar/ui-shadcn`](https://github.com/shellicar/ui-shadcn) - Shared Svelte 5 component library built on shadcn-svelte with Tailwind CSS v4 theming.\n\n### Logging \u0026 Monitoring\n\n- [`@shellicar/winston-azure-application-insights`](https://github.com/shellicar/winston-azure-application-insights) - An [Azure Application Insights](https://azure.microsoft.com/en-us/services/application-insights/) transport for [Winston](https://github.com/winstonjs/winston) logging library.\n- [`@shellicar/pino-applicationinsights-transport`](https://github.com/shellicar/pino-applicationinsights-transport) - [Azure Application Insights](https://azure.microsoft.com/en-us/services/application-insights) transport for [pino](https://github.com/pinojs/pino)\n\n\u003c!-- END_ECOSYSTEM --\u003e\n\n## Motivation\n\nClaude Code's Bash tool passes commands through a shell interpreter. That means shell expansion, operator chaining, pipes, heredocs, and subshells all execute before any permission check can inspect them. A single `bash -c` call can hide anything.\n\n`mcp-exec` removes the shell entirely. Commands are structured as JSON (program, arguments, working directory, environment), which means the model is constrained by its schema training. When the input is a JSON schema, Claude doesn't guess: it produces valid calls with the precision of Excalibur. JSON-calibur, if you will.\n\nValidation rules check every command against configurable policies before anything executes. Destructive operations like `rm -rf`, `git push --force`, and `git reset --hard` are blocked by default. No shell means no surprises. No surprises means you can actually trust the agent with your repo.\n\n## Feature Examples\n\n* Run a standalone MCP server.\n\n```ts\nimport { createExecServer } from '@shellicar/mcp-exec';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\n\nconst server = createExecServer({ cwd: '/workspace' });\nawait server.connect(new StdioServerTransport());\n```\n\n* Add the exec tool to an existing MCP server.\n\n```ts\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { execToolDefinition } from '@shellicar/mcp-exec';\n\nconst server = new McpServer({ name: 'my-server', version: '1.0.0' });\nexecToolDefinition(server, { cwd: '/workspace' });\n```\n\n* Add custom validation rules alongside or instead of the built-in set.\n\n```ts\nimport { createExecServer, builtinRules } from '@shellicar/mcp-exec';\nimport type { ExecRule } from '@shellicar/mcp-exec';\n\nconst noNpm: ExecRule = {\n  name: 'no-npm',\n  check: (commands) =\u003e {\n    if (commands.some((c) =\u003e c.program === 'npm')) {\n      return 'Use pnpm instead of npm.';\n    }\n    return undefined;\n  },\n};\n\nconst server = createExecServer({ rules: [...builtinRules, noNpm] });\n```\n\n## Built-in Rules\n\n| Rule | Blocks |\n|---|---|\n| `no-destructive-commands` | `rm`, `rmdir`, `mkfs`, `dd`, `shred` |\n| `no-xargs` | `xargs` |\n| `no-sed-in-place` | `sed -i` / `--in-place` |\n| `no-git-rm` | `git rm` |\n| `no-git-checkout` | `git checkout` |\n| `no-git-reset` | `git reset` |\n| `no-force-push` | `git push --force` / `-f` |\n| `no-exe` | `.exe` calls |\n| `no-sudo` | `sudo` |\n| `no-git-C` | `git -C` |\n| `no-pnpm-C` | `pnpm -C` |\n| `no-env-dump` | `env` / `printenv` without arguments |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellicar%2Fmcp-exec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellicar%2Fmcp-exec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellicar%2Fmcp-exec/lists"}