talentos 0.1.0 → 0.3.0

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 CHANGED
@@ -3,7 +3,10 @@
3
3
  A thin [stdio MCP](https://modelcontextprotocol.io) server that wraps the TalentOS
4
4
  external HTTP API (`/api/v0/*`). Point any MCP-capable agent (Claude Code, Claude
5
5
  Desktop, Cursor, etc.) at it and the agent can read your org's workflows and
6
- nodes, then create or replace workflow drafts through the same API key.
6
+ nodes, then create or replace its own private Skills through the same API key.
7
+
8
+ Published to npm as [`talentos`](https://www.npmjs.com/package/talentos) — run it
9
+ with `npx -y talentos`, no checkout or build required.
7
10
 
8
11
  It exposes six tools:
9
12
 
@@ -17,14 +20,14 @@ It exposes six tools:
17
20
  agent-ready Markdown runbook, including its `**Version:**` stamp.
18
21
  - **`list_nodes`** (no arguments) — company-wide reusable nodes as name, id,
19
22
  step type, summary, and tools.
20
- - **`create_workflow`** (`{ title, steps, connections }`) — create a new draft
21
- workflow from a full plan. Steps may include `outputs`, `successCriteria`, and
22
- `runtime` contract fields. Writes always create drafts; a human publishes in
23
- the app.
24
- - **`update_workflow`** (`{ workflowId, title, steps, connections }`) —
25
- replace an existing draft workflow from a full plan. Steps may include
26
- `outputs`, `successCriteria`, and `runtime`; published workflows return a
27
- clear conflict instead of being edited.
23
+ - **`create_skill`** (`{ name, summary, instructions, successCriteria?,
24
+ requestedTools? }`) — create a new Skill from plain-text instructions.
25
+ Returns the new `skillId` and its version. The Skill is private to the API
26
+ key's owner, who curates it in their TalentOS Skills library.
27
+ - **`update_skill`** (`{ skillId, name, summary, instructions,
28
+ successCriteria?, requestedTools? }`) — replace one of the API key owner's
29
+ private Skills with a complete new body. Only that owner's private Skills are
30
+ writable; published and shared Skills stay human-owned.
28
31
 
29
32
  The server holds no state and stores nothing. Every call is a single
30
33
  authenticated request to the HTTP API; all authorization and visibility rules
@@ -32,56 +35,34 @@ live server-side.
32
35
 
33
36
  ## Configuration
34
37
 
35
- Two environment variables, both required. The server exits immediately with a
36
- message on stderr if either is missing.
38
+ Only `TALENTOS_API_KEY` is required — the server exits immediately with a message
39
+ on stderr if it's missing. `TALENTOS_API_URL` is optional: it defaults to the
40
+ production TalentOS deployment, so most users never set it.
37
41
 
38
42
  | Variable | Required | Description |
39
43
  | ------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
40
44
  | `TALENTOS_API_KEY` | yes | An API key you create in the TalentOS admin UI. Sent as `Authorization: Bearer <key>`. Never logged. |
41
- | `TALENTOS_API_URL` | yes | The deployment's **`https://<name>.convex.site`** base URL — the `.convex.site` domain, **not** `.convex.cloud`. |
45
+ | `TALENTOS_API_URL` | no | Override the API base URL to target a non-production deployment. Defaults to the production `https://<name>.convex.site` origin. Must be the `.convex.site` domain, **not** `.convex.cloud`. |
42
46
 
43
47
  ## Install
44
48
 
45
- Run the server with `npx` — no clone or build required. Your MCP client
46
- launches it on demand; `npx` fetches and caches `talentos` on first use:
49
+ Nothing to install ahead of time — `npx` fetches the published package on first
50
+ run and caches it:
47
51
 
48
52
  ```bash
49
53
  npx -y talentos
50
54
  ```
51
55
 
52
- Set the two environment variables above in your MCP client config (snippets
53
- below), not on the command line. The `-y` flag skips npx's install prompt so it
54
- also works in noninteractive clients.
55
-
56
- ### Run from source (contributors)
57
-
58
- Working on the server itself? It keeps its own dependencies and lockfile — the
59
- repo-root `pnpm install` does **not** install them. Once per clone:
60
-
61
- ```bash
62
- cd tools/mcp-server && pnpm install --ignore-workspace
63
- ```
64
-
65
- (`--ignore-workspace` keeps it out of the root lockfile — this package is
66
- deliberately not part of the app workspace.) To point a client at your
67
- checkout, set `command` to the package-local tsx binary
68
- (`tools/mcp-server/node_modules/.bin/tsx`) and `args` to `src/index.ts`, both
69
- as absolute paths. Two launch paths that look equivalent are not:
70
-
71
- - `npx tsx …` resolves `tsx` on demand, so a client machine without it cached
72
- does a network fetch at launch — in a noninteractive or offline MCP client
73
- this fails (`ENOTCACHED`).
74
- - `pnpm start` prints its script banner to **stdout**, which corrupts the MCP
75
- JSON-RPC stream (`pnpm --silent` avoids it, but the plain form is a trap).
56
+ The `-y` skips the install prompt so noninteractive MCP clients don't hang. The
57
+ first launch does a one-time network fetch to populate the npx cache (then exits
58
+ asking for `TALENTOS_API_KEY`); run it once by hand — or pin a version like
59
+ `talentos@0.3.0` — before wiring it into an offline or CI environment.
76
60
 
77
61
  ## Add it to Claude Code
78
62
 
79
- From anywhere — npx fetches the package, so no checkout is needed:
80
-
81
63
  ```bash
82
64
  claude mcp add talentos \
83
65
  -e TALENTOS_API_KEY=tos_your_key_here \
84
- -e TALENTOS_API_URL=https://your-deployment.convex.site \
85
66
  -- npx -y talentos
86
67
  ```
87
68
 
@@ -90,8 +71,7 @@ markdown"* — it calls `list_workflows`, picks an id, and calls `get_workflow`.
90
71
 
91
72
  ## Add it to any other MCP client
92
73
 
93
- Add this to your MCP client config (`.mcp.json`, Claude Desktop config, etc.).
94
- `npx` resolves and caches the package, so there are no repo paths to wire up:
74
+ Add this to your MCP client config (`.mcp.json`, Claude Desktop config, etc.):
95
75
 
96
76
  ```json
97
77
  {
@@ -100,8 +80,7 @@ Add this to your MCP client config (`.mcp.json`, Claude Desktop config, etc.).
100
80
  "command": "npx",
101
81
  "args": ["-y", "talentos"],
102
82
  "env": {
103
- "TALENTOS_API_KEY": "tos_your_key_here",
104
- "TALENTOS_API_URL": "https://your-deployment.convex.site"
83
+ "TALENTOS_API_KEY": "tos_your_key_here"
105
84
  }
106
85
  }
107
86
  }
@@ -125,23 +104,22 @@ Add this to your MCP client config (`.mcp.json`, Claude Desktop config, etc.).
125
104
  make sure you used the `.convex.site` domain, not `.convex.cloud`.
126
105
 
127
106
  3. **Add the server** to your MCP client using a snippet above, with your real
128
- key and URL.
107
+ key (the API URL defaults to production).
129
108
 
130
- 4. **Ask the agent** to list your workflows, then create a draft:
109
+ 4. **Ask the agent** to list your workflows, then create a Skill:
131
110
 
132
111
  > List my TalentOS workflows, show me the first one as markdown, then create
133
- > a new draft workflow for candidate outreach.
112
+ > a Skill for candidate outreach.
134
113
 
135
- The agent calls `list_workflows`, `get_workflow`, and `create_workflow`. The
136
- new workflow lands as a draft in TalentOS for a human to review and publish.
114
+ The agent calls `list_workflows`, `get_workflow`, and `create_skill`. The new
115
+ Skill lands as a private Skill in TalentOS for its owner to review.
137
116
 
138
117
  ## Errors you might see
139
118
 
140
119
  - **Unauthorized (401)** — `TALENTOS_API_KEY` is missing, wrong, or revoked.
141
- - **Workflow not found (404)** — the `id` doesn't exist or it is not visible to
142
- this API key.
143
- - **Published workflow conflict (409)** — `update_workflow` only edits drafts;
144
- published workflows must be duplicated or edited in TalentOS.
120
+ - **Not found (404)** — the workflow or skill `id` doesn't exist, or it is not
121
+ visible to this API key. `update_skill` only reaches the key owner's own
122
+ private Skills.
145
123
  - **Rate limited (429)** — the key is over its requests-per-minute budget;
146
124
  wait a moment and retry.
147
125
  - **Could not reach the API** — `TALENTOS_API_URL` is wrong or unreachable;
package/dist/api.js CHANGED
@@ -7,6 +7,7 @@
7
7
  const WORKFLOWS_PATH = "/api/v0/workflows";
8
8
  const NODES_PATH = "/api/v0/nodes";
9
9
  const CONTEXT_PATH = "/api/v0/context";
10
+ const SKILLS_PATH = "/api/v0/skills";
10
11
  // A hung deployment (connection accepted, no response) would otherwise leave the
11
12
  // tool call pending forever with no error; abort so it surfaces as networkError.
12
13
  const REQUEST_TIMEOUT_MS = 15_000;
@@ -15,11 +16,7 @@ export async function listWorkflows(config) {
15
16
  if ("error" in result) {
16
17
  return result.error;
17
18
  }
18
- // A wrong-URL proxy or shape drift can return a non-array here; treat that
19
- // like the other malformed-response cases instead of throwing on .map.
20
- const workflows = Array.isArray(result.body.workflows)
21
- ? result.body.workflows
22
- : [];
19
+ const workflows = result.body.workflows ?? [];
23
20
  if (workflows.length === 0) {
24
21
  return textResult("No workflows are visible to this API key.");
25
22
  }
@@ -76,7 +73,7 @@ export async function listNodes(config) {
76
73
  if ("error" in result) {
77
74
  return result.error;
78
75
  }
79
- const nodes = Array.isArray(result.body.nodes) ? result.body.nodes : [];
76
+ const nodes = result.body.nodes ?? [];
80
77
  if (nodes.length === 0) {
81
78
  return textResult("No company nodes are published.");
82
79
  }
@@ -102,24 +99,24 @@ export async function getContext(config) {
102
99
  // formatting opinion belongs server-side, not in this wrapper.
103
100
  return textResult(JSON.stringify(result.body, null, 2));
104
101
  }
105
- export async function createWorkflow(config, plan) {
106
- return await writeWorkflow(config, WORKFLOWS_PATH, plan, "Created");
102
+ export async function createSkill(config, skill) {
103
+ return await writeSkill(config, SKILLS_PATH, skill, "Created");
107
104
  }
108
- export async function updateWorkflow(config, workflowId, plan) {
109
- return await writeWorkflow(config, `${WORKFLOWS_PATH}/${encodeURIComponent(workflowId)}`, plan, "Updated", workflowId);
105
+ export async function updateSkill(config, skillId, skill) {
106
+ return await writeSkill(config, `${SKILLS_PATH}/${encodeURIComponent(skillId)}`, skill, "Updated", skillId);
110
107
  }
111
108
  const URL_HINT = "The TALENTOS_API_URL may be wrong — it must point at the deployment's https://<name>.convex.site domain.";
112
- async function writeWorkflow(config, path, plan, action, workflowId) {
113
- const result = await fetchJson(config, path, path === WORKFLOWS_PATH ? "POST" : "PUT", plan, workflowId);
109
+ async function writeSkill(config, path, skill, action, skillId) {
110
+ const result = await fetchJson(config, path, path === SKILLS_PATH ? "POST" : "PUT", skill);
114
111
  if ("error" in result) {
115
112
  return result.error;
116
113
  }
117
- const id = result.body.id ?? workflowId;
118
- const status = result.body.status ?? "draft";
119
- if (!id) {
120
- return toolError(`The response was missing a workflow id. ${URL_HINT}`);
114
+ const id = result.body.skillId ?? skillId;
115
+ const version = result.body.version;
116
+ if (!id || version === undefined) {
117
+ return toolError(`The response was missing a skill id or version. ${URL_HINT}`);
121
118
  }
122
- return textResult(`${action} workflow draft (id: ${id}) · status: ${status}\nA human must publish it in TalentOS.`);
119
+ return textResult(`${action} skill (id: ${id}) · version ${version}\nPrivate to this API key's owner; they curate it in their TalentOS Skills library.`);
123
120
  }
124
121
  function textResult(text) {
125
122
  return { content: [{ text, type: "text" }] };
@@ -140,7 +137,7 @@ async function httpError(response, workflowId) {
140
137
  }
141
138
  if (response.status === 409) {
142
139
  return toolError(message ??
143
- "This workflow is published and can't be edited through the API.");
140
+ "This write conflicts with the current state. Reload and retry.");
144
141
  }
145
142
  if (response.status === 429) {
146
143
  return toolError("Rate limited (429). This API key is over its requests-per-minute budget — wait a moment and retry.");
package/dist/index.js CHANGED
@@ -5,75 +5,32 @@
5
5
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
6
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
7
7
  import { z } from "zod";
8
- import { createWorkflow, getContext, getWorkflow, listNodes, listWorkflows, updateWorkflow, } from "./api.js";
8
+ import { createSkill, getContext, getWorkflow, listNodes, listWorkflows, updateSkill, } from "./api.js";
9
9
  const TRAILING_SLASHES = /\/+$/;
10
- const WORKFLOW_STEP_SCHEMA = z.object({
11
- key: z.string().describe("Short kebab-case slug, unique per step."),
12
- title: z.string().describe("Short imperative phrase, at most 8 words."),
13
- stepType: z.enum(["human", "ai_assisted", "ai_agent", "automation"]),
14
- description: z
10
+ // The production TalentOS API origin. The server defaults to it so users only
11
+ // need to supply TALENTOS_API_KEY; set TALENTOS_API_URL to override (e.g. a dev
12
+ // deployment). Must be the .convex.site HTTP-action domain, not .convex.cloud.
13
+ const DEFAULT_API_URL = "https://woozy-oyster-769.convex.site";
14
+ const SKILL_SCHEMA = {
15
+ instructions: z
15
16
  .string()
16
- .optional()
17
- .describe("Complete markdown instructions for the step."),
18
- dataNeeded: z
19
- .array(z.object({
20
- label: z.string().describe("Short input name."),
21
- detail: z
22
- .string()
23
- .optional()
24
- .describe("Optional detail about the input."),
25
- }))
26
- .optional()
27
- .describe("Inputs the step needs."),
28
- outputs: z
29
- .array(z.object({
30
- label: z.string().describe("Artifact or deliverable name."),
31
- detail: z
32
- .string()
33
- .optional()
34
- .describe("Optional detail about the output."),
35
- format: z
36
- .string()
37
- .optional()
38
- .describe("Optional format hint, such as markdown, json, or url."),
39
- }))
40
- .optional()
41
- .describe("Artifacts or deliverables the step produces."),
42
- successCriteria: z
43
- .string()
44
- .optional()
45
- .describe("How a reviewer or agent knows this step is done well."),
46
- runtime: z
47
- .object({
48
- kind: z
49
- .string()
50
- .describe('Runtime the user named, such as "claude-code" or "api".'),
51
- model: z.string().optional().describe("Optional model name."),
52
- config: z
53
- .record(z.string(), z.string())
54
- .optional()
55
- .describe("Optional string config for the runtime."),
56
- })
57
- .optional()
58
- .describe("What executes this step, when the user names a runtime."),
59
- toolNames: z
17
+ .describe("Complete plain-text instructions for the Skill."),
18
+ name: z.string().describe("Short title for the Skill."),
19
+ requestedTools: z
60
20
  .array(z.string())
61
21
  .optional()
62
22
  .describe("Tool names exactly as the user named them."),
63
- });
64
- const WORKFLOW_CONNECTION_SCHEMA = z.object({
65
- fromKey: z.string().describe("The source step key."),
66
- toKey: z.string().describe("The target step key."),
67
- label: z
23
+ successCriteria: z
68
24
  .string()
69
25
  .optional()
70
- .describe("Short branch label, only when the flow branches."),
71
- });
26
+ .describe("How a reviewer knows the Skill did its job well."),
27
+ summary: z.string().describe("One-sentence summary of what the Skill does."),
28
+ };
72
29
  async function main() {
73
30
  const config = loadConfig();
74
31
  const server = new McpServer({
75
32
  name: "talentos",
76
- version: "0.1.0",
33
+ version: "0.0.0",
77
34
  });
78
35
  server.registerTool("list_workflows", {
79
36
  title: "List workflows",
@@ -96,62 +53,47 @@ async function main() {
96
53
  title: "Get org context",
97
54
  description: "One compact summary of the org this API key belongs to: company profile basics plus the names of its published workflows and nodes. Call this first to prime yourself.",
98
55
  }, () => getContext(config));
99
- server.registerTool("create_workflow", {
100
- title: "Create workflow draft",
101
- description: "Create a new TalentOS workflow draft from a full title/steps/connections plan. Steps may include agent contract fields: outputs, successCriteria, and runtime. Writes always create drafts that a human publishes in the app.",
102
- inputSchema: {
103
- title: z.string().describe("Short name for the whole workflow."),
104
- steps: z
105
- .array(WORKFLOW_STEP_SCHEMA)
106
- .describe("The ordered workflow steps to materialize."),
107
- connections: z
108
- .array(WORKFLOW_CONNECTION_SCHEMA)
109
- .optional()
110
- .describe("Directed edges between the steps. Omit for no edges."),
111
- },
112
- }, ({ connections, steps, title }) => createWorkflow(config, {
113
- connections: connections ?? [],
114
- steps,
115
- title,
56
+ server.registerTool("create_skill", {
57
+ title: "Create Skill",
58
+ description: "Create a new private TalentOS Skill from a name, summary, instructions, and success criteria. The Skill is private to the API key's owner, who curates it in TalentOS.",
59
+ inputSchema: SKILL_SCHEMA,
60
+ }, ({ instructions, name, requestedTools, successCriteria, summary }) => createSkill(config, {
61
+ instructions,
62
+ name,
63
+ ...(requestedTools === undefined ? {} : { requestedTools }),
64
+ ...(successCriteria === undefined ? {} : { successCriteria }),
65
+ summary,
116
66
  }));
117
- server.registerTool("update_workflow", {
118
- title: "Replace workflow draft",
119
- description: "Replace an existing TalentOS workflow draft with a full title/steps/connections plan. Steps may include agent contract fields: outputs, successCriteria, and runtime. Drafts only: updating a published workflow returns a clear conflict message.",
67
+ server.registerTool("update_skill", {
68
+ title: "Replace Skill",
69
+ description: "Replace the API key owner's private TalentOS Skill with a complete name, summary, instructions, and success criteria.",
120
70
  inputSchema: {
121
- workflowId: z.string().describe("The workflow id from list_workflows."),
122
- title: z.string().describe("Short name for the whole workflow."),
123
- steps: z
124
- .array(WORKFLOW_STEP_SCHEMA)
125
- .describe("The complete replacement step list."),
126
- connections: z
127
- .array(WORKFLOW_CONNECTION_SCHEMA)
128
- .optional()
129
- .describe("The complete replacement edge list. Omit for no edges."),
71
+ skillId: z.string().describe("The skill id from create_skill."),
72
+ ...SKILL_SCHEMA,
130
73
  },
131
- }, ({ connections, steps, title, workflowId }) => updateWorkflow(config, workflowId, {
132
- connections: connections ?? [],
133
- steps,
134
- title,
74
+ }, ({ instructions, name, requestedTools, skillId, successCriteria, summary, }) => updateSkill(config, skillId, {
75
+ instructions,
76
+ name,
77
+ ...(requestedTools === undefined ? {} : { requestedTools }),
78
+ ...(successCriteria === undefined ? {} : { successCriteria }),
79
+ summary,
135
80
  }));
136
81
  await server.connect(new StdioServerTransport());
137
82
  }
138
83
  function loadConfig() {
139
84
  const apiKey = process.env.TALENTOS_API_KEY?.trim();
140
- const rawUrl = process.env.TALENTOS_API_URL?.trim();
85
+ const rawUrl = process.env.TALENTOS_API_URL?.trim() || DEFAULT_API_URL;
141
86
  if (!apiKey) {
142
87
  exitWithConfigError("TALENTOS_API_KEY is not set. Create an API key in the TalentOS admin UI and pass it via the env block of your MCP client config.");
143
88
  }
144
- if (!rawUrl) {
145
- exitWithConfigError("TALENTOS_API_URL is not set. It must be the deployment's https://<name>.convex.site URL (not .convex.cloud).");
146
- }
147
89
  return { apiKey, baseUrl: rawUrl.replace(TRAILING_SLASHES, "") };
148
90
  }
149
91
  function exitWithConfigError(message) {
150
- process.stderr.write(`[talentos] ${message}\n`);
92
+ process.stderr.write(`[talentos-mcp] ${message}\n`);
151
93
  process.exit(1);
152
94
  }
153
95
  main().catch((error) => {
154
96
  const detail = error instanceof Error ? error.message : String(error);
155
- process.stderr.write(`[talentos] fatal: ${detail}\n`);
97
+ process.stderr.write(`[talentos-mcp] fatal: ${detail}\n`);
156
98
  process.exit(1);
157
99
  });
package/package.json CHANGED
@@ -1,9 +1,8 @@
1
1
  {
2
2
  "name": "talentos",
3
- "version": "0.1.0",
4
- "license": "MIT",
3
+ "version": "0.3.0",
5
4
  "type": "module",
6
- "description": "Stdio MCP server wrapping the TalentOS external HTTP API for workflow reads and draft writes.",
5
+ "description": "Stdio MCP server wrapping the TalentOS external HTTP API for workflow reads and private Skill writes.",
7
6
  "bin": {
8
7
  "talentos": "./dist/index.js"
9
8
  },
@@ -15,17 +14,17 @@
15
14
  },
16
15
  "scripts": {
17
16
  "start": "tsx src/index.ts",
18
- "build": "tsc -p tsconfig.build.json",
17
+ "build": "rm -rf dist && tsc -p tsconfig.build.json",
19
18
  "typecheck": "tsc --noEmit",
20
- "prepack": "npm run build"
19
+ "prepack": "rm -rf dist && tsc -p tsconfig.build.json"
21
20
  },
22
21
  "dependencies": {
23
22
  "@modelcontextprotocol/sdk": "^1.29.0",
24
23
  "zod": "^4.4.3"
25
24
  },
26
25
  "devDependencies": {
27
- "@types/node": "^26.1.0",
28
- "tsx": "^4.22.5",
26
+ "@types/node": "^22",
27
+ "tsx": "^4.21.0",
29
28
  "typescript": "^6.0.3"
30
29
  }
31
30
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 TalentOS
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.