Skip to content

Commit 9f8d67d

Browse files
eliottreichclaude
andcommitted
feat: add get_referral_link tool, bump to 0.3.0
New creator/agent tool get_referral_link calls GET /api/v1/champion/link and returns the Champion referral URL plus ready-to-post generic share copy, with a short human-readable summary line. Requires login. The tool only returns the link and copy; it never posts anything. Updates README Creator tools section and --help. Bumps package.json, server.json, and the lockfile to 0.3.0. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 6b77e77 commit 9f8d67d

5 files changed

Lines changed: 41 additions & 6 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ New in 0.2.0. These let you enable Autopilot or post a bounty without leaving yo
1919
- `autopilot_enable({ repo, trigger_label? })`: turn on TaskBounty Autopilot for a GitHub repo (accepts `owner/name` or a full GitHub URL). Issues labeled with the trigger label (default `taskbounty`) get auto-triaged, auto-funded, fixed by AI agents, verified end to end, and surfaced as ready-to-merge PRs. First 5 verified PRs free, then a 14-day trial, no card required. If the GitHub App is not installed yet, the response includes an install URL to open in the browser.
2020
- `post_from_issue({ issue_url, bounty_usd? })`: post a one-off bounty from an existing GitHub issue. Triage sizes the bounty automatically unless you pass `bounty_usd`. Payment is not handled by the tool: the response returns a funding URL to open in the browser.
2121
- `post_from_current_file`: reserved, not yet implemented (returns a "coming soon" message). Use `post_from_issue` or `autopilot_enable` for now.
22+
- `get_referral_link()`: new in 0.3.0. Returns your Champion referral link plus ready-to-post, generic share copy (tweet, short, generic) so you or your agent can share TaskBounty wherever you want. Anyone who signs up through it and funds work pays you 20 percent of their platform fees for 12 months, up to $5k each. The tool only returns the link and copy; it never posts anything. Requires login.
2223

2324
### Poster side
2425
- `create_bounty_draft({ title, short_summary, description, category, bounty_amount, submission_deadline, evaluation_criteria?, expected_output_format?, github_repo_url?, tags?, platform?, language? })`: creates a DRAFT bounty.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "taskbounty-mcp-server",
33
"mcpName": "io.github.eliottreich/taskbounty-mcp-server",
4-
"version": "0.2.0",
4+
"version": "0.3.0",
55
"license": "MIT",
66
"description": "MCP server for TaskBounty. AI agents fix GitHub bugs (with regression tests) and raise test coverage. Funded in USD, paid in USDC, ETH, or BTC.",
77
"keywords": [

server.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
33
"name": "io.github.eliottreich/taskbounty-mcp-server",
44
"description": "AI agents fix GitHub bugs (with regression tests) or raise test coverage. Paid in crypto.",
5-
"version": "0.2.0",
5+
"version": "0.3.0",
66
"repository": {
77
"url": "https://github.com/eliottreich/taskbounty-mcp-server",
88
"source": "github"
@@ -12,7 +12,7 @@
1212
{
1313
"registryType": "npm",
1414
"identifier": "taskbounty-mcp-server",
15-
"version": "0.2.0",
15+
"version": "0.3.0",
1616
"transport": {
1717
"type": "stdio"
1818
},

src/index.ts

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
// CLI flags handled before importing the SDK so --help / --version run instantly.
8-
const PKG_VERSION = "0.2.0";
8+
const PKG_VERSION = "0.3.0";
99
const cliArgs = process.argv.slice(2);
1010
if (cliArgs.includes("--help") || cliArgs.includes("-h")) {
1111
process.stdout.write(
@@ -22,6 +22,7 @@ if (cliArgs.includes("--help") || cliArgs.includes("-h")) {
2222
" taskbounty_login Browser device login. No API key needed up front.",
2323
" autopilot_enable Turn on TaskBounty Autopilot for a GitHub repo.",
2424
" post_from_issue Post a one-off bounty from an existing GitHub issue.",
25+
" get_referral_link Get your Champion referral link + ready-to-post share copy.",
2526
"",
2627
"Solver tools (agents):",
2728
" list_open_bounties, get_bounty_detail, request_repo_access,",
@@ -581,6 +582,15 @@ const TOOLS = [
581582
required: ["task_id"],
582583
},
583584
},
585+
{
586+
name: "get_referral_link",
587+
description:
588+
"For repo owners and agents: get your TaskBounty Champion referral link plus ready-to-post, generic share copy (tweet, short, generic). Anyone who signs up through it and funds work pays you 20 percent of their platform fees for 12 months, up to $5k each. This tool only returns the link and copy; it does not post anything. Requires login (run taskbounty_login first).",
589+
inputSchema: {
590+
type: "object",
591+
properties: {},
592+
},
593+
},
584594
] as const;
585595

586596
const server = new Server(
@@ -1072,6 +1082,30 @@ server.setRequestHandler(CallToolRequestSchema, async (req) => {
10721082
});
10731083
}
10741084

1085+
case "get_referral_link": {
1086+
const result = await tbFetch(`/champion/link`, { requireAuth: true });
1087+
if (result.isError) return result;
1088+
const raw = result.content[0]?.text ?? "{}";
1089+
let summary = "Referral link ready.";
1090+
try {
1091+
const parsed = JSON.parse(raw) as {
1092+
data?: { referral_url?: string };
1093+
};
1094+
const refUrl = parsed.data?.referral_url;
1095+
if (refUrl) {
1096+
summary = `Your referral link: ${refUrl} . Ready-to-post share copy is in the JSON below (tweet, short, generic). Nothing is posted automatically; share it wherever you want.`;
1097+
}
1098+
} catch {
1099+
// Fall through with the generic summary; raw JSON is still returned.
1100+
}
1101+
return {
1102+
content: [
1103+
{ type: "text", text: summary },
1104+
{ type: "text", text: raw },
1105+
],
1106+
};
1107+
}
1108+
10751109
default:
10761110
return {
10771111
content: [{ type: "text", text: `Unknown tool: ${name}` }],

0 commit comments

Comments
 (0)