# Act Sdk Js

> 🚀 The fastest way to add MCP to Typescript apps.

- **Type:** MCP server
- **Install:** `agentstack add mcp-act-sdk-act-sdk-js`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [act-sdk](https://agentstack.voostack.com/s/act-sdk)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [act-sdk](https://github.com/act-sdk)
- **Source:** https://github.com/act-sdk/act-sdk-js
- **Website:** https://act-sdk.dev

## Install

```sh
agentstack add mcp-act-sdk-act-sdk-js
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Act SDK

**The fastest way to add MCP to TypeScript apps.**

Act SDK is the simplest way to bring MCP into your application. It gives you everything you need to go from existing logic to a working MCP server in minutes. Expose existing functions as tools, integrate with frameworks like Next.js, Express, Hono, etc., and ship without building servers from scratch.

> Built on top of the [official Model Context Protocol TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk).

```ts
// your existing function
async function getDoughnuts({ userId, limit }: { userId: string; limit?: number }) {
  return db.doughnuts.findMany({ where: { userId }, take: limit ?? 10 });
}

// register it — now MCP-ready
export const getDoughnuts = act.action({
  id: 'getDoughnuts',
  description: 'Get doughnuts for a user',
  input: z.object({
    userId: z.string(),
    limit: z.number().optional(),
  }),
  handler: async ({ userId, limit }) => {
    return db.doughnuts.findMany({ where: { userId }, take: limit ?? 10 });
  },
});

// your app
await getDoughnuts({ userId: '123', limit: 5 });

// an MCP agent
// → calls getDoughnuts with { userId: '123', limit: 5 }
```

No new server. No separate process. No MCP knowledge required.

---

## Install

```bash
npx @act-sdk/cli init
```

Or manually:

```bash
npm install @act-sdk/core @act-sdk/mcp @act-sdk/adapters zod
```

## Next.js

**1. Wrap your existing logic** (`lib/actions/doughnuts.ts`):

```ts
import { z } from 'zod';
import { act } from '@/act-sdk.config';

export const getDoughnuts = act.action({
  id: 'getDoughnuts',
  description: 'Get doughnuts for the authenticated user',
  input: z.object({ limit: z.number().optional() }),
  handler: async ({ limit }, context) => {
    return db.doughnuts.findMany({
      where: { userId: context?.authInfo.userId },
      take: limit ?? 10,
    });
  },
});

export const orderDoughnut = act.action({
  id: 'orderDoughnut',
  description: 'Order a doughnut for the authenticated user',
  input: z.object({ flavour: z.string() }),
  handler: async ({ flavour }, context) => {
    return db.orders.create({
      data: { flavour, userId: context?.authInfo.userId },
    });
  },
});
```

**2. Config File** (`act-sdk.config.ts`):

```ts
import { createAct, defineConfig } from '@act-sdk/core';

export const act = createAct();

export default defineConfig({
  name: 'my-app',
  description: 'My app MCP server',
  version: '1.0.0',
  act,
});
```

**3. Add the route** (`app/api/mcp/route.ts`):

```ts
import { createNextHandler } from '@act-sdk/adapters/nextjs';
import config from '@/act-sdk.config';

export const { GET, POST, DELETE } = createNextHandler(config, {
  auth: async (req) => {
    const token = req.headers.get('authorization')?.split(' ')[1];
    if (!token) return null;
    return verifyJWT(token);
  },
});
```

## STDIO

```ts
import { createStdioServer } from '@act-sdk/adapters/stdio';
import config from './act-sdk.config.js';

createStdioServer(config);
```

---

## Packages

| Package             | Purpose                                          |
| ------------------- | ------------------------------------------------ |
| `@act-sdk/core`     | Action registry, `createAct()`, `defineConfig()` |
| `@act-sdk/mcp`      | Translates actions into MCP tools                |
| `@act-sdk/adapters` | Next.js and STDIO adapters                       |

---

## Coming Soon

Express, Hono, and Fastify adapters are on the roadmap. If you need one sooner, [open an issue](https://github.com/act-sdk/act-sdk-js/issues) and let us know — we prioritize based on demand.

---

MIT

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [act-sdk](https://github.com/act-sdk)
- **Source:** [act-sdk/act-sdk-js](https://github.com/act-sdk/act-sdk-js)
- **License:** MIT
- **Homepage:** https://act-sdk.dev

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-act-sdk-act-sdk-js
- Seller: https://agentstack.voostack.com/s/act-sdk
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
