# Microfn

> Hosted JavaScript function sandbox that AI agents use through MCP to write, save, run, and schedule reusable functions.

Microfn, from Digital Vibes, gives AI agents a place to run JavaScript. An agent connected through MCP can create, edit, save, and execute functions in a hosted sandbox, and users can inspect the saved code and reuse it later.

## What It Is

Microfn is a hosted function runtime for agent-built tools. A user asks a connected agent, such as Claude, ChatGPT or Grok, to build a function, for example one that fetches the weather in Tokyo and sends it to Discord. The function is saved on Microfn and runs there rather than on the user's laptop, so no local server needs to stay alive.

## How Functions Are Called

A saved function can be invoked through MCP, an HTTP request or webhook, an incoming email, a cron schedule, or Siri Shortcuts, and every route leads to the same code. Functions can call other functions through the @microfn/fn module, so a weather function and a Discord notifier can be chained into a scheduled morning update. The runtime also provides modules for per-function secrets (@microfn/secret) and persistent key-value storage (@microfn/kv), and npm packages imported in a function are installed on deployment.

## Control and Visibility

Saved functions open in an editor where the code can be read and changed by the user or the agent. Guides describe debugging failed executions and replaying captured input after a fix. A public Explore page lists community functions that can be previewed and remixed.

## Setup Paths

Microfn publishes guides for connecting to Claude, Claude Code, ChatGPT, Grok, Gemini Spark and OpenAI Codex as custom MCP connectors. It also offers an OpenClaw skill, Agent Skills and a CLI, along with an MCP setup guide.

## Features
- MCP server for agents to create, edit, deploy and run JavaScript functions
- Hosted sandbox execution
- Inspectable code in an editor
- HTTP and webhook triggers
- Email triggers
- Cron schedules
- Siri Shortcuts calling
- Function-to-function calls via @microfn/fn
- Per-function secrets
- Persistent KV storage
- Automatic npm dependency installation
- Execution debugging and replay
- Public function explore and remix

## Integrations
Claude, Claude Code, ChatGPT, Grok, Gemini Spark, OpenAI Codex, OpenClaw, Discord, Telegram, Slack, GitHub webhooks, Siri Shortcuts

## Platforms
WINDOWS, MACOS, IOS, WEB, API, CLI

## Pricing
Freemium — Free tier available with paid upgrades

## Links
- Website: https://microfn.dev
- Documentation: https://docs.microfn.dev/
- EveryDev.ai: https://www.everydev.ai/tools/microfn
