Back to projects

CLI and MCP server · Client · 2026

Sfere CLI & MCP

Sfere is a customer data platform, and this is how people reach it from a terminal or from an AI tool. The CLI, published on npm as @sfere.io/cli, signs in through the browser, builds, tests and deploys event functions, and manages sources, destinations and pipes. Inside it, sfere mcp is an MCP server that lets Claude work in the same account, with the same role, as the person who signed in.

  • TypeScript
  • Node.js
  • MCP
  • OAuth2
  • Zod
  • Docker
  • npm
  • GitHub Actions
  • pnpm
My part
MCP server, CLI rework, releases
When
Nov 2026
MCP tools
14
Status
Published on npm
The real output of sfere --help in a terminal window: login, whoami, accounts, init, build, test, deploy, config and mcp

Overview

The CLI started from an open-source command line under the MIT licence, which I forked and reworked for Sfere: sign-in through the browser instead of an API key, every call through Sfere’s own API, and no workspace to pick, because the API scopes each call to the signed-in account. The MCP server is new. It runs on a shared core I split out of the CLI, so the terminal and the AI tool use the same sessions, API client and checks.

LimitThe command line is a fork of an open-source project, credited in its licence. The MCP server and the shared core are my own work.

My role

I did the fork and the rework, split the core out, wrote the MCP server and its data tools, built the hosted version for Claude’s connectors, now in testing, and set up the releases. The dashboard is a separate case study.

DecisionReleases publish from a version tag through npm trusted publishing, so no npm token is stored anywhere.

What shipped

  • Sign-in from any terminal: the CLI prints a link and a code, you approve in a browser, and the session is kept in a file only you can read and revoked on logout. CI gets a refresh token instead.
  • Functions as a project: sfere init, build, test and deploy, where deploying the same slug updates the function instead of creating a second one.
  • Sources, destinations, pipes, functions, connectors and alert channels, listed, read, created, updated, tested and deleted from the command line.
  • sfere mcp: 14 tools for Claude and other MCP clients, covering the account, its configuration, delivery health, and test-running or deploying a function.
  • Data tools that answer questions about the account’s own events with counts, funnels and retention. Sfere builds and runs every query, so no model writes SQL, and the answers are totals, never individual events.
  • A hosted version over HTTPS for Claude’s custom connectors, now in testing: the person signs in on Sfere’s own page, every request is checked against the sign-in server’s keys, and nothing is kept between requests.

DecisionTools that change something are marked as such, so the AI client asks the person before it runs them.

Worth a closer look

What a tool returns is read by the model, so the server treats every answer as something that could leak. Passwords, tokens, keys and secret link parameters come back as [redacted], delivery logs are cut down to counts and error text, and the data tools never describe, break down or filter by identifiers, personal data or links.

LimitThe secret filter works on field names. A secret stored under an unusual name, or typed into a function’s code, is not caught, and the docs say so.

Screens