talentos 0.1.0 → 0.2.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
@@ -5,6 +5,9 @@ external HTTP API (`/api/v0/*`). Point any MCP-capable agent (Claude Code, Claud
5
5
  Desktop, Cursor, etc.) at it and the agent can read your org's workflows and
6
6
  nodes, then create or replace workflow drafts through the same API key.
7
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.
10
+
8
11
  It exposes six tools:
9
12
 
10
13
  - **`get_context`** (no arguments) — one compact org summary: company profile
@@ -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.2.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,7 +104,7 @@ 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
109
  4. **Ask the agent** to list your workflows, then create a draft:
131
110
 
package/dist/api.js CHANGED
@@ -15,11 +15,7 @@ export async function listWorkflows(config) {
15
15
  if ("error" in result) {
16
16
  return result.error;
17
17
  }
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
- : [];
18
+ const workflows = result.body.workflows ?? [];
23
19
  if (workflows.length === 0) {
24
20
  return textResult("No workflows are visible to this API key.");
25
21
  }
@@ -76,7 +72,7 @@ export async function listNodes(config) {
76
72
  if ("error" in result) {
77
73
  return result.error;
78
74
  }
79
- const nodes = Array.isArray(result.body.nodes) ? result.body.nodes : [];
75
+ const nodes = result.body.nodes ?? [];
80
76
  if (nodes.length === 0) {
81
77
  return textResult("No company nodes are published.");
82
78
  }
package/dist/index.js CHANGED
@@ -7,6 +7,10 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
7
7
  import { z } from "zod";
8
8
  import { createWorkflow, getContext, getWorkflow, listNodes, listWorkflows, updateWorkflow, } from "./api.js";
9
9
  const TRAILING_SLASHES = /\/+$/;
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";
10
14
  const WORKFLOW_STEP_SCHEMA = z.object({
11
15
  key: z.string().describe("Short kebab-case slug, unique per step."),
12
16
  title: z.string().describe("Short imperative phrase, at most 8 words."),
@@ -73,7 +77,7 @@ async function main() {
73
77
  const config = loadConfig();
74
78
  const server = new McpServer({
75
79
  name: "talentos",
76
- version: "0.1.0",
80
+ version: "0.0.0",
77
81
  });
78
82
  server.registerTool("list_workflows", {
79
83
  title: "List workflows",
@@ -137,21 +141,18 @@ async function main() {
137
141
  }
138
142
  function loadConfig() {
139
143
  const apiKey = process.env.TALENTOS_API_KEY?.trim();
140
- const rawUrl = process.env.TALENTOS_API_URL?.trim();
144
+ const rawUrl = process.env.TALENTOS_API_URL?.trim() || DEFAULT_API_URL;
141
145
  if (!apiKey) {
142
146
  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
147
  }
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
148
  return { apiKey, baseUrl: rawUrl.replace(TRAILING_SLASHES, "") };
148
149
  }
149
150
  function exitWithConfigError(message) {
150
- process.stderr.write(`[talentos] ${message}\n`);
151
+ process.stderr.write(`[talentos-mcp] ${message}\n`);
151
152
  process.exit(1);
152
153
  }
153
154
  main().catch((error) => {
154
155
  const detail = error instanceof Error ? error.message : String(error);
155
- process.stderr.write(`[talentos] fatal: ${detail}\n`);
156
+ process.stderr.write(`[talentos-mcp] fatal: ${detail}\n`);
156
157
  process.exit(1);
157
158
  });
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "talentos",
3
- "version": "0.1.0",
4
- "license": "MIT",
3
+ "version": "0.2.0",
5
4
  "type": "module",
6
5
  "description": "Stdio MCP server wrapping the TalentOS external HTTP API for workflow reads and draft writes.",
7
6
  "bin": {
@@ -15,9 +14,9 @@
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",
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.