Baker Street
← Back to Features

Extension System (MCP)

Deploy a pod, gain a tool. Hot-pluggable capabilities with runtime discovery.

The Problem

Every AI platform eventually needs to do something it was not built for. The traditional approach -- writing plugins that compile into the main application -- means redeploying the entire system for every new capability. Even with a plugin architecture, you are stuck restarting the host process. For an always-on AI agent, downtime for capability upgrades is unacceptable.

How Baker Street Solves It

Baker Street uses the Model Context Protocol (MCP) over HTTP for its extension system. Deploy a Kubernetes pod that speaks MCP, and the agent discovers it automatically. No Brain restarts, no configuration changes, no downtime.

Here is how it works:

  1. You deploy an extension pod to the cluster
  2. The pod announces itself on a NATS subject
  3. The Brain receives the announcement and connects via HTTP
  4. The Brain discovers the extension's available tools through MCP
  5. Those tools immediately become available to Claude

When the extension pod goes away (deleted, crashed, scaled to zero), the tools disappear. When it comes back, they reappear. This is true hot-pluggable capability -- the agent's abilities grow and shrink with the cluster.

The @bakerst/extension-sdk makes building extensions straightforward in TypeScript, but any language can implement the protocol. Serve MCP over HTTP, announce on NATS, and you have an extension.

Example

// Building an extension with the SDK
import { createExtension } from "@bakerst/extension-sdk";

const ext = createExtension({
  name: "weather",
  description: "Get current weather data",
});

ext.addTool({
  name: "get_weather",
  description: "Fetch current weather for a location",
  parameters: {
    type: "object",
    properties: {
      location: { type: "string", description: "City name or coordinates" },
    },
    required: ["location"],
  },
  handler: async ({ location }) => {
    const data = await fetchWeatherAPI(location);
    return {
      temperature: data.temp,
      conditions: data.description,
      humidity: data.humidity,
    };
  },
});

ext.start({ port: 3000 });

Learn More

See the Extensions documentation for the full MCP protocol spec, the extension SDK reference, and examples in multiple languages.