@act-sdk/cli
v3.0.1
Published
CLI for Act SDK
Downloads
101
Readme
@act-sdk/cli
CLI tool for initializing Act SDK projects and scaffolding MCP servers.
Installation
npm install -g @act-sdk/cli
# or
npx @act-sdk/cli initUsage
Initialize a new project
act-sdk initThis will:
- Create an
act-sdk.config.tsfile in your project root - Scaffold the MCP handler for your chosen framework
- Install required dependencies
Framework Options
- STDIO - Command-line MCP server (ready)
- Next.js - Next.js API route handler (ready)
- Express - Express.js handler (coming soon)
- Hono - Hono framework handler (coming soon)
Examples
STDIO Server
After running act-sdk init and selecting STDIO:
- Edit
act-sdk.config.tsto add your actions - Run:
npx tsx src/mcp-server.ts - Configure in Claude Desktop
Next.js Server
After running act-sdk init and selecting Next.js:
- Edit
act-sdk.config.tsto add your actions - Your handler is at
app/api/mcp/route.ts - Run:
npm run dev - MCP endpoint:
http://localhost:3000/api/mcp
Configuration
The generated act-sdk.config.ts includes an example action:
import { createAct, defineConfig } from '@act-sdk/core';
import { z } from 'zod';
const act = createAct();
act.action({
id: 'greet',
description: 'Greet a user',
input: z.object({
name: z.string().describe('The name of the person to greet'),
}),
handler: async ({ name }) => {
return `Hello, ${name}!`;
},
});
export default defineConfig({
name: 'my-mcp-server',
description: 'My MCP server',
version: '1.0.0',
act,
});Options
--skip-install
Skip automatic dependency installation:
act-sdk init --skip-installLicense
MIT
