@levitating/tensor-mcp 5.2.0 → 5.3.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/README.md +26 -5
- package/dist/index.js +14 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ decryption-device enrollment, the file access logs, the generic cross-surface
|
|
|
18
18
|
reasoning lives in `docs/contract/MCP.md` in the Tensor repo, and Tensor's
|
|
19
19
|
smoke tests assert those boundaries in both directions.
|
|
20
20
|
|
|
21
|
-
Published as [`@levitating/tensor-mcp@^5.
|
|
21
|
+
Published as [`@levitating/tensor-mcp@^5.3.0`](https://www.npmjs.com/package/@levitating/tensor-mcp).
|
|
22
22
|
The complete inventory is the tables below — every tool, nothing needing a
|
|
23
23
|
clone of the Tensor repo. CI derives and checks every listed name against
|
|
24
24
|
`mcp-server/tools.ts`, in both directions. Reader-facing docs:
|
|
@@ -86,7 +86,7 @@ Set two environment variables:
|
|
|
86
86
|
```bash
|
|
87
87
|
TENSOR_API_KEY=ak_live_xxxxxxxxxxxx \
|
|
88
88
|
TENSOR_BASE_URL=https://tensor.levitating.org \
|
|
89
|
-
npx -y @levitating/tensor-mcp@^5.
|
|
89
|
+
npx -y @levitating/tensor-mcp@^5.3.0
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
## Claude Code integration
|
|
@@ -99,7 +99,7 @@ Add to your `~/.claude.json` or project `.claude.json`:
|
|
|
99
99
|
"tensor": {
|
|
100
100
|
"type": "stdio",
|
|
101
101
|
"command": "npx",
|
|
102
|
-
"args": ["-y", "@levitating/tensor-mcp@^5.
|
|
102
|
+
"args": ["-y", "@levitating/tensor-mcp@^5.3.0"],
|
|
103
103
|
"env": {
|
|
104
104
|
"TENSOR_API_KEY": "ak_live_your_key_here",
|
|
105
105
|
"TENSOR_BASE_URL": "https://your-instance.example.com"
|
|
@@ -118,7 +118,7 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
|
|
|
118
118
|
"mcpServers": {
|
|
119
119
|
"tensor": {
|
|
120
120
|
"command": "npx",
|
|
121
|
-
"args": ["-y", "@levitating/tensor-mcp@^5.
|
|
121
|
+
"args": ["-y", "@levitating/tensor-mcp@^5.3.0"],
|
|
122
122
|
"env": {
|
|
123
123
|
"TENSOR_API_KEY": "ak_live_your_key_here",
|
|
124
124
|
"TENSOR_BASE_URL": "https://your-instance.example.com"
|
|
@@ -168,7 +168,7 @@ thing to go stale.
|
|
|
168
168
|
| `verify_market_quote` | Resolve one symbol to a live price without writing |
|
|
169
169
|
| `sync_prices` | Reprice every linked asset (or a subset) |
|
|
170
170
|
| `sync_asset_price` | Reprice one asset |
|
|
171
|
-
| `list_changes` | Creates, updates and deletes since a timestamp |
|
|
171
|
+
| `list_changes` | Creates, updates and deletes since a timestamp. You see only the types your scopes read: the ledger under `tensor:portfolio:read`, every other surface under its own read scope; memos, links, tags, loan and fund terms, FX and organisation settings never |
|
|
172
172
|
| `search_records` | Site-wide ranked search across every record type; lanes are gated per read scope, so the key sees exactly its slice. Memos are the one lane no scope opens — they are session-only |
|
|
173
173
|
|
|
174
174
|
### Portfolio
|
|
@@ -384,6 +384,27 @@ The Tensor user who issued the key is the ceiling: a key can never do more than
|
|
|
384
384
|
|
|
385
385
|
Newest first. A tool rename or removal is a MAJOR bump; new tools and new optional inputs are MINOR (`docs/contract/MCP.md` §6).
|
|
386
386
|
|
|
387
|
+
### 5.3.1 — `list_changes` says what a key can see
|
|
388
|
+
Wording only. Since 2026-11-05 the change feed behind `list_changes` leaves out
|
|
389
|
+
every row the key's scopes do not read (`docs/contract/DEVELOPER_API.md` §5A.4),
|
|
390
|
+
and the tool now says so: the ledger under `tensor:portfolio:read`, each other
|
|
391
|
+
surface under its own read scope, and memos, links, tags, loan and fund terms,
|
|
392
|
+
FX and organisation settings for no key. The behaviour is the server's and
|
|
393
|
+
reached the hosted `/mcp` with the deploy.
|
|
394
|
+
|
|
395
|
+
### 5.3.0 — The search vocabulary names browsing history
|
|
396
|
+
No new tool and no breaking change. `search_records` accepts `history` in
|
|
397
|
+
`types`, because browsing history (Web's History tab, `HIS-12`) is now one of
|
|
398
|
+
Tensor's record types and the enum mirrors the server's. Like `memo`, no key
|
|
399
|
+
reaches the lane — it answers only Tensor's own web app and Chrome extension —
|
|
400
|
+
so naming it changes nothing a key can see.
|
|
401
|
+
|
|
402
|
+
`update_position` also says what it records, wording only: a position edit
|
|
403
|
+
that changes quantity, average cost or a cash balance (or a fund's cost basis)
|
|
404
|
+
now appends an `adjustment` row to the ledger with the signed difference, so
|
|
405
|
+
the transaction history keeps explaining the position. `adjustment` rows appear in
|
|
406
|
+
`list_transactions`; no tool can post one.
|
|
407
|
+
|
|
387
408
|
### 5.2.0 — Income settles as cash or in kind
|
|
388
409
|
No new tool and no breaking change. `create_transaction` gains the `coupon`
|
|
389
410
|
type and an optional `settlement` input (`cash` | `in_kind`) for the three
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,11 @@ var SEARCH_RECORD_TYPES_MIRROR = [
|
|
|
69
69
|
// it generates SQL — it made two real lanes UNASKABLE, since a value this
|
|
70
70
|
// z.enum refuses never reaches the server at all.
|
|
71
71
|
"bookmark",
|
|
72
|
-
"tab"
|
|
72
|
+
"tab",
|
|
73
|
+
// BROWSING HISTORY (5.3.0). Spelled for the reason `memo` is: it is one of
|
|
74
|
+
// Tensor's record types, and this enum is the vocabulary. No key reaches it —
|
|
75
|
+
// the lane answers only Tensor's own web app and Chrome extension.
|
|
76
|
+
"history"
|
|
73
77
|
];
|
|
74
78
|
var IDEA_KINDS = ["link", "note", "image", "video"];
|
|
75
79
|
function tiptapDocJson(text) {
|
|
@@ -437,7 +441,7 @@ function registerAllTools(server2, api) {
|
|
|
437
441
|
);
|
|
438
442
|
server2.tool(
|
|
439
443
|
"update_position",
|
|
440
|
-
"Update an existing position (partial update). Requires the tensor:portfolio:write scope.",
|
|
444
|
+
"Update an existing position (partial update). Changing what the ledger measures \u2014 quantity, averageCost, a cash balance via currentValue, a capital account's costBasis \u2014 also appends one ledger row recording the difference, an `adjustment` with signed quantity and amount, so the transaction history still explains the position. Prefer create_transaction when you know the trade itself; use this to restate totals. Requires the tensor:portfolio:write scope.",
|
|
441
445
|
{
|
|
442
446
|
id: z.number().describe("Position ID to update"),
|
|
443
447
|
entityId: z.number().optional(),
|
|
@@ -584,8 +588,10 @@ function registerAllTools(server2, api) {
|
|
|
584
588
|
// and booked a phantom gain. mcp-server is a standalone npm package and
|
|
585
589
|
// deliberately does not import shared/schema (it would drag zod+drizzle
|
|
586
590
|
// into the published bundle), so the list is a literal — pinned against
|
|
587
|
-
//
|
|
588
|
-
// so it can never silently drift again.
|
|
591
|
+
// RECORDABLE_TRANSACTION_TYPE_KEYS by an assertion in
|
|
592
|
+
// script/smoke-clerk-api-keys.ts so it can never silently drift again.
|
|
593
|
+
// Recordable, not every key: `adjustment` is written by Tensor when a
|
|
594
|
+
// position is edited, and the server refuses it from any caller.
|
|
589
595
|
transactionType: z.string().describe("Ledger type. One of: buy, sell, deposit, withdrawal, interest, dividend, coupon, transfer_in, transfer_out, contribution, capital_call, distribution, return_of_capital, recallable_distribution, management_fee, write_off, borrow, repay, fee, loan_accrual, repayment_received. THIS FIELD, NOT THE SIGN OF ANY NUMBER, IS WHAT SETS DIRECTION. buy/contribution/capital_call update cost basis; sell/distribution realize gain; fee is logged with no P/L impact. INCOME \u2014 dividend, interest and coupon are one rule under three names: post them with `settlement` (see that field) and on the position that PAID the income. For loans YOU made: loan_accrual adds PIK interest to the balance (post amount 0), repayment_received records the borrower paying you back, interest first: the part that pays off accrued interest is booked as realized income and the rest is a return of capital with no gain \u2014 do NOT use sell/withdrawal for those. For fund LP interests (capital accounts, which have no units \u2014 post quantity 0 and put the money in amount): capital_call/contribution add paid-in capital, return_of_capital REDUCES cost basis and books no gain (use this, not distribution, for a GP returning your capital \u2014 distribution would invent a profit), recallable_distribution does the same but also restores unfunded commitment, distribution books profit, management_fee records a fee billed outside the fund (never record fees already netted inside the reported NAV \u2014 that double-counts them), write_off closes an UNDER-WATER wind-up: the fund returned less than it took, so the basis it could never return becomes a realized loss. Its AMOUNT IS DERIVED from the remaining cost basis and whatever you post is ignored \u2014 post 0. Use it only after the final return_of_capital, and only when the fund is genuinely finished; it zeroes the NAV and closes the position. It is not a distribution and never counts toward DPI or TVPI. A CAPITAL ACCOUNT ACCEPTS ONLY THOSE FUND TYPES. Posting a unitized type (buy, sell, deposit, borrow, \u2026) against a position that has a costBasis is REJECTED with a 400, because a fund has no units: a `buy 10 @ 100` would otherwise overwrite a GP-reported NAV of 1.4M with 1,000, and a `sell` would close the position outright with nothing in the app able to reopen it."),
|
|
590
596
|
quantity: z.number().describe('Units moved, as a POSITIVE magnitude \u2014 never negative. Direction comes from transactionType (a sell removes what a buy adds). Use 0 for cash and economic events that move no units: income with settlement "cash", fees, and every capital-account entry. Income with settlement "in_kind" posts the units received.'),
|
|
591
597
|
// Was documented as "positive for inflows, negative for outflows", which
|
|
@@ -954,7 +960,7 @@ function registerAllTools(server2, api) {
|
|
|
954
960
|
);
|
|
955
961
|
server2.tool(
|
|
956
962
|
"list_changes",
|
|
957
|
-
"What changed in this organization's data since a timestamp \u2014 creates, updates AND deletes, across both the CRUD routes and applied data batches. Use this to catch up incrementally instead of re-listing every table. Check `coverage.complete`: when false, the requested `since` predates the audit history and the delta cannot be trusted \u2014 do a full read instead. Resume the next poll from the returned `until`. The history is kept 90 days. Requires the tensor:portfolio:read scope.",
|
|
963
|
+
"What changed in this organization's data since a timestamp \u2014 creates, updates AND deletes, across both the CRUD routes and applied data batches. Use this to catch up incrementally instead of re-listing every table. Check `coverage.complete`: when false, the requested `since` predates the audit history and the delta cannot be trusted \u2014 do a full read instead. Resume the next poll from the returned `until`. The history is kept 90 days. Requires the tensor:portfolio:read scope, and you see only the changes your scopes can read: the ledger under portfolio:read, and each other surface only with its own read scope (reference, files, todos, ideas, bookmarks, tabs). Memos, links, tags, loan and fund terms, FX and organisation settings appear to no key, and another person's tab groups and browsing history never appear. A missing type means 'not yours to see', not 'unchanged'.",
|
|
958
964
|
{
|
|
959
965
|
since: z.number().optional().describe("Epoch-ms lower bound (exclusive). Omit or 0 for everything on record."),
|
|
960
966
|
limit: z.number().optional().describe("Max changes per page. Default 500."),
|
|
@@ -972,10 +978,10 @@ function registerAllTools(server2, api) {
|
|
|
972
978
|
);
|
|
973
979
|
server2.tool(
|
|
974
980
|
"search_records",
|
|
975
|
-
"Site-wide ranked search across every record type at once \u2014 entities, institutions, accounts, positions, assets, transactions, files, todos, ideas, bookmarks and parked tabs. Reference ids resolve directly: 'TSK-12' (todo), 'AS002' (asset), 'T042' (transaction), 'BMK-9' (bookmark). Lanes are scope-gated per key: each record type requires that domain's read scope (tensor:portfolio:read for the five ledger types, reference:read for institutions, files/todos/ideas/bookmarks/tabs:read for theirs). THE TAB LANE'S UNIT IS A TAB, NOT A GROUP \u2014 you search a title and get the parked page, though the thing you can restore or delete is its group. Memos are the
|
|
981
|
+
"Site-wide ranked search across every record type at once \u2014 entities, institutions, accounts, positions, assets, transactions, files, todos, ideas, bookmarks and parked tabs. Reference ids resolve directly: 'TSK-12' (todo), 'AS002' (asset), 'T042' (transaction), 'BMK-9' (bookmark). Lanes are scope-gated per key: each record type requires that domain's read scope (tensor:portfolio:read for the five ledger types, reference:read for institutions, files/todos/ideas/bookmarks/tabs:read for theirs). THE TAB LANE'S UNIT IS A TAB, NOT A GROUP \u2014 you search a title and get the parked page, though the thing you can restore or delete is its group. Memos and browsing history are the two record types NO key reaches: memos because they are session-only, history (pages a person visited, 'HIS-12') because it answers only Tensor's own web app and Chrome extension \u2014 no scope opens either lane. Lanes the key does not cover are silently omitted \u2014 the result is your slice of the org, not evidence the rest is empty \u2014 and a key covering no lane at all gets 403. Empty q returns no hits. Not for market tickers: that is search_market_quotes.",
|
|
976
982
|
{
|
|
977
983
|
q: z.string().describe("The query. Title, body and reference-id lanes, one ranking; short and literal works best."),
|
|
978
|
-
types: z.array(z.enum(SEARCH_RECORD_TYPES_MIRROR)).optional().describe("Restrict to these record types. Omit for all \u2014 transactions are excluded from the default set unless the query is a T-ref or you name them here explicitly. 'memo'
|
|
984
|
+
types: z.array(z.enum(SEARCH_RECORD_TYPES_MIRROR)).optional().describe("Restrict to these record types. Omit for all \u2014 transactions are excluded from the default set unless the query is a T-ref or you name them here explicitly. 'memo' and 'history' are spelled here because they are Tensor's record types, not because a key can search them: naming either adds nothing, and naming only those is the no-lane 403."),
|
|
979
985
|
limit: z.number().optional().describe("Max hits. Default 20, capped server-side."),
|
|
980
986
|
includeArchived: z.boolean().optional().describe("Include archived rows. Memos are the only lane left with an archive, and no key reaches that lane \u2014 so this flag moves nothing for an API key, and is kept because the HTTP parameter is documented and still meaningful to a session.")
|
|
981
987
|
},
|
|
@@ -2087,7 +2093,7 @@ function createApiClient(opts) {
|
|
|
2087
2093
|
// package.json
|
|
2088
2094
|
var package_default = {
|
|
2089
2095
|
name: "@levitating/tensor-mcp",
|
|
2090
|
-
version: "5.
|
|
2096
|
+
version: "5.3.1",
|
|
2091
2097
|
description: "Tensor MCP \u2014 Model Context Protocol server for the Tensor wealth management API. Exposes the Tensor API as tools for Claude, Cursor, Codex, and any MCP-aware client.",
|
|
2092
2098
|
type: "module",
|
|
2093
2099
|
main: "./dist/index.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levitating/tensor-mcp",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.1",
|
|
4
4
|
"description": "Tensor MCP — Model Context Protocol server for the Tensor wealth management API. Exposes the Tensor API as tools for Claude, Cursor, Codex, and any MCP-aware client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|