Context Chef

data-ai MCP Server

Context compiler for TypeScript/JavaScript AI agents. Automatically compiles agent state into optimized LLM payloads with history compression, tool pruning, multi-provider support, and more.

Verified
data-aidata-aitypescript
4 views21 stars1 forksMIT

Why This Matters

Discovered via agent-topic:ai-agent and last synced 3mo ago.

Verified
Source
agent-topic:ai-agent
Stars
21
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
28
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (28)

Option

Type

onBeforeCompress

`(history, tokenInfo) => Message[] \

compressionModel

`(msgs: Message[]) => Promise<string>`

tokenizer

`(msgs: Message[]) => number`

compress

`{ summary, truncatedCount }`

contextWindow

`number`

Event

Payload

Form

Example

Skill

Description

ITargetAdapter

`compile({ target: new MyAdapter() })`

usagePreference

`'max' \

preserveRecentMessages

`number`

Feature

OpenAI

context-chef-middleware

Integrate `@context-chef/ai-sdk-middleware` — drop-in AI SDK middleware, zero code changes

Package

Description

customCompressionInstructions

`string`

null

Promise<string

onCompress

`(summary, count, details) => void`

attachments

`image_url` / `file` content parts

preserveRatio

`number`

MemoryEntry

Emitted when a memory entry expires during `compile()`

context-chef-core

Integrate `@context-chef/core` — full control over compilation pipeline, multi-provider support

Format

Chat Completions

context-chef-tanstack

Integrate `@context-chef/tanstack-ai` — TanStack AI ChatMiddleware with compression and state injection

Stripped

Mapped to `ThinkingBlockParam`

untouched

Simple agents; you don't rely on cache breakpoints past the system parameter

logger

`ChefLogger`

Placement

Top of sandwich

Works Well With - Skills

referrals

When the user wants to create, optimize, or analyze a referral program, affiliate program, or word-of-mouth strategy. Also use when the user mentions 'referral,' 'affiliate,' 'ambassador,' 'word of mouth,' 'viral loop,' 'refer a friend,' 'partner program,' 'referral incentive,' 'how to get referrals,' 'customers referring customers,' or 'affiliate payout.' Use this whenever someone wants existing users or partners to bring in new customers. For launch-specific virality, see launch.

1104 starsHas guide

social

When the user wants help creating, scheduling, or optimizing social media content for LinkedIn, Twitter/X, Instagram, TikTok, Facebook, or other platforms, or wants to do social listening and engagement triage. Also use when the user mentions 'LinkedIn post,' 'Twitter thread,' 'social media,' 'content calendar,' 'social scheduling,' 'engagement,' 'viral content,' 'what should I post,' 'repurpose this content,' 'tweet ideas,' 'LinkedIn carousel,' 'social media strategy,' 'grow my following,' 'Tik

1104 starsHas guide

revops

When the user wants help with revenue operations, lead lifecycle management, or marketing-to-sales handoff processes. Also use when the user mentions 'RevOps,' 'revenue operations,' 'lead scoring,' 'lead routing,' 'MQL,' 'SQL,' 'pipeline stages,' 'deal desk,' 'CRM automation,' 'marketing-to-sales handoff,' 'data hygiene,' 'leads aren't getting to sales,' 'pipeline management,' 'lead qualification,' or 'when should marketing hand off to sales.' Use this for anything involving the systems and proc

1104 starsHas guide

schema

When the user wants to add, fix, or optimize schema markup and structured data on their site. Also use when the user mentions "schema markup," "structured data," "JSON-LD," "rich snippets," "schema.org," "FAQ schema," "product schema," "review schema," "breadcrumb schema," "Google rich results," "knowledge panel," "star ratings in search," or "add structured data." Use this whenever someone wants their pages to show enhanced results in Google. For broader SEO issues, see seo-audit. For AI search

1104 starsHas guide