SDKs & client libraries
An MCP server for Claude, Cursor and anything else that speaks MCP, plus official Node.js and Python SDKs on npm and PyPI. The SDKs wrap the REST endpoints and both WebSocket channels behind the same shape. MIT licensed, source on GitHub. If you'd rather roll your own, the raw-HTTP snippets further down show what a working wrapper looks like in about 50 lines.
MCP (Claude, Cursor, any MCP host)
Remote, nothing to install: point your host at https://api.cookin.fun/mcp. Pay a tool call with the x_payment argument or a Pro key in the Authorization header. Or run it locally:
@cookinfun/mcp on
npm
· source on
GitHub.
Eight tools, no code to write: token scan, trades, the four lists, wallet profile, deployer history.
Pay per call with x402 by setting SOLANA_KEY, or use a Pro key with COOKIN_API_KEY.
// claude_desktop_config.json, or .cursor/mcp.json
{
"mcpServers": {
"cookin": {
"command": "npx",
"args": ["-y", "@cookinfun/mcp"],
"env": { "SOLANA_KEY": "<base58 Solana keypair holding USDC>" }
}
}
}
The server runs on your machine and signs payments there. Only a signed transaction leaves it, never the key.
Node.js
cookin-fun on
npm
· source on
GitHub.
npm install cookin-fun
import { Cookin } from 'cookin-fun';
const cookin = new Cookin({ apiKey: process.env.COOKIN_API_KEY! });
// REST
const { data } = await cookin.tokens.get(mint);
console.log(data.score?.value, data.holders?.count);
// WebSocket
const socket = cookin.connect();
socket.onFrames((frame) => {
for (const trade of frame.trades) {
console.log(trade.signature, trade.sol_amount);
}
});
Python
cookin-fun on
PyPI
· source on
GitHub.
pip install cookin-fun
import os
from cookin_fun import Cookin
cookin = Cookin(api_key=os.environ["COOKIN_API_KEY"])
# REST
snap = cookin.tokens.get(mint)
print(snap["data"]["score"]["value"], snap["data"]["holders"]["count"])
# WebSocket
def on_frame(frame):
for trade in frame["trades"]:
print(trade["signature"], trade["sol_amount"])
with cookin.connect() as socket:
socket.on_frames(on_frame)
socket.run_forever()
curl
{"# Every REST call\ncurl -sS -H \"Authorization: Bearer $API_KEY\" \\\n https://api.cookin.fun/v1/tokens/new"}
Raw HTTP
If you don't want the SDK, both languages can drive the API in about 30 lines with only the standard library.
Node.js (fetch)
{"const API_KEY = process.env.API_KEY;\n\nasync function fetchApi(path) {\n const res = await fetch(`https://api.cookin.fun${path}`, {\n headers: { \"Authorization\": `Bearer ${API_KEY}` },\n });\n if (!res.ok) throw new Error(`API ${res.status}: ${await res.text()}`);\n return res.json();\n}\n\nconst { data } = await fetchApi(\"/v1/tokens/new\");\nconsole.log(data);"}
Python (requests)
{"import os, requests\n\nAPI_KEY = os.environ[\"API_KEY\"]\nSESSION = requests.Session()\nSESSION.headers.update({\"Authorization\": f\"Bearer {API_KEY}\"})\n\ndef fetch_api(path):\n r = SESSION.get(f\"https://api.cookin.fun{path}\")\n r.raise_for_status()\n return r.json()\n\nresponse = fetch_api(\"/v1/tokens/new\")\nprint(response[\"data\"])"}
WebSocket without the SDK
Terminal, Node.js, and Python examples that drive the Phoenix Channels v2 wire protocol directly live on the tokens:live and frames:live pages.
Community wrappers
Building a wrapper for Go, Rust, or something we're missing? Come tell us in Discord and we'll link it here.