@notus-os/mcp 0.1.22 → 1.0.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
@@ -1,105 +1,30 @@
1
- # @notus-os/mcp
1
+ # @notus-os/mcp (retired)
2
2
 
3
- Claude Code and remote MCP clients as an interface to notusOS. Published to npm; installed locally by strategists via `npx`.
4
-
5
- Admins get the full tool surface. Non-admin notusOS team members get read-only tools for every non-excluded client in organizations where they are a strategist; write workflows stay in notusOS. CS assignment remains available as a roster filter, but does not grant or remove access.
6
-
7
- Full documentation lives at [www.notusos.com/documentation](https://www.notusos.com/documentation).
8
- For the private Luca Wetzel workflow that creates scheduled Content Engine posts
9
- from structured call-breakdown packages, see
10
- [create_content_engine_post_package](https://www.notusos.com/documentation/create-content-engine-post-package).
11
-
12
- Remote MCP deploys with Railway from this package directory:
13
-
14
- ```bash
15
- railway up
16
- ```
17
-
18
- ## Quick start
19
-
20
- ```bash
21
- npx @notus-os/mcp login # opens a browser to authorize
22
- npx @notus-os/mcp status # shows "Logged in as ..."
23
- ```
24
-
25
- Then add to your Claude Code config:
26
-
27
- ```jsonc
28
- {
29
- "mcpServers": {
30
- "notusos": {
31
- "command": "npx",
32
- "args": ["@notus-os/mcp"]
33
- }
34
- }
35
- }
36
- ```
37
-
38
- Restart Claude Code. You should see the notusOS tools available.
39
-
40
- ## Remote connector server
41
-
42
- Run the Streamable HTTP server for Claude web / Team custom connectors:
43
-
44
- ```bash
45
- NOTUSOS_API_URL=https://app.notusos.com \
46
- NOTUSOS_AUTH_BASE_URL=https://app.notusos.com \
47
- NOTUSOS_MCP_PUBLIC_URL=https://mcp.notusos.com \
48
- PORT=8787 \
49
- npx @notus-os/mcp serve
50
- ```
51
-
52
- The connector URL is:
3
+ notusOS no longer runs from this package. Add notusOS to your AI app by URL:
53
4
 
54
5
  ```text
55
6
  https://mcp.notusos.com/mcp
56
7
  ```
57
8
 
58
- The remote server advertises OAuth protected-resource metadata at
59
- `/.well-known/oauth-protected-resource`; notusOS serves the authorization-code
60
- flow at `/oauth/authorize` and `/api/mcp/oauth/token`.
9
+ It signs in with your notus login, with nothing to install. The steps for Claude, Claude Code, ChatGPT, Cursor,
10
+ Codex and Gemini CLI are in notusOS Settings › MCP: https://app.notusos.com/settings?section=mcp
61
11
 
62
- For container deploys, use the **repository root** as the Railway Root Directory
63
- (the Dockerfile copies `shared/` + `apps/mcp-server/`). Its `Dockerfile` starts
64
- `notusos-mcp serve`. Automatic notusOS scheduling lives on the persistent
65
- `scheduled-clock` service; durable execution lives on `background-worker`.
12
+ Remove the old `npx @notus-os/mcp` entry first (in Claude Code, `claude mcp list` shows its name, usually
13
+ `notusos`; then `claude mcp remove notusos`), then add the URL as Settings › MCP shows.
66
14
 
67
- Required MCP env vars:
68
- - `NOTUSOS_API_URL` — notusOS app origin (e.g. `https://app.notusos.com`)
69
- - `NOTUSOS_AUTH_BASE_URL` — same as API URL in production
70
- - `NOTUSOS_MCP_PUBLIC_URL` — public MCP URL
15
+ ## What this version does
71
16
 
72
- ## Development
17
+ Version 1.0.0 is the last one. It reaches no notusOS data. An AI app that still starts it gets one tool,
18
+ `notusos_moved`, and server instructions that tell the person where to connect; any command (`login`, `status`,
19
+ `serve`) prints the same and exits 1. notusOS itself refuses every token the old CLI saved (revoked on
20
+ 2026-11-24) and mints no new ones for it, so older versions cannot connect either.
73
21
 
74
- ```bash
75
- npm install # from the repo root
76
- npm --prefix apps/mcp-server run dev # run from source via ts-node
77
- npm --prefix apps/mcp-server run typecheck
78
- npm --prefix apps/mcp-server run test
79
- npm --prefix apps/mcp-server run build
80
- NOTUSOS_MCP_PUBLIC_URL=http://127.0.0.1:8787 NOTUSOS_AUTH_BASE_URL=http://localhost:3000 npm --prefix apps/mcp-server run dev -- serve
81
- ```
22
+ ## Publishing (maintainers)
82
23
 
83
- Point at a local notusOS instance:
24
+ Published by hand from this folder, then every version is marked deprecated so installs show where to go:
84
25
 
85
26
  ```bash
86
- NOTUSOS_API_URL=http://localhost:3000 node dist/bin/notusos-mcp.js login
27
+ cd apps/mcp-server/npm-retired
28
+ npm publish --access public
29
+ npm deprecate @notus-os/mcp "Retired: add notusOS to your AI app by URL, https://mcp.notusos.com/mcp (steps: notusOS Settings › MCP)"
87
30
  ```
88
-
89
- ## Smoke test playbook
90
-
91
- After any change that affects auth or the tool surface, run through:
92
-
93
- 1. Mint a fresh token via `npx @notus-os/mcp login` against the target environment.
94
- 2. `npx @notus-os/mcp status` — confirms the token is stored.
95
- 3. Register in Claude Code (see config above) and restart.
96
- 4. In Claude Code, invoke the canary flow:
97
- - "list every client I can access" → `list_clients` returns clients across strategist organizations, including clients assigned to teammates
98
- - "give me the full picture for <client name>" → `get_client_detail` with a picked id
99
- - "which posts brought the most ICP people?" → `get_analytics_posts`, then `get_analytics_post_detail` for exact counts, signal records, and ICP buckets
100
- 5. Revoke in Settings → API Keys → retry any tool → expect a user-facing `AUTH_EXPIRED` with the "run notusos-mcp login" suggestion.
101
- 6. Impersonation boundary check: attempt to target a client whose org the strategist is not in → expect `FORBIDDEN`.
102
-
103
- ## Publishing
104
-
105
- Tag with `mcp-vX.Y.Z` on `main`. The `publish-mcp.yml` workflow will typecheck, test, build, and `npm publish --access public --provenance`. The workflow verifies the tag matches `package.json` before publishing.
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+ // The last @notus-os/mcp on npm. notusOS connects by URL (https://mcp.notusos.com/mcp), so this package
3
+ // reaches nothing: an AI app that still starts it gets one tool and server instructions that say where to
4
+ // connect instead, and any CLI command prints the same. No dependencies, so npx starts it at once.
5
+ import { createInterface } from 'node:readline'
6
+
7
+ const VERSION = '1.0.0'
8
+ // Kept equal to NOTUSOS_MCP_URL and NOTUSOS_MCP_SETTINGS_URL in shared/src/mcp/types.ts.
9
+ const SERVER_URL = 'https://mcp.notusos.com/mcp'
10
+ const STEPS_URL = 'https://app.notusos.com/settings?section=mcp'
11
+
12
+ const NOTE =
13
+ `The notusOS npm package (@notus-os/mcp) is retired and no longer reaches notusOS. ` +
14
+ `Remove it from your AI app and add notusOS by URL instead: ${SERVER_URL}. ` +
15
+ `Steps for each app: notusOS Settings › MCP (${STEPS_URL}).`
16
+
17
+ const INSTRUCTIONS =
18
+ `This server is the retired notusOS npm package. It has no notusOS tools and reaches no notusOS data. ` +
19
+ `When the user asks for anything in notusOS and no other notusOS tools are available, tell them: ${NOTE} ` +
20
+ `When notusOS tools from ${SERVER_URL} are available, use those, and suggest removing this retired entry from the app's MCP settings.`
21
+
22
+ const MOVED_TOOL = {
23
+ name: 'notusos_moved',
24
+ title: 'notusOS moved',
25
+ description:
26
+ `notusOS no longer runs from this npm package. Call this when the user asks for anything in notusOS and no other ` +
27
+ `notusOS tools are available; it does nothing in notusOS and answers how to connect the current notusOS server.`,
28
+ inputSchema: { type: 'object', properties: {} },
29
+ annotations: { readOnlyHint: true, openWorldHint: false },
30
+ }
31
+
32
+ // Any command (login, status, serve, --version) or a person running it in a terminal: say where to connect.
33
+ if (process.argv.length > 2 || process.stdin.isTTY) {
34
+ process.stderr.write(`${NOTE}\n`)
35
+ process.exit(1)
36
+ }
37
+
38
+ // Versions whose initialize, ping, tools/list and tools/call this server answers; 2025-03-26 also lets the
39
+ // client send a batch, which arrives as one array line and is answered as one.
40
+ const PROTOCOL_VERSIONS = ['2025-11-25', '2025-06-18', '2025-03-26', '2024-11-05']
41
+
42
+ /** One JSON-RPC message (or batch) per line on stdout, the MCP stdio framing. */
43
+ function write(payload) {
44
+ process.stdout.write(`${JSON.stringify(payload)}\n`)
45
+ }
46
+
47
+ /** The answer to one request, or undefined for a method this server does not have. */
48
+ function answer(method, params) {
49
+ switch (method) {
50
+ case 'initialize': {
51
+ const requested = params?.protocolVersion
52
+ return {
53
+ // The client's version when this server knows it, else the newest it knows (the client then decides).
54
+ protocolVersion: PROTOCOL_VERSIONS.includes(requested) ? requested : PROTOCOL_VERSIONS[0],
55
+ capabilities: { tools: {} },
56
+ serverInfo: { name: 'notusos-retired', title: 'notusOS (retired: connect by URL)', version: VERSION },
57
+ instructions: INSTRUCTIONS,
58
+ }
59
+ }
60
+ case 'ping':
61
+ return {}
62
+ case 'tools/list':
63
+ return { tools: [MOVED_TOOL] }
64
+ case 'tools/call':
65
+ return { content: [{ type: 'text', text: NOTE }], isError: true }
66
+ default:
67
+ return undefined
68
+ }
69
+ }
70
+
71
+ /** The response to one message, or undefined for a notification or a response, which carry no id to answer. */
72
+ function respond(message) {
73
+ if (!message || typeof message.method !== 'string' || message.id === undefined || message.id === null) return undefined
74
+ const result = answer(message.method, message.params)
75
+ return result === undefined
76
+ ? { jsonrpc: '2.0', id: message.id, error: { code: -32601, message: `Method not found: ${message.method}` } }
77
+ : { jsonrpc: '2.0', id: message.id, result }
78
+ }
79
+
80
+ const lines = createInterface({ input: process.stdin, crlfDelay: Infinity })
81
+ lines.on('line', (line) => {
82
+ if (!line.trim()) return
83
+ let message
84
+ try {
85
+ message = JSON.parse(line)
86
+ } catch {
87
+ write({ jsonrpc: '2.0', id: null, error: { code: -32700, message: 'Parse error' } })
88
+ return
89
+ }
90
+ if (Array.isArray(message)) {
91
+ const responses = message.map(respond).filter(Boolean)
92
+ if (responses.length > 0) write(responses)
93
+ return
94
+ }
95
+ const response = respond(message)
96
+ if (response) write(response)
97
+ })
98
+ lines.on('close', () => process.exit(0))
package/package.json CHANGED
@@ -1,35 +1,20 @@
1
1
  {
2
2
  "name": "@notus-os/mcp",
3
- "version": "0.1.22",
4
- "description": "notusOS MCP server — Claude Code as a full interface to notusOS",
3
+ "version": "1.0.0",
4
+ "description": "Retired. notusOS connects by URL: https://mcp.notusos.com/mcp (steps: notusOS Settings › MCP)",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
7
7
  "bin": {
8
- "notusos-mcp": "dist/bin/notusos-mcp.js"
8
+ "notusos-mcp": "bin/notusos-mcp.js"
9
9
  },
10
10
  "files": [
11
- "dist/bin/notusos-mcp.js",
11
+ "bin/notusos-mcp.js",
12
12
  "README.md"
13
13
  ],
14
+ "engines": {
15
+ "node": ">=18"
16
+ },
14
17
  "publishConfig": {
15
18
  "access": "public"
16
- },
17
- "scripts": {
18
- "build": "node scripts/build.mjs",
19
- "prepublishOnly": "npm run typecheck && npm run build",
20
- "dev": "node --loader ts-node/esm bin/notusos-mcp.ts",
21
- "typecheck": "tsc --noEmit",
22
- "test": "vitest run",
23
- "test:watch": "vitest"
24
- },
25
- "devDependencies": {
26
- "@modelcontextprotocol/sdk": "^1.0.4",
27
- "@types/node": "^20.11.0",
28
- "esbuild": "^0.24.0",
29
- "ts-node": "^10.9.2",
30
- "typescript": "^5.3.3",
31
- "undici": "^6.25.0",
32
- "vitest": "^2.1.9",
33
- "zod": "^4.4.3"
34
19
  }
35
20
  }