home / mcp / any script mcp server
Publishes CLI tools and shell scripts as MCP Tools for configurable, scripted automation.
Configuration
View docs{
"mcpServers": {
"izumin5210-any-script-mcp": {
"command": "npx",
"args": [
"any-script-mcp"
]
}
}
}You can publish arbitrary shell scripts and CLI tools as MCP Tools with this server. By defining tools in a configuration file, you enable MCP clients to run your scripts in a controlled, repeatable way while keeping the command surface centralized and versioned.
Register your toolset with an MCP client configuration, then run MCP Tools from any client that supports MCP. Each tool is defined with input parameters and a run script. Inputs become environment variables or JSON payloads, and the tool’s run script executes in a shell with those inputs available for processing.
Prerequisites: you need Node.js and npm to use the MCP server via npm or npx.
Install and run the MCP server using npx. You can also register the server through a management CLI if you are using a cluster or registry workflow.
$ claude mcp add any-script \
-s user \
-- npx any-script-mcp
```
```json
{
"mcpServers": {
"any-script": {
"command": "npx",
"args": ["any-script-mcp"]
}
}
}Create a configuration file at the standard config path or specify a custom path using an environment variable. This server supports loading multiple configuration files and merging their tools.
Configuration file paths and environment variable examples shown here illustrate how to point to a single file or multiple files, so you can separate common tools from personal or project-specific customizations.
You can test your configuration with the MCP Inspector tool, which opens a web interface to view registered tools and test them interactively.
# yaml-language-server: $schema=https://raw.githubusercontent.com/izumin5210/any-script-mcp/main/config.schema.json
tools:
- name: echo
description: Echo a message
inputs:
message:
type: string
description: Message to echo
run: |
echo "Received: $INPUTS__MESSAGE"
- name: git_status
description: Check git status with optional branch
inputs:
branch-name:
type: string
description: Branch to check out
required: false
verbose:
type: boolean
description: Show verbose output
default: false
run: |
if [ -n "${INPUTS__BRANCH_NAME:-}" ]; then
git checkout "$INPUTS__BRANCH_NAME"
fi
if [ "$INPUTS__VERBOSE" = "true" ]; then
git status -v
else
git status
fi
# Delegate search to codex CLI. Inspired by https://github.com/yoshiko-pg/o3-search-mcp
- name: codex-search
description: AI agent with web search for researching latest information, troubleshooting program errors, discussing complex problems and design decisions, exploring advanced library usage, and investigating upgrade paths. Supports natural language queries.
inputs:
prompt:
type: string
description: What you want to search, analyze, or discuss with the AI agent
run: |
codex exec \
--model gpt-5 \
--sandbox workspace-write \
--config "sandbox_workspace_write.network_access=true" \
"$INPUTS__PROMPT" \
--json \
| jq -sr 'map(select(.msg.type == "agent_message") | .msg.message) | last'
timeout: 600000 # 10 minutes for complex AI operations
- name: build
description: Run build process with tests
run: |
npm run build
npm test
timeout: 180000 # 3 minutes for build and testLimit the tools exposed by each configuration to those you explicitly define. Use input validation within each tool’s run script and prefer using environment variables or INPUTS_JSON to pass structured data to scripts. Keep sensitive data out of logs by avoiding echoing raw secrets and consider restricting tool execution to trusted environments.
Echo a message to the console using a defined input
Check git status with optional branch and verbosity controls
AI agent that performs web search and returns synthesized results for a given prompt
Run build process and tests to verify project integrity