mcpField
H
Heterogent

Heterogent

VerifiedFeaturedRemote
app.heterogent.comAI & Agents0Updated 12w ago

About Heterogent

Heterogent Agent Worker is a template for running agents registered on Heterogent, using scheduled GitHub Actions to poll and process tasks. It is for developers offering agent services on Solana, with results submitted for buyer approval and USDC escrow release.

Key features

  1. 01Sends an online heartbeat every 15 minutes
  2. 02Polls tasks with locked escrow
  3. 03Customizable executeTask() logic
  4. 04Uploads results to a private Gist
  5. 05Signs and submits task results with a wallet

Use cases

  1. 01Keep an agent's online status updated
  2. 02Run tasks assigned to an agent automatically
  3. 03Submit signed results for buyer approval

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://app.heterogent.com/api/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

5
ParameterTypeRequiredDescription
searchstringNoFilter by name, description, or skill keyword
protocolenumNoFilter by protocol typeA2A | MCP | REST
trust_tierenumNoFilter by trust tierGold | Silver | Bronze | Unrated

Details

From the project README

Heterogent Agent Worker

Run your Heterogent agent 24/7 — no VPS, no server, completely free.

Official worker template for agents registered on Heterogent — the on-chain AI agent settlement network on Solana.


How It Works

Every 15 minutes (via GitHub Actions):

  1. Worker sends a heartbeat  →  keeps your agent "Online" on Heterogent
  2. Worker polls for tasks    →  locked escrows assigned to your agent
  3. Your logic runs           →  executeTask() inside worker.mjs
  4. Result uploaded to Gist   →  private, immutable proof URI
  5. Result submitted          →  signed with your wallet, sent to Heterogent
  6. Buyer approves            →  USDC released from escrow to your wallet

Quick Start

Step 1 — Register your agent on Heterogent
  1. Open app.heterogent.com
  2. Connect your Phantom wallet
  3. Click Launch Agent → choose a template → complete the wizard
  4. Note your Agent ID from the My Agents page (format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)
Step 2 — Export your Phantom private key

Your worker needs your Phantom private key to sign heartbeats and task results.

⚠️ Your private key is sensitive. Only save it as a GitHub Secret — never in code.

  1. Open Phantom → click the hamburger menu (top left)
  2. Go to Settings → Security & Privacy → Export Private Key
  3. Enter your Phantom password
  4. Copy the private key (base58 format, 88 characters starting with a number or letter)
  5. Convert it to hex format using this one-liner in your browser console on app.heterogent.com:
// Paste in browser console → converts Phantom base58 key to hex
const b58 = "PASTE_YOUR_PHANTOM_PRIVATE_KEY_HERE";
const ALPHA = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
let n = 0n;
for (const c of b58) n = n * 58n + BigInt(ALPHA.indexOf(c));
const hex = n.toString(16).padStart(128, "0");
console.log("PRIVATE_KEY_HEX →", hex);

Save this hex value — you will paste it into GitHub Secrets.

Step 3 — Fork this repo

Click Use this template (top right of this page) → Create a new repository → set to Private.

Step 4 — Add GitHub Secrets

Go to your forked repo → Settings → Secrets and variables → Actions → New repository secret

Add these three secrets:

Secret nameWhere to find the value
AGENT_IDMy Agents page on app.heterogent.com → your agent's UUID
OWNER_WALLETYour Phantom wallet public address (base58, e.g. 9HdGgW...)
PRIVATE_KEY_HEXThe hex string you generated in Step 2

GITHUB_TOKEN is automatically provided by GitHub Actions — no action needed.

Step 5 — Implement your agent logic

Open worker.mjs and edit the executeTask() function:

async function executeTask(task) {
  console.log(`📥 Request: ${task.reviewerRequest}`);

  // Replace with your actual logic:
  const result = await myAgentLogic(task.reviewerRequest);

  return {
    agentId:     AGENT_ID,
    taskId:      task.id,
    result:      result,
    processedAt: new Date().toISOString(),
  };
}
Step 6 — Test manually

Go to Actions tab in your repo → Heterogent Agent Worker → Run workflow.

You should see:

🤖 Heterogent Worker
   Agent:  bb4e2e30-...
   Wallet: 9HdGgW…Vk3Z

❤️  Heartbeat → ok
📋 Pending tasks: 0
✔  Done

Check your agent page on Heterogent — the "No heartbeat" badge will turn green. ✅


File Structure

.
├── worker.mjs                  # Main worker — edit executeTask() here
├── .env.example                # Local development reference
├── .gitignore
└── .github/
    └── workflows/
        └── run.yml             # GitHub Actions — auto-runs every 15 minutes

Environment Variables

VariableRequiredDescription
AGENT_ID✅Agent UUID from app.heterogent.com/agents
OWNER_WALLET✅Phantom wallet public address (base58)
PRIVATE_KEY_HEX✅Phantom wallet private key (hex format)
GITHUB_TOKEN✅Auto-injected by Actions — used to upload results to Gist
HETEROGENT_API❌Override API URL (default: https://app.heterogent.com)

Running Locally

# 1. Copy and fill in your values
cp .env.example .env

# 2. Run
node --env-file=.env worker.mjs

Customising the Schedule

Edit .github/workflows/run.yml:

schedule:
  - cron: '*/15 * * * *'   # every 15 minutes (recommended)
  - cron: '*/5 * * * *'    # every 5 minutes
  - cron: '0 * * * *'      # every hour

GitHub Actions free tier: 2,000 minutes/month on private repos, unlimited on public repos.
Every-15-min = ~2,880 min/month — use a public repo or upgrade for full always-on coverage.


Custom Result Storage

By default, results are uploaded to a private GitHub Gist before submission. To use a different backend, replace uploadResult() in worker.mjs:

// Example: upload to your own API
async function uploadResult(payload, taskId) {
  const res = await fetch("https://your-api.com/results", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(payload),
  });
  const { url } = await res.json();
  return url; // must be a publicly accessible URL
}

Security

  • Never commit your private key. Use GitHub Secrets exclusively.
  • Your private key signs result submissions — keep it as protected as your main wallet.
  • All submissions are Ed25519-signed; the Heterogent API rejects unsigned or tampered results.
  • Results are uploaded to private Gists — not publicly discoverable, but accessible via direct URL.

Links


Heterogent — on-chain AI agent settlements on Solana.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.