Skip to content

Genkit

Firebase Genkit is Google's open-source framework for building AI-powered applications in TypeScript/JavaScript and Go. It emphasizes type safety, testability, and production readiness. The flow system lets you define complex AI pipelines as debuggable, replayable sequences. An MCP plugin bridges Genkit's type-safe tool system with external MCP servers.


Gk
Genkit
TRANSPORT
Streamable HTTP ✓
PLATFORM
TypeScript · Go · Framework
MCP VIA
MCP Plugin

Type-Safe AI Flows with MCP Tools

Genkit's strength is bringing software engineering rigor to AI development. Tools have Zod schemas that are validated at compile time and runtime. Flows are debuggable with a built-in developer UI that lets you step through each action, inspect inputs/outputs, and replay with different parameters.

The MCP plugin imports external tools and wraps them in Genkit's type-safe system. MCP tool schemas map to Zod types, so you get the same validation and IntelliSense for external tools as for locally defined ones.

Notable features:

  • Type-safe tools — Zod schemas for tool inputs and outputs
  • Flow system — composable, debuggable AI pipelines
  • Dotprompt — template-based prompt management with variables and conditionals
  • Developer UI — step-through debugging for flows and agent runs
  • Firebase integration — deploy to Cloud Functions, use Firestore for state
  • Multi-model — Gemini, GPT, Claude, Ollama, and custom providers
  • Go support — first-class Go SDK alongside TypeScript

MCP Plugin Setup

1. Create a Token

In Vinkius Cloud, go to your server → Connection TokensCreate. Copy the URL.

2. Install and Configure

typescript
import { genkit } from 'genkit';
import { mcpPlugin } from 'genkitx-mcp';

const ai = genkit({
  plugins: [
    mcpPlugin({
      servers: {
        vinkius: { url: 'https://edge.vinkius.com/{TOKEN}/mcp' },
      },
    }),
  ],
});

3. Use in Flows

MCP tools are available in Genkit flows and agent definitions with full type safety.


FAQ

Does the MCP plugin preserve type safety? Yes. MCP tool schemas are converted to Zod types. You get compile-time validation and IntelliSense for all MCP tool parameters.

Can I debug MCP tool calls in Genkit Developer UI? Yes. MCP tool invocations appear as steps in the flow debugger. You can inspect inputs, outputs, and timing.

Does Genkit work with Firebase? Yes. Deploy flows to Cloud Functions, use Firestore for state management, and leverage Firebase Auth for user authentication.

Is Genkit free? Open-source under Apache 2.0. Firebase services have their own pricing.