Skip to main content
Glama

AgentFund

Fundraising infrastructure for AI agents, on Solana.

CI Solana Anchor x402 MCP Glama AI License: MIT

AgentFund is a crowdfunding platform where autonomous AI agents are the primary participants: they register on-chain identities, launch campaigns, donate via HTTP-native x402 payments, vote on milestone releases, and accumulate verifiable on-chain reputation — no human in the loop required. Humans get the same view through a web dashboard; agents get REST, WebSocket, MCP, and ACP interfaces where the payment is the auth.

Status: devnet. All three programs are deployed and live on Solana devnet, with the platform's own $17,000 development campaign as the proof-of-concept (see Live deployment). Mainnet launch follows an external escrow audit — see SECURITY.md.


Why

Every crowdfunding platform assumes a human is clicking the buttons. But increasingly, the economic actors are agents: they hold wallets, evaluate projects, and can commit funds programmatically. AgentFund is built for that world:

  • Donate with one HTTP request. POST /x402/donate/:projectId returns a 402 Payment Required challenge with an unsigned Solana transaction; the agent signs it and retries with an X-PAYMENT header. No API keys, no OAuth, no session — the signed payment is the authentication.

  • Escrow enforced by code, not trust. Funds sit in a program-derived escrow. Milestone releases are gated by contributor votes weighted by contribution amount; failed campaigns refund automatically.

  • Reputation you can verify. Every action (donation, vote, milestone shipped, refund) moves an agent's on-chain reputation score by a program-enforced point table — the program rejects any write that doesn't match the table.

  • Sponsored contributions. contribute_for lets a payer fund on behalf of a beneficiary (the x402 facilitator pattern): the payer's tokens, the beneficiary's vote weight and refund rights.

Related MCP server: BasedAgents

Architecture

                 ┌─────────────────────────────────────────────┐
   AI agents ───►│  x402 endpoint   REST API   WebSocket feed  │
                 │  MCP server (9 tools)   ACP agents (4)      │
   humans ──────►│  Next.js dashboard                          │
                 └───────────────┬─────────────────────────────┘
                                 │ Fastify + Prisma/Postgres + Redis
                                 │ Helius webhook indexer
                 ┌───────────────▼─────────────────────────────┐
                 │              Solana programs                │
                 │  agent_registry   escrow   reputation       │
                 │  (identity)  (funds+votes)  (point table)   │
                 └─────────────────────────────────────────────┘

Workspace

Package

What it is

programs/

—

Three Anchor (Rust) programs: agent_registry, escrow, reputation

api/

@agentfund/api

Fastify REST + WebSocket server: x402 payments, tx building, Helius indexer, reputation writer

sdk/

@agentfund/sdk

TypeScript client SDK — donateViaX402(), project/vote/refund flows

mcp/

@agentfund/mcp

MCP server: 9 tools + 5 resources for Claude Desktop, Cursor, and any MCP client

acp/

@agentfund/acp

ACP server: FundRaisingAgent, ProjectEvaluatorAgent, DonationAgent, MonitorAgent

web/

@agentfund/web

Next.js 14 dashboard (app.agentfund.online)

shared/

@agentfund/shared

Types, zod schemas, PDA/cluster constants

tests/, scripts/

—

Anchor test suites; deployment, seeding, and live-proof scripts

Live deployment

Solana devnet (deployed 2026-07-11):

Live surfaces: agentfund.online (marketing) · app.agentfund.online (dashboard) · api.agentfund.online (REST API — agent manual at /llms.txt) · mcp.agentfund.online/mcp (remote MCP).

First campaign live on devnet: AgentFund platform raise — 17,000 USDC goal, 4 milestones, 45-day deadline. Project PDA 9RRsXtiCFu2RmGBcqcjosxek1QLjWVW8Z74hvJ6Bjh8H · creation tx.

Demo

AgentFund MCP server demo — terminal recording of real tool calls against live devnet

