microfn — The toolbox for tiny, composable functions

3 min read Original article ↗

Now in early access

The AI-Ready Cloud for Tiny Functions

Write serverless functions. Deploy instantly. Trigger via HTTP, cron, email — or let your AI agents create and execute them.

Connect microfn MCP Use the OpenClaw skill Use the MicroFn CLI

No credit card • Deploy in seconds • Free tier available

Your AI's Function Workshop

Let your LLM generate, edit, and run functions in a secure sandbox — spinning up new tools on the fly.

One Function, Many Ways In

Trigger your function from anywhere — HTTP webhooks, scheduled jobs, inbound email, or your AI assistant.

Your Function

david/send-discord

Deployed

Webhook

POST /run/:user/:fn

AI Assistant

MCP tool calls your function

Scheduled (CRON)

Runs on a schedule

Siri Shortcuts

Voice and iOS automation

Webhook

POST /run/:user/:function

AI Assistant

MCP tool calls your function

Scheduled (CRON)

Runs on a schedule

Siri Shortcuts

Voice and iOS automation

Your Function

david/send-discord

Compose and Link Functions

Functions can call other functions. Build small, compose big.

get-weather.ts

export async function main() {
  const res = await fetch(
    "https://wttr.in/Tokyo"
  );
  return res.text();
}

weather-to-discord.ts

import fn from "@microfn/fn";

export async function main() {
  const weather = await fn.executeFunction(
    "david/get-weather"
  );

  return fn.executeFunction(
    "david/send-discord",
    { message: weather }
  );
}

send-discord-message.ts

export async function main(input: { channelId: string, content: string }) {
  const token = await secret.getRequired("DISCORD_BOT_TOKEN");

  const response = await fetch(
    `https://discord.com/api/v10/channels/${input.channelId}/messages`,
    {
      method: "POST",
      headers: {
        Authorization: `Bot ${token}`,
        "Content-Type": "application/json",
      },
      body: JSON.stringify({ content: input.content }),
    },
  );

  if (!response.ok) {
    const data = await response.json().catch(() => ({}));
    throw new Error(`Discord error: ${response.status} ${JSON.stringify(data)}`);
  }

  return await response.json();
}

A Living Ecosystem of Functions

Start building with our curated collection of functions. Each one is instantly usable, remixable, and ready to compose into powerful workflows.

View All Functions

Build Together, Ship Faster

Zero Setup

Start coding immediately. No local development environment, no configuration files, no deployment headaches.

Instant Triggers

Turn any function into an endpoint, cron job, or email trigger in seconds.

One-Click Remix

Clone any public function and customize it for your needs. Share your improvements back to the community.

Fixed Monthly Subscription

Predictable costs with a flat monthly fee. No surprises, just unlimited potential.

AI Assistant Ready

Connect AI assistants via MCP protocol. Let Claude and other AI tools trigger your functions dynamically.

Choose Your Plan

Start free and upgrade as you grow. Transparent pricing with no hidden fees.

Pro

For power users and teams

$5 /month

Unlimited daily executions

Early access to new features

Team collaboration (coming soon)

Upgrade to Pro

Join the Function Economy

Be part of a community where every function is a building block for something bigger. Create, share, and profit from your innovations.