mcp-client

A guide and example for connecting a custom AI agent directly to CEL through MCP, a standard tool-calling interface.

In plain words
What is it for?
Building or debugging a framework-independent MCP client in languages such as Node.js or Python, using CEL's see, act, perceive, and think tools.
Why use it?
It helps developers use CEL without depending on a particular agent framework or writing custom integration code for each framework.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dimpagk92/cellar/mcp-client
Clone the repo
git clone --depth 1 https://github.com/dimpagk92/cellar
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,780 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01780
Opus 5 $0.00000 $0.00890
Sonnet 5 $0.00000 $0.00356
Haiku 4.5 $0.00000 $0.00178

Measured 2d ago against content hash 44a6bfcb948f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-client scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/mcp-client.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Driving CEL from a Raw MCP Client

This page shows how to drive CEL from a framework-less MCP client using the standard MCP SDKs.

Read docs/adapters-cel-agents.md first if you haven't.

Purpose

This is the reference integration. It proves the claim that CEL is agent-agnostic: any MCP-speaking process can drive CEL with no bespoke glue. Use this page when:

  • You are writing a custom agent and want to call CEL tools directly.
  • You are debugging whether a problem is in your agent framework or in CEL.
  • You want a minimal, copy-pasteable example for a new language binding.
  • You are bringing up a framework that is not in the cookbook set (Gemini CLI, GPT custom tool callers, bespoke in-house runtimes, etc.).

In this setup:

  • Your code owns the LLM, the loop, and the stop condition.
  • CEL provides cel_see, cel_act, cel_perceive, cel_think over stdio MCP. cel_act returns receipts.
  • You call tools using the standard MCP client API for your language.

Setup

1. Build CEL

cd /path/to/cellar
pnpm install && pnpm -r build

2. Install an MCP SDK

Node.js:

pnpm add @modelcontextprotocol/sdk

Python:

pip install mcp

3. Grant macOS Accessibility permission

The process that spawns CEL (your script) will need Accessibility permission in System Settings → Privacy & Security → Accessibility. Easiest is to grant it to the terminal / Node / Python binary used to run your script.

Minimal Example (Node.js, ~40 lines)

A minimal client that spawns CEL, lists tools, and executes one task: open Numbers, write "BTC" into A1, read it back.

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

const transport = new StdioClientTransport({
  command: "node",
  args: ["/absolute/path/to/cellar/mcp-server/dist/index.js"],
});

const client = new Client({ name: "cel-reference-client", version: "0.1.0" }, { capabilities: {} });
await client.connect(transport);

// 1. Confirm CEL's tools are exposed.
const tools = await client.listTools();
console.log("CEL tools:", tools.tools.map((t) => t.name));
// → cel_see, cel_act, cel_perceive, cel_think

// 2. See the current screen.
const ctx = await client.callTool({
  name: "cel_see",
  arguments: { mode: "context" },
});
console.log("Elements:", JSON.parse(ctx.content[0].text).elements.length);

// 3. Write a value into Numbers A1 via the Numbers adapter.
const write = await client.callTool({
  name: "cel_act",
  arguments: {
    action: "write_cells",
    app: "Numbers",
    writes: [{ cell_ref: "A1", value: "BTC" }],
    verify: true,
  },
});
const writePayload = JSON.parse(write.content[0].text);
console.log("write receipt:", writePayload.receipt.id, writePayload.receipt.dispatch_path);

// 4. Read it back deterministically.
const read = await client.callTool({
  name: "cel_act",
  arguments: { action: "read_cells", app: "Numbers", cell_refs: ["A1"] },
});
const readPayload = JSON.parse(read.content[0].text);
console.log("A1 =", readPayload.result);

await client.close();

Read the full file on GitHub · 185 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 185 lines · 0 tokens per session scan A 44a6bfcb948f

Subscribe to this mod's changes

mcp-client is an agent published in the GitHub repository dimpagk92/cellar (4 stars, last pushed 22d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,780 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.