@mmtr-tech/yandex-tracker-mcp 0.1.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/LICENSE +21 -0
- package/README.md +142 -0
- package/README.ru.md +142 -0
- package/dist/client/tracker-client.d.ts +185 -0
- package/dist/client/tracker-client.js +459 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +39 -0
- package/dist/tools/boards.d.ts +2 -0
- package/dist/tools/boards.js +46 -0
- package/dist/tools/index.d.ts +24 -0
- package/dist/tools/index.js +97 -0
- package/dist/tools/issue-extras.d.ts +2 -0
- package/dist/tools/issue-extras.js +256 -0
- package/dist/tools/issues.d.ts +2 -0
- package/dist/tools/issues.js +437 -0
- package/dist/tools/queues.d.ts +2 -0
- package/dist/tools/queues.js +103 -0
- package/dist/tools/users.d.ts +2 -0
- package/dist/tools/users.js +91 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +2 -0
- package/dist/utils/truncate.d.ts +20 -0
- package/dist/utils/truncate.js +38 -0
- package/package.json +60 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Default cap for large tool payloads returned to the MCP client. */
|
|
2
|
+
export const DEFAULT_MAX_CHARS = 80_000;
|
|
3
|
+
export function truncateText(text, maxChars = DEFAULT_MAX_CHARS) {
|
|
4
|
+
if (text.length <= maxChars) {
|
|
5
|
+
return {
|
|
6
|
+
text,
|
|
7
|
+
truncated: false,
|
|
8
|
+
original_length: text.length,
|
|
9
|
+
max_chars: maxChars,
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
const marker = `\n\n...[truncated: showing ${maxChars} of ${text.length} chars]`;
|
|
13
|
+
const budget = Math.max(0, maxChars - marker.length);
|
|
14
|
+
return {
|
|
15
|
+
text: text.slice(0, budget) + marker,
|
|
16
|
+
truncated: true,
|
|
17
|
+
original_length: text.length,
|
|
18
|
+
max_chars: maxChars,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/** Truncate a JSON-serializable value so stringify(result) stays under maxChars. */
|
|
22
|
+
export function truncatePayload(value, maxChars = DEFAULT_MAX_CHARS) {
|
|
23
|
+
const serialized = JSON.stringify(value, null, 2);
|
|
24
|
+
if (serialized.length <= maxChars) {
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
const hard = truncateText(serialized, maxChars);
|
|
28
|
+
return {
|
|
29
|
+
_truncated_json: hard.text,
|
|
30
|
+
_truncation: {
|
|
31
|
+
truncated: true,
|
|
32
|
+
original_length: serialized.length,
|
|
33
|
+
max_chars: maxChars,
|
|
34
|
+
note: 'Payload exceeded max_chars; returned truncated JSON in _truncated_json. Narrow the query.',
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=truncate.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mmtr-tech/yandex-tracker-mcp",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Model Context Protocol server for Yandex Tracker API (OAuth + Yandex 360)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"mmtr-yandex-tracker-mcp": "dist/index.js",
|
|
10
|
+
"yandex-tracker-mcp": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/**/*.js",
|
|
14
|
+
"dist/**/*.d.ts",
|
|
15
|
+
"README.md",
|
|
16
|
+
"README.ru.md",
|
|
17
|
+
"LICENSE"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc",
|
|
21
|
+
"watch": "tsc --watch",
|
|
22
|
+
"dev": "tsx src/index.ts",
|
|
23
|
+
"test": "vitest run",
|
|
24
|
+
"test:unit": "vitest run --config vitest.config.ts tests/unit",
|
|
25
|
+
"test:coverage": "vitest run --config vitest.config.ts tests/unit --coverage",
|
|
26
|
+
"test:watch": "vitest",
|
|
27
|
+
"typecheck": "tsc --noEmit",
|
|
28
|
+
"prepublishOnly": "npm run typecheck && npm run test:unit && npm run build"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"yandex-tracker",
|
|
32
|
+
"tracker",
|
|
33
|
+
"mcp",
|
|
34
|
+
"model-context-protocol",
|
|
35
|
+
"cursor",
|
|
36
|
+
"claude",
|
|
37
|
+
"mmtr-tech"
|
|
38
|
+
],
|
|
39
|
+
"author": "mmtr-tech",
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18.0.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
49
|
+
"axios": "^1.7.0",
|
|
50
|
+
"dotenv": "^17.4.2",
|
|
51
|
+
"zod": "^3.23.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^20.0.0",
|
|
55
|
+
"@vitest/coverage-v8": "^1.6.1",
|
|
56
|
+
"tsx": "^4.0.0",
|
|
57
|
+
"typescript": "^5.0.0",
|
|
58
|
+
"vitest": "^1.0.0"
|
|
59
|
+
}
|
|
60
|
+
}
|