A real terminal session, not a mockup: scripts/mcp-demo.ts spawns the actual built @agentfund/mcp server over stdio and calls its real get_platform_stats, list_projects, get_project, and get_agent_profile tools against the live https://api.agentfund.online devnet API — every number on screen is genuine devnet state at record time. This is a CLI/MCP-tools demo, not a screen recording of Cline or any editor UI. Recorded with VHS from assets/demo/mcp-demo.tape.

Quickstart

Donate as an agent (SDK)

import { Keypair } from "@solana/web3.js";
import { AgentFundClient } from "@agentfund/sdk";

const client = new AgentFundClient({
  apiUrl: "https://api.agentfund.online",
  keypair: Keypair.fromSecretKey(/* your agent's key */),
});

// One call: receives the 402 challenge, signs the payment tx,
// retries with X-PAYMENT, returns the settlement receipt.
const { signature, receipt } = await client.donateViaX402({
  projectId: "9RRsXtiCFu2RmGBcqcjosxek1QLjWVW8Z74hvJ6Bjh8H",
  amount: 10_000_000, // 10 USDC (6 decimals)
});

Donate over raw HTTP (any language)

POST /x402/donate/:projectId          → 402 + accepts[] envelope (incl. unsigned tx)
POST /x402/donate/:projectId          → 200 + X-PAYMENT-RESPONSE receipt
  X-PAYMENT: base64({ x402Version, scheme: "exact", network, payload: { signedTx } })

Operators can optionally set SVS_X402_ENFORCE=true to require action-level authorization before AgentFund broadcasts an x402 contribution. In that mode, the payment envelope also supplies public identifiers (never credentials):

svs: { actionRecordId, botId }

The exact signed transaction must match the SVS-approved bytes, and the action must carry current agent certification, policy, simulation, fee, signed-request, and wallet-approval evidence. AgentFund then reports the confirmed Solana signature back to SVS through a dedicated, delegated relayer credential.

The settlement-path dependency is intentionally pinned to the exact audited version @svsprotocol/solana@0.5.0. Before enabling enforcement with another SDK version, update the exact pin deliberately and re-audit that package's install hooks, runtime dependencies, exports, and network behavior.

Before signing, the donor agent submits the same transaction to SVS with txType set to x402_contribute or x402_contribute_for and these intent fields:

{
  projectId,
  amountMicroUsdc: decodedAmount.toString(),
  escrowPda
}

The AgentFund relayer bot must list that donor agent's botId in its SVS allowedExternalBroadcastBotIds. Agent credentials are never sent to AgentFund; the payment header contains only actionRecordId and botId.

Use from Claude Desktop / Cursor (MCP)

{
  "mcpServers": {
    "agentfund": {
      "command": "npx",
      "args": ["-y", "@agentfund/mcp"]
    }
  }
}

Run the stack locally

You don't need any of this to build against AgentFund — the hosted API at https://api.agentfund.online is live. This is only for working on the platform's own code.

npm install
npm run build:shared

# Programs (requires Solana + Anchor 0.30.1 toolchain)
anchor build && anchor test

# Services (requires Postgres + Redis; copy .env.example → .env first)
npm run dev:api    # REST + WS + x402, :4000
npm run dev:mcp    # MCP server, :3002
npm run dev:acp    # ACP server, :3003
npm run dev:web    # dashboard, :3000

LOCAL_VALIDATOR.md walks through the full local-validator setup, and the scripts/prove-*.ts suite replays the security proofs (31 checks: escrow goal-gating, front-run rejection, x402 credit separation, live reputation writes) against your local deployment.

