Skip to main content
Glama
Sicks3c

HackerOne MCP Server

by Sicks3c

get_earnings

Retrieve bounty earnings history from HackerOne, showing payment amounts, currencies, dates, and programs that paid out.

Instructions

Get your bounty earnings history. Shows amounts, currency, dates, and which programs paid out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_sizeNoNumber of earnings to return (default 100)

Implementation Reference

  • The function that executes the earnings data retrieval logic.
    export async function getEarnings(pageSize = 100) {
      const data = await h1Fetch("/hackers/payments/earnings", {
        "page[size]": String(pageSize),
      });
    
      return data.data.map((e: any) => ({
        id: e.id,
        amount: e.attributes.amount,
        awarded_by: e.attributes.awarded_by_name,
        created_at: e.attributes.created_at,
        currency: e.relationships?.program?.data?.attributes?.currency ?? null,
        program: e.relationships?.program?.data?.attributes?.handle ?? null,
      }));
    }
  • src/index.ts:344-367 (registration)
    Registration of the 'get_earnings' tool using the MCP server framework.
    server.tool(
      "get_earnings",
      "Get your bounty earnings history. Shows amounts, currency, dates, and which programs paid out.",
      {
        page_size: z
          .number()
          .min(1)
          .max(100)
          .optional()
          .describe("Number of earnings to return (default 100)"),
      },
      async ({ page_size }) => {
        try {
          const earnings = await getEarnings(page_size);
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(earnings, null, 2),
              },
            ],
          };
        } catch (err: any) {
          return {

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sicks3c/hackerone-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server