sigrank 0.15.0 → 0.15.3
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/README.md +1 -0
- package/index.mjs +88 -2
- package/package.json +2 -1
- package/tools.mjs +49 -12
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ For all builders, burners and 10xers.
|
|
|
16
16
|
[](./LICENSE)
|
|
17
17
|
[](https://nodejs.org)
|
|
18
18
|
[](https://signalaf.com)
|
|
19
|
+
[](https://glama.ai/mcp/servers/SunrisesIllNeverSee/sigrank-mcp)
|
|
19
20
|
|
|
20
21
|
</div>
|
|
21
22
|
|
package/index.mjs
CHANGED
|
@@ -23,7 +23,14 @@
|
|
|
23
23
|
|
|
24
24
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js'
|
|
25
25
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
26
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
CallToolRequestSchema,
|
|
28
|
+
ListToolsRequestSchema,
|
|
29
|
+
ListPromptsRequestSchema,
|
|
30
|
+
GetPromptRequestSchema,
|
|
31
|
+
McpError,
|
|
32
|
+
ErrorCode,
|
|
33
|
+
} from '@modelcontextprotocol/sdk/types.js'
|
|
27
34
|
import { TOOLS, callTool } from './tools.mjs'
|
|
28
35
|
import { runCli } from './cli.mjs'
|
|
29
36
|
import { readFileSync } from 'node:fs'
|
|
@@ -52,7 +59,10 @@ process.on('unhandledRejection', (reason) => {
|
|
|
52
59
|
})
|
|
53
60
|
|
|
54
61
|
async function startMcpServer() {
|
|
55
|
-
const server = new Server(
|
|
62
|
+
const server = new Server(
|
|
63
|
+
{ name: 'sigrank', version: serverVersion() },
|
|
64
|
+
{ capabilities: { tools: {}, prompts: {} } },
|
|
65
|
+
)
|
|
56
66
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }))
|
|
57
67
|
server.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
58
68
|
// Unknown tool name = a client/host bug → JSON-RPC -32602 protocol error, per the MCP
|
|
@@ -67,6 +77,82 @@ async function startMcpServer() {
|
|
|
67
77
|
return { content: [{ type: 'text', text: `Error: ${e.message}` }], isError: true }
|
|
68
78
|
}
|
|
69
79
|
})
|
|
80
|
+
|
|
81
|
+
// --- Prompts: interactive templates that agents can offer to users ---
|
|
82
|
+
const PROMPTS = [
|
|
83
|
+
{
|
|
84
|
+
name: 'check-my-efficiency',
|
|
85
|
+
description:
|
|
86
|
+
'Pull your local token usage, compute your SigRank yield, and compare your efficiency against the leaderboard. Shows your class tier (Burner/Builder/10xer) and where you rank.',
|
|
87
|
+
arguments: [],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: 'simulate-improvement',
|
|
91
|
+
description:
|
|
92
|
+
'Run a what-if analysis on your token mix: "if I increased my cache reads by 50k, how would my yield change?" Uses simulate_change to show the payoff before you change your workflow.',
|
|
93
|
+
arguments: [
|
|
94
|
+
{
|
|
95
|
+
name: 'change',
|
|
96
|
+
description: 'The change to simulate (e.g. "increase cache reads by 50000" or "reduce input by 100000")',
|
|
97
|
+
required: true,
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
name: 'compare-with-leader',
|
|
103
|
+
description:
|
|
104
|
+
'Fetch the top operator from the SigRank leaderboard and compare their token efficiency metrics against yours. Shows the gap and what you\'d need to change to close it.',
|
|
105
|
+
arguments: [],
|
|
106
|
+
},
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
server.setRequestHandler(ListPromptsRequestSchema, async () => ({ prompts: PROMPTS }))
|
|
110
|
+
server.setRequestHandler(GetPromptRequestSchema, async (req) => {
|
|
111
|
+
const name = req.params.name
|
|
112
|
+
const args = req.params.arguments || {}
|
|
113
|
+
if (name === 'check-my-efficiency') {
|
|
114
|
+
return {
|
|
115
|
+
messages: [
|
|
116
|
+
{
|
|
117
|
+
role: 'user',
|
|
118
|
+
content: {
|
|
119
|
+
type: 'text',
|
|
120
|
+
text: 'Pull my local token usage with tokenpull, compute my yield, and then fetch the leaderboard so I can see where I rank. Show me my class tier and my key metrics (Yield, Leverage, Velocity).',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (name === 'simulate-improvement') {
|
|
127
|
+
const change = args.change || 'increase cache reads by 50000'
|
|
128
|
+
return {
|
|
129
|
+
messages: [
|
|
130
|
+
{
|
|
131
|
+
role: 'user',
|
|
132
|
+
content: {
|
|
133
|
+
type: 'text',
|
|
134
|
+
text: `First pull my local token usage with tokenpull to get my current pillars. Then use simulate_change to answer: "what if I ${change}?" Show me the yield delta and whether my class tier would change.`,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (name === 'compare-with-leader') {
|
|
141
|
+
return {
|
|
142
|
+
messages: [
|
|
143
|
+
{
|
|
144
|
+
role: 'user',
|
|
145
|
+
content: {
|
|
146
|
+
type: 'text',
|
|
147
|
+
text: 'Fetch the SigRank leaderboard with get_leaderboard, then pull my local token usage with tokenpull. Compare my yield, leverage, and velocity against the top operator. What\'s the gap and what would I need to change to close it?',
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
],
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
throw new McpError(ErrorCode.InvalidParams, `Unknown prompt: ${name}`)
|
|
154
|
+
})
|
|
155
|
+
|
|
70
156
|
await server.connect(new StdioServerTransport())
|
|
71
157
|
}
|
|
72
158
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigrank",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"description": "SigRank MCP server — the yield cascade + live leaderboard as MCP tools any agent can call",
|
|
5
|
+
"mcpName": "io.github.SunrisesIllNeverSee/sigrank-mcp",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"license": "MIT",
|
|
7
8
|
"repository": {
|
package/tools.mjs
CHANGED
|
@@ -169,28 +169,54 @@ export const TOOLS = [
|
|
|
169
169
|
{
|
|
170
170
|
name: 'rank_paste',
|
|
171
171
|
description:
|
|
172
|
-
'Rank a paste of ccusage-style token counts. Accepts JSON {input,output,cacheCreate,cacheRead} or 4 whitespace-separated numbers in that order. Returns Υ Yield, SNR, Leverage, Velocity, 10xDEV, class,
|
|
173
|
-
inputSchema: {
|
|
172
|
+
'Rank a paste of ccusage-style token counts to compute your SigRank yield. Accepts JSON {input,output,cacheCreate,cacheRead} or 4 whitespace-separated numbers in that order (input output cacheCreate cacheRead). Returns Υ Yield (the headline efficiency metric), SNR, Leverage ratio (Cr/I), Velocity (O/I), 10xDEV score, operator class tier (Burner/Builder/10xer), and a deterministic prose "card" summarizing the result. All computation is local — no network calls, no prompt data leaves the machine. Use this for a quick one-off ranking without submitting to the board.',
|
|
173
|
+
inputSchema: {
|
|
174
|
+
type: 'object',
|
|
175
|
+
properties: {
|
|
176
|
+
text: {
|
|
177
|
+
type: 'string',
|
|
178
|
+
description: 'Token counts to rank. Two formats accepted: (1) JSON object {"input":N,"output":N,"cacheCreate":N,"cacheRead":N} or (2) four whitespace-separated numbers in order: input output cacheCreate cacheRead. Get these from `ccusage` output, the Claude Max dashboard, or any token reader.',
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
required: ['text'],
|
|
182
|
+
},
|
|
174
183
|
},
|
|
175
184
|
{
|
|
176
185
|
name: 'get_leaderboard',
|
|
177
|
-
description:
|
|
186
|
+
description:
|
|
187
|
+
"Fetch the live public SigRank leaderboard from signalaf.com — all ranked operators sorted by yield (Υ = Cache Reads × Output / Input²). Returns each operator's codename, yield, leverage ratio (Cr/I), velocity (O/I), class tier, and rank. Use this to see where operators stand overall or to find specific codenames for get_operator lookups.",
|
|
178
188
|
inputSchema: { type: 'object', properties: {} },
|
|
179
189
|
},
|
|
180
190
|
{
|
|
181
191
|
name: 'get_operator',
|
|
182
|
-
description:
|
|
183
|
-
|
|
192
|
+
description:
|
|
193
|
+
"Fetch one operator's live profile from the SigRank board by their codename. Returns their current yield (Υ), leverage ratio (Cr/I), velocity (O/I), class tier, rank position, and per-window breakdowns (7d/30d/90d/all-time). Use this to look up any operator who has submitted to the board — codenames are public and visible on the leaderboard.",
|
|
194
|
+
inputSchema: {
|
|
195
|
+
type: 'object',
|
|
196
|
+
properties: {
|
|
197
|
+
codename: {
|
|
198
|
+
type: 'string',
|
|
199
|
+
description: 'The operator\'s public codename as shown on the SigRank leaderboard (e.g. "Ghost Falcon", "Iron Lotus"). Case-insensitive.',
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
required: ['codename'],
|
|
203
|
+
},
|
|
184
204
|
},
|
|
185
205
|
{
|
|
186
206
|
name: 'submit_paste',
|
|
187
207
|
description:
|
|
188
|
-
'Rank a paste AND publish it to the live SigRank board in one call. Computes the cascade locally
|
|
208
|
+
'Rank a paste of token counts AND publish it to the live SigRank board at signalaf.com in one call. Computes the cascade locally for an instant preview + card, then submits the raw paste to the board\'s web-paste endpoint, which re-parses and re-scores it server-side (the server score is authoritative). A codename is required to publish — omit it for a local preview only. Token-only, no auth required (matches the web paste path). Best with a ccusage JSON paste — the 4-number form ranks locally but the board may reject it.',
|
|
189
209
|
inputSchema: {
|
|
190
210
|
type: 'object',
|
|
191
211
|
properties: {
|
|
192
|
-
text: {
|
|
193
|
-
|
|
212
|
+
text: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
description: 'Token counts to rank and submit. Two formats: (1) JSON {"input":N,"output":N,"cacheCreate":N,"cacheRead":N} from ccusage, or (2) four whitespace-separated numbers: input output cacheCreate cacheRead.',
|
|
215
|
+
},
|
|
216
|
+
codename: {
|
|
217
|
+
type: 'string',
|
|
218
|
+
description: 'Operator codename to publish under on the leaderboard (e.g. "Ghost Falcon"). Required to submit — omit for local preview only (no board submission).',
|
|
219
|
+
},
|
|
194
220
|
},
|
|
195
221
|
required: ['text'],
|
|
196
222
|
},
|
|
@@ -213,13 +239,24 @@ export const TOOLS = [
|
|
|
213
239
|
{
|
|
214
240
|
name: 'tokenpull_submit',
|
|
215
241
|
description:
|
|
216
|
-
"Pull your LOCAL usage
|
|
242
|
+
"Pull your LOCAL token usage from session logs AND publish it to the SigRank board in one call — the zero-paste flow. Reads the four canonical pillars (input, output, cacheCreate, cacheRead) per window from your local logs, computes the cascade, and submits each window to the board where it is re-scored server-side and tagged with the source platform. Requires a codename to publish; omit for a local preview only. Token-only — no prompt content is read or transmitted.",
|
|
217
243
|
inputSchema: {
|
|
218
244
|
type: 'object',
|
|
219
245
|
properties: {
|
|
220
|
-
codename: {
|
|
221
|
-
|
|
222
|
-
|
|
246
|
+
codename: {
|
|
247
|
+
type: 'string',
|
|
248
|
+
description: 'Operator codename to publish under on the leaderboard (e.g. "Iron Lotus"). Required to submit — omit for local preview only.',
|
|
249
|
+
},
|
|
250
|
+
window: {
|
|
251
|
+
type: 'string',
|
|
252
|
+
enum: ['7d', '30d', '90d', 'all'],
|
|
253
|
+
description: 'Submit only this time window (default: all 4 windows). Use "7d" for recent activity or "all" for all-time ranking.',
|
|
254
|
+
},
|
|
255
|
+
platform: {
|
|
256
|
+
type: 'string',
|
|
257
|
+
enum: ALL_PLATFORMS,
|
|
258
|
+
description: `Source platform to pull from (default: claude). Supported: ${ALL_PLATFORMS.join(', ')}. Each platform reads its own session logs locally.`,
|
|
259
|
+
},
|
|
223
260
|
},
|
|
224
261
|
},
|
|
225
262
|
},
|