@50heads/mcp 2026.925.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,20 @@
1
+ # Changelog
2
+
3
+ Changes to `@50heads/mcp` (the `npx @50heads/mcp` stdio server and CLI), the hosted server at `https://mcp.50heads.com/mcp` and the 50heads Agent Skill. They share one version.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). Versions are calendar versions, `YYYY.MDD.N`: the year, the month and two-digit day, then the release number for that day (`2026.924.1` is the first release on 24 September 2026). Breaking changes are called out in the notes.
6
+
7
+ Add what changed under Unreleased as you go, written for the people using it. The release workflow moves it under the new version and uses it for the GitHub Release.
8
+
9
+ ## [Unreleased]
10
+
11
+ ## [2026.925.1] - 2026-09-25
12
+
13
+ ### Added
14
+
15
+ - First public release: tools `estimate`, `ask`, `get_results`, `wait_for_results`, `list_questions`, `cancel`, `templates` and `balance`, the 50heads Agent Skill, and `login`, `status`, `logout` and `config` on the command line.
16
+ - Listed in the official MCP Registry as `com.50heads/mcp`, with the hosted server and the npm package.
17
+ - The skill bundle is attached to each GitHub Release as `50heads-skill.zip` and served at `https://50heads.com/skills/50heads.zip`.
18
+ - Requests from the CLI carry a `User-Agent` of `50heads-mcp/<version>`.
19
+ - Nine more tools: `upload_image` (base64 or an https link), `get_answers` (paged and filtered), `add_heads`, `flag_answer`, `export` (CSV, and PDF or PNG as the API adds them), `build_ask_link` (a pre-filled portal link), `list_targeting`, `search_help` and `send_feedback`.
20
+
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 50heads
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,267 @@
1
+ # 50heads MCP
2
+
3
+ Ask fifty verified real people a five-second question from Claude, ChatGPT, Cursor or your own agent, and get the split back. 50 answers at Tier 1: about 10 minutes and 900 credits, priced in your account's currency.
4
+
5
+ There are two ways in, with the same tools:
6
+
7
+ - **Hosted** (recommended): `https://mcp.50heads.com/mcp`. Streamable HTTP, sign in with OAuth in the browser. Nothing to install.
8
+ - **Local**: `npx -y @50heads/mcp`, a stdio server for hosts that launch a command. Needs Node 20 or later and an API key (or a one-time `login`).
9
+
10
+ ## Install
11
+
12
+ Pick your host below. The hosted server needs nothing installed: add the URL and sign in with OAuth in the browser, which also sets the connection's daily spend cap. The local server (`npx -y @50heads/mcp`) needs Node 20 or later and an API key.
13
+
14
+ Make an API key, if you need one, on the Developers page of the dashboard: https://50heads.com/app/developers. Keys start `fh_live_` and are shown once. Or run `npx -y @50heads/mcp login` once and leave the key out.
15
+
16
+ `npx -y @50heads/mcp config [host]` prints any of these. The same instructions are on https://50heads.com/en-us/docs/mcp.
17
+
18
+ <!-- install:start (generated from src/snippets.ts by scripts/generate.ts; do not edit by hand) -->
19
+
20
+ ### Claude (claude.ai and Claude Desktop)
21
+
22
+ Hosted, sign in with OAuth. Settings, Connectors, Add custom connector. Paste the URL and sign in when asked. On Team and Enterprise plans an owner adds it for the organisation first.
23
+
24
+ ```text
25
+ https://mcp.50heads.com/mcp
26
+ ```
27
+
28
+ Or with an API key, in claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\).
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "50heads": {
34
+ "command": "npx",
35
+ "args": [
36
+ "-y",
37
+ "@50heads/mcp"
38
+ ],
39
+ "env": {
40
+ "FIFTYHEADS_API_KEY": "fh_live_…"
41
+ }
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ ### Claude Code
48
+
49
+ Hosted, sign in with OAuth. Run in a terminal, then /mcp in Claude Code to sign in.
50
+
51
+ ```sh
52
+ claude mcp add --transport http 50heads https://mcp.50heads.com/mcp
53
+ ```
54
+
55
+ Or with an API key (CI and scripts):
56
+
57
+ ```sh
58
+ claude mcp add --transport http 50heads https://mcp.50heads.com/mcp --header "Authorization: Bearer fh_live_…"
59
+ ```
60
+
61
+ ### Cursor
62
+
63
+ Hosted, sign in with OAuth. ~/.cursor/mcp.json (or .cursor/mcp.json in a project). Cursor opens the sign-in page.
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "50heads": {
69
+ "url": "https://mcp.50heads.com/mcp"
70
+ }
71
+ }
72
+ }
73
+ ```
74
+
75
+ Or with an API key:
76
+
77
+ ```json
78
+ {
79
+ "mcpServers": {
80
+ "50heads": {
81
+ "url": "https://mcp.50heads.com/mcp",
82
+ "headers": {
83
+ "Authorization": "Bearer fh_live_…"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ ```
89
+
90
+ ### ChatGPT
91
+
92
+ Hosted, sign in with OAuth. Settings, Apps and Connectors, Advanced settings, turn on Developer mode, then Create. Paste the URL and choose OAuth. On Business and Enterprise plans an admin turns on Developer mode first.
93
+
94
+ ```text
95
+ https://mcp.50heads.com/mcp
96
+ ```
97
+
98
+ ### VS Code
99
+
100
+ Hosted, sign in with OAuth. .vscode/mcp.json in the workspace, or MCP: Add Server from the command palette.
101
+
102
+ ```json
103
+ {
104
+ "servers": {
105
+ "50heads": {
106
+ "type": "http",
107
+ "url": "https://mcp.50heads.com/mcp"
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ Or from a terminal:
114
+
115
+ ```sh
116
+ code --add-mcp '{"name":"50heads","type":"http","url":"https://mcp.50heads.com/mcp"}'
117
+ ```
118
+
119
+ ### Windsurf
120
+
121
+ Local, with an API key. ~/.codeium/windsurf/mcp_config.json, or Windsurf Settings, Cascade, MCP servers, View raw config.
122
+
123
+ ```json
124
+ {
125
+ "mcpServers": {
126
+ "50heads": {
127
+ "command": "npx",
128
+ "args": [
129
+ "-y",
130
+ "@50heads/mcp"
131
+ ],
132
+ "env": {
133
+ "FIFTYHEADS_API_KEY": "fh_live_…"
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ```
139
+
140
+ Or the hosted server with an API key:
141
+
142
+ ```json
143
+ {
144
+ "mcpServers": {
145
+ "50heads": {
146
+ "serverUrl": "https://mcp.50heads.com/mcp",
147
+ "headers": {
148
+ "Authorization": "Bearer fh_live_…"
149
+ }
150
+ }
151
+ }
152
+ }
153
+ ```
154
+
155
+ ### Any other host
156
+
157
+ Local, with an API key. Hosts that launch a local command. Needs Node 20 or later and an API key from the dashboard.
158
+
159
+ ```sh
160
+ FIFTYHEADS_API_KEY=fh_live_… npx -y @50heads/mcp
161
+ ```
162
+
163
+ Hosts that speak Streamable HTTP: https://mcp.50heads.com/mcp with the header "Authorization: Bearer fh_live_…", or OAuth.
164
+
165
+ ```json
166
+ {
167
+ "mcpServers": {
168
+ "50heads": {
169
+ "url": "https://mcp.50heads.com/mcp",
170
+ "headers": {
171
+ "Authorization": "Bearer fh_live_…"
172
+ }
173
+ }
174
+ }
175
+ }
176
+ ```
177
+
178
+ <!-- install:end -->
179
+
180
+ ### Check it works
181
+
182
+ Ask your host to "use 50heads to estimate asking fifty people which of two names they prefer". `estimate` is free and never spends credits. In Claude Code, `/mcp` lists the server and its tools; elsewhere, look for 50heads in the host's tools or connectors list.
183
+
184
+ ## Signing in on the command line
185
+
186
+ ```sh
187
+ npx -y @50heads/mcp login # opens the browser; the token goes in your keychain
188
+ npx -y @50heads/mcp status
189
+ npx -y @50heads/mcp logout
190
+ ```
191
+
192
+ `login` uses the OAuth device flow against `https://auth.50heads.com`. Tokens are kept in the macOS Keychain or the Secret Service on Linux, else in `~/.config/50heads/credentials.json` (mode 600). An API key in `FIFTYHEADS_API_KEY` wins when both are present.
193
+
194
+ `--proxy` forwards stdio to the hosted server instead of running the tools locally.
195
+
196
+ | Variable | Meaning |
197
+ | --- | --- |
198
+ | `FIFTYHEADS_API_KEY` | API key for CI and scripts |
199
+ | `FIFTYHEADS_API_URL` | API base, default `https://api.50heads.com` |
200
+ | `FIFTYHEADS_MCP_URL` | Hosted endpoint for `--proxy` |
201
+ | `FIFTYHEADS_AUTH_URL` | Sign-in server for `login` |
202
+ | `FIFTYHEADS_CREDENTIALS_STORE=file` | Keep the sign-in in a file, not the keychain |
203
+ | `FIFTYHEADS_DEBUG=1` | Log each call to stderr (never question text) |
204
+
205
+ ## Tools
206
+
207
+ | Tool | Scope | Does |
208
+ | --- | --- | --- |
209
+ | `estimate` | questions:write | Price, time and fixes for a question. Never spends. Call it first. |
210
+ | `ask` | questions:write | Asks. Needs a fresh UUID as `idempotency_key`. Returns a task (or a `question_id` on older hosts). |
211
+ | `get_results` | questions:read | Results so far, without waiting. |
212
+ | `wait_for_results` | questions:read | Older hosts only: waits up to 600 s on the server. |
213
+ | `list_questions` | questions:read | Your recent questions. Check before asking again. |
214
+ | `cancel` | questions:write | Stops a question and refunds unanswered heads. |
215
+ | `templates` | none | Fixed-price templates. Works without signing in. |
216
+ | `balance` | account:read | Credits, reserved credits and what is left under the connection's daily cap. |
217
+ | `upload_image` | questions:write | Puts an image into 50heads from base64 or an https link; returns an `image_url` for a question. |
218
+ | `get_answers` | questions:read | Individual answers a page at a time, filtered by option, tier, country, age band or keyword. |
219
+ | `add_heads` | questions:write | More heads on the same question, merged into the same result. Needs an `idempotency_key`. |
220
+ | `flag_answer` | questions:write | Reports one answer by its `attestation_ref` for review; upheld flags are refunded. |
221
+ | `export` | questions:read | The results as a file: CSV, a one-page PDF report, or a PNG chart (square, wide or story). |
222
+ | `build_ask_link` | none | A portal link with the question filled in, for a person to check and ask. Spends nothing. |
223
+ | `list_targeting` | none | Countries, languages, pool bands and the tags you can target. |
224
+ | `search_help` | none | Searches the help centre and returns articles with links. |
225
+ | `send_feedback` | none | Sends feedback or a problem to support as a ticket (signed out: add `email`). |
226
+
227
+
228
+ Every connection has a daily spend cap (default 5,000 credits). Asking past it returns `spend_cap_exceeded` with what is left and when it resets.
229
+
230
+ Errors are JSON-RPC errors with `error.data.code` (`validation`, `not_found`, `insufficient_credits`, `spend_cap_exceeded`, `idempotency_conflict`, `content_refused`, `rate_limited`, `unavailable`) and a `retryable` hint.
231
+
232
+ Resources: `50heads://guide` (the skill), `50heads://templates`, `50heads://question-types`, `50heads://pricing`, `50heads://countries`, `50heads://results/{question_id}`. Prompts: `ask_the_heads`, `read_results`. Hosts that show MCP Apps get the estimate and the results as cards.
233
+
234
+ ## The Agent Skill
235
+
236
+ The package ships the 50heads Agent Skill in `skills/50heads` (`@50heads/mcp/skills/50heads/SKILL.md`): when to ask, the eight rules for a good question, how to read results, and references for question types and pricing. Copy the folder into your host's skills directory, or let a host that speaks the `com.50heads/skills` extension fetch it from the server.
237
+
238
+ ## As a library
239
+
240
+ ```ts
241
+ import { serveStdio } from "@modelcontextprotocol/server/stdio";
242
+ import { serverFactory } from "@50heads/mcp";
243
+
244
+ serveStdio(serverFactory({ apiKey: process.env.FIFTYHEADS_API_KEY }));
245
+ ```
246
+
247
+ `serveStdioServer(options)` runs the whole stdio server, tasks included. `configSnippets()` returns the install snippets above.
248
+
249
+ ## Versions
250
+
251
+ Releases use calendar versions, `YYYY.MDD.N`: `2026.924.1` is the first release on 24 September 2026, and a second that day is `2026.924.2`. The npm package, the hosted server (`serverInfo.version`), the MCP Registry entry, `--version` and the Agent Skill all carry the same number. See [CHANGELOG.md](./CHANGELOG.md).
252
+
253
+ The package is listed in the official MCP Registry as `com.50heads/mcp` (https://registry.modelcontextprotocol.io/v0/servers?search=com.50heads/mcp), with both the hosted server and this npm package.
254
+
255
+ ## Development
256
+
257
+ This package lives in the 50heads monorepo. The hosted server (`apps/mcp`) and the stdio server share one module, `src/server.ts`, so they cannot drift.
258
+
259
+ ```sh
260
+ pnpm --filter @50heads/mcp generate # skill module, skill references, server.json, README install section
261
+ pnpm --filter @50heads/mcp test
262
+ pnpm --filter @50heads/mcp build # dist/cli.js, dist/index.js, types, skills/ and skills/50heads.zip
263
+ ```
264
+
265
+ Releasing (npm with provenance, the MCP Registry and a GitHub Release, all from one workflow) is described in [docs/publishing.md](../../docs/publishing.md).
266
+
267
+ MIT licence.