loaditout.ai
SkillsPacksTrendingLeaderboardAPI DocsBlogSubmitRequestsCompareAgentsXPrivacyDisclaimer
{}loaditout.ai
Skills & MCPPacksBlog

flagpost

MCP Tool

sathergate/flagpost

Feature flags for Next.js. One file, full control.

Install

$ npx loaditout add sathergate/flagpost

Platform-specific configuration:

.claude/settings.json
{
  "mcpServers": {
    "flagpost": {
      "command": "npx",
      "args": [
        "-y",
        "flagpost"
      ]
    }
  }
}

Add the config above to .claude/settings.json under the mcpServers key.

About

flagpost

Feature flags for Next.js. One file, full control.

[](https://www.npmjs.com/package/flagpost) [](./LICENSE)

Zero dependencies. Type-safe. Works with Server Components, Client Components, and Middleware.

---

Install
npm install flagpost
Quick Start
1. Define your flags
// lib/flags.ts
import { createFlagpost } from "flagpost";

export const fp = createFlagpost({
  flags: {
    darkMode: {
      defaultValue: false,
      description: "Enable dark mode across the app",
    },
    heroVariant: {
      defaultValue: "control" as const,
      description: "A/B test for the hero section",
      rules: [{ value: "experiment" as const, percentage: 50 }],
    },
    maxItems: {
      defaultValue: 10,
      description: "Maximum items per page",
      rules: [{ value: 50, match: { plan: "pro" } }],
    },
  },
  context: async () => ({
    // Resolve user context however you like
    userId: "anonymous",
  }),
});
2. Protect your UI (Client)
// app/page.tsx
"use client";
import { FlagpostProvider, Flag, FlagSwitch } from "flagpost/react";
import { fp } from "@/lib/flags";

export default function App() {
  return (
    <FlagpostProvider flagpost={fp}>
      <Flag name="darkMode" fallback={<LightTheme />}>
        <DarkTheme />
      </Flag>

      <FlagSwitch
        name="heroVariant"
        cases={{
          control: <HeroA />,
          experiment: <HeroB />,
        }}
      />
    </FlagpostProvider>
  );
}
3. Check server-side
// app/dashboard/page.tsx (Server Component)
import { flag, flags } from "flagpost/next";
import { fp } from "@/lib/flags";

export default async function Dashboard() {
  const darkMode = await flag(fp, "darkMode");
  const allFlags = await flags(fp);

  return (
    <div className={darkMode ? "dark" : ""}>
      <p>Max items: {allFlags.maxItems}</p>
    </div>
  )

Tags

ai-codingmcpnextjstypescript

Reviews

Loading reviews...

Quality Signals

0
Installs
Last updated22 days ago
Security: AREADME

Safety

Risk Levelmedium
Data Access
read
Network Accessnone

Details

Sourcegithub-crawl
Last commit3/27/2026
View on GitHub→

Embed Badge

[![Loaditout](https://loaditout.ai/api/badge/sathergate/flagpost)](https://loaditout.ai/skills/sathergate/flagpost)