Lightweight plugin library

Add caching and observability in minutes.

Thin, dependency-free SDKs wrap LLM and MCP clients to deliver edge caching, request telemetry, and policy controls with TypeScript-first ergonomics.

Start with your client

Install the package, then wrap your workflow

Terminal
$npm install @alchymos/openai

Connect your client

OpenAI SDK or MCP client/server

01

Instrument the workflow

Capture request and response activity

02

Add caching and controls

Configure behavior for your use case

03

SDKs for OpenAI, MCP clients and servers that provide automatic caching, request/response instrumentation, scoped privacy, and programmatic purge APIs with TypeScript-first ergonomics.

Quick integrations

Works with the clients you already use.

Add instrumentation to OpenAI and MCP workflows while keeping familiar APIs.

OpenAI

Drop-in wrapper that enables cache + telemetry instantly. Works with your existing OpenAI client configuration.

import OpenAI from "openai";
import { Alchymos } from '@alchymos/openai';

const openai = new OpenAI(process.env.OPENAI_API_KEY);
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);

alchymos.withLlm(openai);

MCP Client

Instrument client-side tool calls for caching and metrics. Seamlessly integrates with the Model Context Protocol.

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { Alchymos } from '@alchymos/mcp';

const client = new Client();
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);

alchymos.withClient(client);

MCP Server

Server middleware for edge caching and observability. Add caching capabilities to your tools with one line.

import { Server } from "@modelcontextprotocol/sdk/server/index.js";
import { Alchymos } from '@alchymos/mcp';

const server = new Server();
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);

alchymos.withServer(server);

Developer experience

Full control in TypeScript.

Our SDK is designed for modern TypeScript environments. It includes full type definitions, zero runtime dependencies, and flexible configuration options for granular control.

Zero runtime deps

Keep your bundle size small and fast.

TypeScript first

Full type safety and autocompletion.

Scoped Privacy

Cache scoped to specific orgs or users.

Local Dev Mode

Replay logs locally without hitting API.

example.ts
import OpenAI from "openai";
import { Alchymos } from '@alchymos/openai';

const openai = new OpenAI(process.env.OPENAI_API_KEY);
const alchymos = new Alchymos(process.env.ALCHYMOS_API_KEY);

alchymos.withLlm(openai);

const response = await openai.chat.completions.create(params);

Roll out the SDK one workflow at a time

Pick a representative workflow with predictable inputs and an existing way to verify its output. A staging environment gives you room to compare behavior before rollout.

  1. Connect the client that makes the call

    Start with the OpenAI or MCP integration example above. Initialize the integration where your application creates that client and load credentials from server-side environment variables.

  2. Run representative requests

    Compare the same requests before and after the change. Check response shape, application error handling, and the cache behavior you expect for repeated inputs.

  3. Review activity before expanding

    Inspect request latency, errors, and cache outcomes for the first workflow. Carry the integration to another client once you understand the behavior of the first one.

Choose where the integration belongs

Start where your application makes a model or tool call. In a workflow with several services, put the integration where the team can identify the caller and see the request outcome.

Model-backed endpoint

For a server route that generates a reply, attach the integration where the route obtains its OpenAI client. Keep the calling code and its usual response handling in place.

Agent that calls tools

For an MCP workflow, start at the boundary responsible for the calls you want to understand. A client can see which tools the agent asks for, while a tool server can see what happens during execution.

Keep configuration predictable across environments

Make it easy to tell which service, credentials, and settings produced a request. That context helps when a workflow behaves differently in staging and production.

Local and staging

Use environment-specific credentials and representative test data. Exercise an ordinary response, a provider error, and a repeated call before widening the rollout.

Production

Keep client setup in the service that owns the call. Record which workflow was enabled and which settings it uses so the team can interpret changes in latency or errors.

Diagnose common integration problems

Run one known request and follow it from client initialization through the upstream response. This gives you a concrete request to inspect as you narrow down the issue.

A request is missing from telemetry

Check that the code path handling the request uses the client you instrumented. A worker, alternate endpoint, or fallback can create and use a separate instance.

Repeated calls still go upstream

Check whether the inputs and scope match and whether the earlier response was eligible for reuse. Confirm that the repeat happened before the expected expiry.

Frequently asked questions

Browse integration resources
Where should I keep my API keys?

Keep Alchymos and provider keys in your server environment or secret manager. Browser code can call a server endpoint that uses those keys to make the upstream request.

Where should I instrument an MCP workflow?

Choose the client side to observe outbound tool calls or the server side to focus on tool execution. Start at the boundary you control and trace a known request through it.

What should I verify before enabling caching?

Check that each operation’s result is safe to reuse, that its scope reflects the caller’s permissions, and that an expired result can be fetched from the upstream service.