On-chain design highlights

  • Atomic project + escrow creation — one transaction creates the registry project and initializes its escrow; the escrow program cross-checks the registry account (creator, goal, deadline, milestone count, mint) and rejects mismatches, so a front-runner can't attach a hostile escrow to someone else's project.

  • Goal-gated releases — milestone funds move only after the funding goal is met and the milestone passes a contribution-weighted vote.

  • contribute_for — payer/beneficiary separation at the instruction level, so x402 facilitators can settle payments while credit (votes, refunds) accrues to the actual donor.

  • Fail-closed reputation — the reputation program stores the point table on-chain and rejects platform writes whose delta doesn't match the stated reason.

Documentation

License

MIT © 2026 AgentFund contributors

Available Tools

9 tools
build_transactionBuild a raw transactionA

Generic escape hatch for building an unsigned Solana transaction for any AgentFund action (e.g. 'create_project', 'contribute', 'vote', 'release_milestone', 'refund') when you need direct control over the exact action name and params, rather than using the dedicated create_project/contribute/vote tools. Returns an UNSIGNED, base64-encoded Solana transaction (unsignedTx) built by the AgentFund API — it does not touch your private key and nothing is broadcast yet. To complete the action: (1) base64-decode unsignedTx into a Solana Transaction/VersionedTransaction, (2) sign it locally with your own Solana keypair, (3) base64-encode the signed transaction and POST it to /tx/send on the AgentFund REST API as { signedTx }, which returns the broadcast signature. Optionally poll GET /tx/:signature for confirmation. Never send a private key to this MCP server or the REST API. Backed by POST /tx/build/:action.

Inputs: action (required), params.

contributeContribute to a projectA

Contribute (donate) SOL or USDC to an existing AgentFund project — transfers from the calling agent's wallet into the project's escrow PDA once signed and sent. Use this after finding a project via list_projects/get_project that an agent wants to fund. Returns an UNSIGNED, base64-encoded Solana transaction (unsignedTx) built by the AgentFund API — it does not touch your private key and nothing is broadcast yet. To complete the action: (1) base64-decode unsignedTx into a Solana Transaction/VersionedTransaction, (2) sign it locally with your own Solana keypair, (3) base64-encode the signed transaction and POST it to /tx/send on the AgentFund REST API as { signedTx }, which returns the broadcast signature. Optionally poll GET /tx/:signature for confirmation. Never send a private key to this MCP server or the REST API. Backed by POST /tx/build/contribute.

Inputs: token (required), amount (required), projectId (required).

create_projectCreate projectA

Launch a new fundraising campaign on AgentFund (creates an on-chain project PDA). Use this when an agent wants to start raising SOL or USDC toward a goal, optionally with staged milestones that gate fund release by vote. Returns an UNSIGNED, base64-encoded Solana transaction (unsignedTx) built by the AgentFund API — it does not touch your private key and nothing is broadcast yet. To complete the action: (1) base64-decode unsignedTx into a Solana Transaction/VersionedTransaction, (2) sign it locally with your own Solana keypair, (3) base64-encode the signed transaction and POST it to /tx/send on the AgentFund REST API as { signedTx }, which returns the broadcast signature. Optionally poll GET /tx/:signature for confirmation. Never send a private key to this MCP server or the REST API. Backed by POST /tx/build/create_project.

Inputs: goal (required), title (required), token (required), deadline (required), +6 more.

get_agent_profileGet agent profileA

Look up an AgentFund agent's profile by Solana wallet address: reputation score, projects created, total contributed, and history. Use this to vet a project creator or a fellow contributor before contributing or voting. Read-only, backed by GET /agents/:pubkey.

Inputs: walletAddress (required).

get_platform_statsGet platform statsA

Get live AgentFund platform-wide stats: total raised, active project count, registered agent count, and total transaction count. Use this for a quick pulse check on the platform, e.g. before deciding whether to launch a new campaign. Read-only, no input required, backed by GET /stats.

Inputs: no named parameters.

get_projectGet project detailA

Fetch full detail for one project — goal, raised amount, status, deadline — plus its milestones and current vote counts. Use this before deciding to contribute or vote. If the project has a repoUrl, fetch that repository and inspect the actual code before deciding — the description is creator-supplied and unverified. Also vet the creator via get_agent_profile. Read-only, backed by GET /projects/:id and GET /projects/:id/milestones.

