Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat: add pump-fun skill with tool handlers and manifest configuration

nirholaseb1bbf48afa7
diff --git a/examples/skills/pump-fun/SKILL.md b/examples/skills/pump-fun/SKILL.md
new file mode 100644
index 000000000..bd584216b
--- /dev/null
+++ b/examples/skills/pump-fun/SKILL.md
@@ -0,0 +1,47 @@
+# pump-fun
+
+Read-only Solana market intel for three.ws agents. Proxies the
+[pump-fun-workers](https://github.com/nirholas/pump-fun-workers) MCP server
+(Cloudflare Worker) so any agent can search, inspect, and rug-check pump.fun
+tokens during conversation.
+
+## Tools
+
+| Tool | Use it for |
+|---|---|
+| `searchTokens` | Find a token by name, symbol, or mint |
+| `getTokenDetails` | Full metadata for a mint |
+| `getBondingCurve` | Reserves, price, graduation % |
+| `getTokenTrades` | Recent buy/sell history |
+| `getTrendingTokens` | Top by market cap |
+| `getNewTokens` | Most recent launches |
+| `getGraduatedTokens` | Tokens that hit Raydium |
+| `getKingOfTheHill` | Highest mcap still on the curve |
+| `getCreatorProfile` | Creator's tokens + rug flags |
+| `getTokenHolders` | Top holders + concentration |
+
+All tools are read-only. No wallet keys are required or accepted.
+
+## Endpoint
+
+Defaults to `https://pump-fun-sdk.modelcontextprotocol.name/mcp`. Override per
+install via `manifest.config.endpoint` to point at a self-hosted Worker.
+
+## Install
+
+Reference the bundle from your agent manifest:
+
+```json
+{
+ "skills": [
+ { "uri": "https://cdn.three.ws/skills/pump-fun/" }
+ ]
+}
+```
+
+## Suggested instructions
+
+> When the user mentions a token name, symbol, or mint address, call
+> `searchTokens` first, then `getBondingCurve` and `getTokenHolders` before
+> giving an opinion. Always check `getCreatorProfile` for rug flags before
+> recommending a buy.
diff --git a/examples/skills/pump-fun/handlers.js b/examples/skills/pump-fun/handlers.js
new file mode 100644
index 000000000..749b5288d
--- /dev/null
+++ b/examples/skills/pump-fun/handlers.js
@@ -0,0 +1,53 @@
+// pump-fun skill — proxies tool calls to the pump-fun-workers MCP server.
+// https://github.com/nirholas/pump-fun-workers
+
+const DEFAULT_ENDPOINT = 'https://pump-fun-sdk.modelcontextprotocol.name/mcp';
+
+let _rpcId = 0;
+
+async function callMcp(endpoint, name, args, ctx) {
+ const fetchImpl = ctx?.fetch ?? globalThis.fetch;
+ const res = await fetchImpl(endpoint, {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({
+ jsonrpc: '2.0',
+ id: ++_rpcId,
+ method: 'tools/call',
+ params: { name, arguments: args ?? {} },
+ }),
+ });
+
+ if (!res.ok) throw new Error(`pump-fun MCP HTTP ${res.status}`);
+ const body = await res.json();
+ if (body.error) throw new Error(body.error.message ?? 'pump-fun MCP error');
+
+ const content = body.result?.content ?? [];
+ const text = content.find((c) => c.type === 'text')?.text;
+ if (!text) return body.result;
+ try {
+ return JSON.parse(text);
+ } catch {
+ return text;
+ }
+}
+
+function makeHandler(toolName) {
+ return async (args, ctx) => {
+ const endpoint = ctx?.skillConfig?.endpoint ?? DEFAULT_ENDPOINT;
+ const data = await callMcp(endpoint, toolName, args, ctx);
+ ctx?.memory?.note?.(`pump-fun:${toolName}`, { args });
+ return { ok: true, data };
+ };
+}
+
+export const searchTokens = makeHandler('searchTokens');
+export const getTokenDetails = makeHandler('getTokenDetails');
+export const getBondingCurve = makeHandler('getBondingCurve');
+export const getTokenTrades = makeHandler('getTokenTrades');
+export const getTrendingTokens = makeHandler('getTrendingTokens');
+export const getNewTokens = makeHandler('getNewTokens');
+export const getGraduatedTokens = makeHandler('getGraduatedTokens');
+export const getKingOfTheHill = makeHandler('getKingOfTheHill');
+export const getCreatorProfile = makeHandler('getCreatorProfile');
+export const getTokenHolders = makeHandler('getTokenHolders');
diff --git a/examples/skills/pump-fun/manifest.json b/examples/skills/pump-fun/manifest.json
new file mode 100644
index 000000000..343c93f9d
--- /dev/null
+++ b/examples/skills/pump-fun/manifest.json
@@ -0,0 +1,30 @@
+{
+ "spec": "skill/0.1",
+ "name": "pump-fun",
+ "version": "0.1.0",
+ "description": "Read-only pump.fun (Solana) market intel: search tokens, inspect bonding curves, surface trending/new/graduated tokens, and flag rug-pull risk.",
+ "license": "MIT",
+ "tags": ["solana", "pump.fun", "market-data", "mcp"],
+ "requires": {
+ "runtime": ">=0.1.0",
+ "tools": []
+ },
+ "provides": {
+ "tools": [
+ "searchTokens",
+ "getTokenDetails",
+ "getBondingCurve",
+ "getTokenTrades",
+ "getTrendingTokens",
+ "getNewTokens",
+ "getGraduatedTokens",
+ "getKingOfTheHill",
+ "getCreatorProfile",
+ "getTokenHolders"
+ ],
+ "triggers": ["token_lookup", "market_check", "rug_check"]
+ },
+ "config": {
+ "endpoint": "https://pump-fun-sdk.modelcontextprotocol.name/mcp"
+ }
+}
diff --git a/examples/skills/pump-fun/tools.json b/examples/skills/pump-fun/tools.json
new file mode 100644
index 000000000..3f006b749
--- /dev/null
+++ b/examples/skills/pump-fun/tools.json
@@ -0,0 +1,102 @@
+{
+ "tools": [
+ {
+ "name": "searchTokens",
+ "description": "Search pump.fun tokens by name, symbol, or mint address.",
+ "input_schema": {
+ "type": "object",
+ "properties": {
+ "query": { "type": "string" },
+ "limit": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
+ },
+ "required": ["query"]
+ }
+ },
+ {
+ "name": "getTokenDetails",
+ "description": "Full details for a specific pump.fun token by mint address.",
+ "input_schema": {
+ "type": "object",
+ "properties": { "mint": { "type": "string" } },
+ "required": ["mint"]
+ }
+ },
+ {
+ "name": "getBondingCurve",
+ "description": "Bonding curve analysis: reserves, current price, and graduation progress.",
+ "input_schema": {
+ "type": "object",
+ "properties": { "mint": { "type": "string" } },
+ "required": ["mint"]
+ }
+ },
+ {
+ "name": "getTokenTrades",
+ "description": "Recent trade history (buys & sells) for a token.",
+ "input_schema": {
+ "type": "object",
+ "properties": {
+ "mint": { "type": "string" },
+ "limit": { "type": "integer", "minimum": 1, "maximum": 200, "default": 50 }
+ },
+ "required": ["mint"]
+ }
+ },
+ {
+ "name": "getTrendingTokens",
+ "description": "Top pump.fun tokens by market cap.",
+ "input_schema": {
+ "type": "object",
+ "properties": {
+ "limit": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
+ }
+ }
+ },
+ {
+ "name": "getNewTokens",
+ "description": "Most recently launched pump.fun tokens.",
+ "input_schema": {
+ "type": "object",
+ "properties": {
+ "limit": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
+ }
+ }
+ },
+ {
+ "name": "getGraduatedTokens",
+ "description": "Tokens that have graduated from the bonding curve to Raydium AMM.",
+ "input_schema": {
+ "type": "object",
+ "properties": {
+ "limit": { "type": "integer", "minimum": 1, "maximum": 50, "default": 10 }
+ }
+ }
+ },
+ {
+ "name": "getKingOfTheHill",
+ "description": "Highest-market-cap token still on the bonding curve.",
+ "input_schema": { "type": "object", "properties": {} }
+ },
+ {
+ "name": "getCreatorProfile",
+ "description": "All tokens by a creator wallet, with rug-pull risk flags.",
+ "input_schema": {
+ "type": "object",
+ "properties": { "creator": { "type": "string" } },
+ "required": ["creator"]
+ }
+ },
+ {
+ "name": "getTokenHolders",
+ "description": "Top holders of a token with concentration analysis.",
+ "input_schema": {
+ "type": "object",
+ "properties": {
+ "mint": { "type": "string" },
+ "limit": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }
+ },
+ "required": ["mint"]
+ }
+ }
+ ]
+}
diff --git a/scripts/sas-bootstrap.js b/scripts/sas-bootstrap.js
new file mode 100644
index 000000000..5dc363669
--- /dev/null
+++ b/scripts/sas-bootstrap.js
@@ -0,0 +1,142 @@
+#!/usr/bin/env node
+/**
+ * One-time bootstrap: register the three.ws credential + schemas on Solana
+ * Attestation Service (SAS). Idempotent — safe to re-run; existing accounts
+ * are left untouched.
+ *
+ * Usage:
+ * SAS_AUTHORITY_SECRET=<base58 secret key> \
+ * node scripts/sas-bootstrap.js devnet
+ *
+ * The authority secret is the keypair that:
+ * - Pays for credential + schema rent
+ * - Owns the credential (can later authorize additional signers via
+ * changeAuthorizedSigners)
+ * - Signs every attestation issued under these schemas
+ *
+ * On success, sdk/src/sas-config.json is updated with the derived PDAs.
+ *
+ * Funding: the authority wallet needs ~0.05 SOL on the target cluster to cover
+ * one credential + N schemas. Use https://faucet.solana.com for devnet.
+ */
+
+import fs from 'node:fs';
+import path from 'node:path';
+import { fileURLToPath } from 'node:url';
+import bs58 from 'bs58';
+import {
+ createSolanaRpc, createSolanaRpcSubscriptions, createKeyPairSignerFromBytes,
+ address, lamports, pipe, createTransactionMessage, setTransactionMessageFeePayerSigner,
+ setTransactionMessageLifetimeUsingBlockhash, appendTransactionMessageInstructions,
+ signTransactionMessageWithSigners, getSignatureFromTransaction,
+ sendAndConfirmTransactionFactory,
+} from '@solana/kit';
+import {
+ deriveCredentialPda, deriveSchemaPda,
+ getCreateCredentialInstruction, getCreateSchemaInstruction,
+ fetchMaybeCredential, fetchMaybeSchema,
+} from 'sas-lib';
+
+const __dirname = path.dirname(fileURLToPath(import.meta.url));
+const CONFIG_PATH = path.join(__dirname, '..', 'sdk', 'src', 'sas-config.json');
+
+const NETWORK = process.argv[2] || 'devnet';
+if (!['devnet', 'mainnet'].includes(NETWORK)) {
+ console.error('usage: node scripts/sas-bootstrap.js <devnet|mainnet>');
+ process.exit(1);
+}
+
+const SECRET = process.env.SAS_AUTHORITY_SECRET;
+if (!SECRET) {
+ console.error('SAS_AUTHORITY_SECRET (base58) required');
+ process.exit(1);
+}
+
+const RPC_URL = NETWORK === 'mainnet'
+ ? (process.env.SOLANA_RPC_URL || 'https://api.mainnet-beta.solana.com')
+ : (process.env.SOLANA_RPC_URL_DEVNET || 'https://api.devnet.solana.com');
+const WSS_URL = RPC_URL.replace(/^http/, 'ws');
+
+const config = JSON.parse(fs.readFileSync(CONFIG_PATH, 'utf8'));
+
+(async () => {
+ const rpc = createSolanaRpc(RPC_URL);
+ const rpcSubs = createSolanaRpcSubscriptions(WSS_URL);
+ const send = sendAndConfirmTransactionFactory({ rpc, rpcSubscriptions: rpcSubs });
+ const authority = await createKeyPairSignerFromBytes(bs58.decode(SECRET));
+
+ console.log('network :', NETWORK);
+ console.log('authority:', authority.address);
+
+ // ── Credential ────────────────────────────────────────────────────────────
+ const [credentialPda] = await deriveCredentialPda({
+ authority: authority.address,
+ name: config.credentialName,
+ });
+ console.log('credential PDA:', credentialPda);
+
+ const existingCred = await fetchMaybeCredential(rpc, credentialPda);
+ if (!existingCred.exists) {
+ await sendIx(rpc, send, authority, getCreateCredentialInstruction({
+ payer: authority,
+ credential: credentialPda,
+ authority,
+ name: config.credentialName,
+ signers: [authority.address],
+ }));
+ console.log(' created');
+ } else {
+ console.log(' already exists, skipping');
+ }
+
+ // ── Schemas ───────────────────────────────────────────────────────────────
+ const out = { credential: credentialPda, schemas: {} };
+ for (const [kind, def] of Object.entries(config.schemas)) {
+ const [schemaPda] = await deriveSchemaPda({
+ credential: address(credentialPda),
+ name: def.name,
+ version: def.version,
+ });
+ console.log(`schema ${kind} PDA:`, schemaPda);
+
+ const existingSchema = await fetchMaybeSchema(rpc, schemaPda);
+ if (!existingSchema.exists) {
+ await sendIx(rpc, send, authority, getCreateSchemaInstruction({
+ payer: authority,
+ authority,
+ credential: credentialPda,
+ schema: schemaPda,
+ name: def.name,
+ description: def.description,
+ layout: Uint8Array.from(def.layout),
+ fieldNames: def.fieldNames,
+ }));
+ console.log(' created');
+ } else {
+ console.log(' already exists, skipping');
+ }
+ out.schemas[kind] = schemaPda;
+ }
+
+ // ── Persist PDAs ──────────────────────────────────────────────────────────
+ config.pdas[NETWORK] = out;
+ fs.writeFileSync(CONFIG_PATH, JSON.stringify(config, null, '\t') + '\n');
+ console.log('\n✓ wrote', CONFIG_PATH);
+ console.log('\nNext: set SAS_AUTHORITY_SECRET on Vercel and deploy.');
+})().catch((e) => {
+ console.error('\n✗ bootstrap failed:', e);
+ process.exit(1);
+});
+
+async function sendIx(rpc, send, payer, ix) {
+ const { value: latestBlockhash } = await rpc.getLatestBlockhash().send();
+ const msg = pipe(
+ createTransactionMessage({ version: 0 }),
+ (m) => setTransactionMessageFeePayerSigner(payer, m),
+ (m) => setTransactionMessageLifetimeUsingBlockhash(latestBlockhash, m),
+ (m) => appendTransactionMessageInstructions([ix], m),
+ );
+ const signed = await signTransactionMessageWithSigners(msg);
+ await send(signed, { commitment: 'confirmed' });
+ return getSignatureFromTransaction(signed);
+}
diff --git a/sdk/src/sas-config.json b/sdk/src/sas-config.json
new file mode 100644
index 000000000..fb0b91310
--- /dev/null
+++ b/sdk/src/sas-config.json
@@ -0,0 +1,33 @@
+{
+ "_comment": "SAS credential + schema PDAs for three.ws. Populated by `node scripts/sas-bootstrap.js <network>`. Do not edit by hand — re-run bootstrap to refresh.",
+ "credentialName": "threews",
+ "schemas": {
+ "threews.verified-client.v1": {
+ "name": "verified-client",
+ "version": 1,
+ "description": "Wallet has been verified by three.ws (KYC, payment history, or trusted introduction). Subject = client wallet pubkey (nonce). Used to weight feedback attestations.",
+ "layout": [12, 12],
+ "fieldNames": ["method", "reference"],
+ "_doc": {
+ "method": "string — verification method, e.g. 'kyc-tier-1', 'payment-history', 'partner:auditor-x'",
+ "reference": "string — opaque reference id (off-chain record)"
+ }
+ },
+ "threews.audited-validation.v1": {
+ "name": "audited-validation",
+ "version": 1,
+ "description": "Validation of an agent task result, issued by an authorized validator. Subject = agent asset pubkey (nonce). Carries higher weight than self-attested validations.",
+ "layout": [12, 10, 12],
+ "fieldNames": ["task_hash", "passed", "report_uri"],
+ "_doc": {
+ "task_hash": "string — hash of the task input/output bundle",
+ "passed": "bool — whether the validator considers the work acceptable",
+ "report_uri": "string — link to the validator's full report (Arweave/IPFS/HTTPS)"
+ }
+ }
+ },
+ "pdas": {
+ "devnet": { "credential": null, "schemas": {} },
+ "mainnet": { "credential": null, "schemas": {} }
+ }
+}