Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,6 @@ smithery auth token # Mint a service token
smithery auth token --policy '<json>' # Mint a restricted token
```

### Automations

Create and run deterministic MCP tool scripts — no AI involved, just direct tool calls.

```bash
smithery automation init # Initialize the ~/.smithery automations project
smithery automation create <name> # Create a new automation from a template
smithery automation list # List all automations
smithery automation get <name> # Show automation details and source code
smithery automation run <name> [key=value...] # Run an automation with arguments
smithery automation remove <name> # Delete an automation
```

### Namespaces

```bash
Expand Down Expand Up @@ -100,11 +87,6 @@ smithery tool call github create_issue '{"title":"Bug fix","body":"..."}'
smithery skill search "frontend" --json --page 2
smithery skill add anthropics/frontend-design --agent claude-code

# Create and run an automation
smithery automation init
smithery automation create create-ticket
smithery automation run create-ticket title="Bug fix" priority=high

# Publish your MCP server URL
smithery mcp publish "https://my-mcp-server.com" -n myorg/my-server
```
Expand Down
17 changes: 0 additions & 17 deletions build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,6 @@ await esbuild.build({
define,
})

// Build automation SDK entry point (for programmatic usage)
await esbuild.build({
entryPoints: ["src/commands/automation/context.ts"],
bundle: true,
platform: "node",
target: "node20",
format: "esm",
minify: true,
treeShaking: true,
outfile: "dist/automation.js",
external: nativePackages,
banner: {
js: `import { createRequire } from 'module'; const require = createRequire(import.meta.url);`,
},
define,
})

// Copy runtime files to dist/runtime/
const runtimeDir = "dist/runtime"
if (!existsSync(runtimeDir)) {
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@
"exports": {
".": {
"import": "./dist/index.js"
},
"./automation": {
"import": "./dist/automation.js"
}
},
"engines": {
Expand Down
73 changes: 1 addition & 72 deletions skills/smithery-ai-cli/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: smithery-ai-cli
description: Find, connect, and use MCP tools and skills via the Smithery CLI. Use when the user searches for new tools or skills, wants to discover integrations, connect to an MCP, install a skill, create or run automations, or wants to interact with an external service (email, Slack, Discord, GitHub, Jira, Notion, databases, cloud APIs, monitoring, etc.).
description: Find, connect, and use MCP tools and skills via the Smithery CLI. Use when the user searches for new tools or skills, wants to discover integrations, connect to an MCP, install a skill, or wants to interact with an external service (email, Slack, Discord, GitHub, Jira, Notion, databases, cloud APIs, monitoring, etc.).
metadata: { "openclaw": { "requires": { "bins": ["smithery"] }, "homepage": "https://smithery.ai" } }
---

Expand Down Expand Up @@ -119,77 +119,6 @@ smithery auth token --policy '{
}'
```

### [Automations](https://smithery.ai/docs/use/automations.md)

Automations are deterministic TypeScript scripts that call MCP tools without AI.
They live in `~/.smithery/automations/` and each file exports a `servers` array (MCP URLs) and a `run` function.
Smithery handles connection management and auth — the automation just calls tools.

Canonical flow:

```bash
# 1. Initialize the ~/.smithery project (once)
smithery automation init

# 2. Create an automation
smithery automation create create-linear-ticket

# 3. Edit ~/.smithery/automations/create-linear-ticket.ts
# - Add server URLs to the servers array
# - Implement the run function using ctx.callTool()

# 4. Run it with key=value arguments
smithery automation run create-linear-ticket ticket-name="Fix login bug" priority=high
```

Automation file structure:

```typescript
export const servers = ["https://server.smithery.ai/linear"]

export async function run(
args: Record<string, string>,
ctx: {
callTool: (server: string, toolName: string, toolArgs: Record<string, unknown>) => Promise<unknown>
},
) {
const result = await ctx.callTool(
"https://server.smithery.ai/linear",
"create_issue",
{ title: args["ticket-name"], priority: args["priority"] }
)
console.log("Created:", result)
}
```

CRUD commands: `automation create`, `automation list`, `automation get`, `automation remove`.
On first run, connections are auto-created for each server URL. If auth is required, the CLI prints the authorization URL.

### Programmatic Automations (SDK)

The same automation context is available as a library import for any TypeScript project.
Install `@smithery/cli` and import `createAutomationContext` from `@smithery/cli/automation`.

```typescript
import { createAutomationContext } from "@smithery/cli/automation"

const ctx = await createAutomationContext({
servers: ["https://server.smithery.ai/linear"],
apiKey: process.env.SMITHERY_API_KEY, // or omit to use stored key
})

const result = await ctx.callTool(
"https://server.smithery.ai/linear",
"create_issue",
{ title: "Bug: login page broken", priority: "high" },
)
```

This works anywhere — standalone scripts, API routes, background jobs, CI pipelines, etc.
Connections are auto-created and MCP clients are managed for you, same as the CLI.
Pass `apiKey` explicitly (e.g. from env vars) instead of relying on `smithery auth login`.
Auth errors throw with an `authorizationUrl` property for your code to handle.

### Piped Output

When output is piped, Smithery commands emit JSONL (one JSON object per line):
Expand Down
160 changes: 0 additions & 160 deletions src/commands/automation/context.ts

This file was deleted.

65 changes: 0 additions & 65 deletions src/commands/automation/create.ts

This file was deleted.

14 changes: 0 additions & 14 deletions src/commands/automation/ensure-init.ts

This file was deleted.

Loading
Loading