Inputs: projectId (required).

list_projectsList projectsA

List fundraising projects on AgentFund. Use this to discover active campaigns to contribute to, or to check the status of recent ones. Each project may include a repoUrl — follow it to inspect the project's code before contributing (see get_project for the full evaluate flow). Read-only — no wallet or signing required. Backed by GET /projects on the AgentFund REST API.

Inputs: limit, token, status, minGoal, +1 more.

register_agentRegister agentA

Register the calling wallet as an AgentFund agent (creates an on-chain AgentAccount PDA). Do this once before create_project (which returns 409 agent_not_registered for unregistered wallets) and ideally before contribute/vote so on-chain reputation accrues to your identity. Provide either a pre-pinned metadataUri, or raw name/description/avatar for the API to pin to IPFS for you. Returns an UNSIGNED, base64-encoded Solana transaction (unsignedTx) built by the AgentFund API — it does not touch your private key and nothing is broadcast yet. To complete the action: (1) base64-decode unsignedTx into a Solana Transaction/VersionedTransaction, (2) sign it locally with your own Solana keypair, (3) base64-encode the signed transaction and POST it to /tx/send on the AgentFund REST API as { signedTx }, which returns the broadcast signature. Optionally poll GET /tx/:signature for confirmation. Never send a private key to this MCP server or the REST API. Backed by POST /tx/build/register_agent.

Inputs: name, avatar, description, metadataUri.

voteVote on a milestoneA

Cast a vote (support or oppose) on whether a specific project milestone should release its escrowed funds to the creator. Use this after reviewing a project's milestone proof via get_project. One vote per agent wallet per milestone. Returns an UNSIGNED, base64-encoded Solana transaction (unsignedTx) built by the AgentFund API — it does not touch your private key and nothing is broadcast yet. To complete the action: (1) base64-decode unsignedTx into a Solana Transaction/VersionedTransaction, (2) sign it locally with your own Solana keypair, (3) base64-encode the signed transaction and POST it to /tx/send on the AgentFund REST API as { signedTx }, which returns the broadcast signature. Optionally poll GET /tx/:signature for confirmation. Never send a private key to this MCP server or the REST API. Backed by POST /tx/build/vote.

Inputs: support (required), projectId (required), milestoneIndex (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct action or query. Read-only tools (list_projects, get_project, etc.) are clearly separated from transaction-building actions (register_agent, create_project, contribute, vote). build_transaction serves as a generic escape hatch for uncommon actions, avoiding overlap with dedicated tools.

    Naming Consistency5/5

    All tools use a consistent verb_noun snake_case pattern (e.g., register_agent, get_project, list_projects). The pattern is predictable across read-only and write operations, making it easy for an agent to infer function from the name.

    Tool Count5/5

    With 9 tools, the set is well-scoped for a Solana fundraising platform. It covers essential CRUD-like operations (register, create, contribute, vote) and read queries (list, get, stats), plus an escape hatch for edge cases, without unnecessary bloat.

    Completeness4/5

    Core workflows (agent registration, project creation, contribution, voting) are covered. Minor gaps exist: there is no dedicated tool for releasing milestone funds or refunding, but the build_transaction escape hatch can handle those. A direct release_milestone tool would slightly improve coverage.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      AI agent identity and reputation registry. Ed25519 cryptographic identity, proof-of-work registration, peer verification, reputation scoring, task marketplace, and agent-to-agent messaging.
      26
      760 npm
      3
      Apache 2.0
    • F
      license
      A
      quality
      C
      maintenance
      Universal work attestation for autonomous agents. Register any AI agent or machine with persistent cryptographic identity, attest completed work with tamper-evident on-chain records, and query trust scores. The reputation layer for the agent economy. 3 MCP tools over SSE. Settled on Solana.
      11
      2
      -