New:Socket for Asana Is Now Available.Learn more
Get Started

tracetify-mcp

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tracetify-mcp - npm Package Compare versions

Comparing version
0.1.2
to
0.1.3
+3
-3
bin/tracetify-mcp.mjs

@@ -7,7 +7,7 @@ #!/usr/bin/env node

if (!apiKey) {
// 不退出:server 起来、工具列得出,调用时才在对话里给配置引导
console.error(
'TRACETIFY_API_KEY is not set.\n'
+ 'Create a key at https://tracetify.com/dashboard and add it to your MCP client config.'
'tracetify-mcp: TRACETIFY_API_KEY is not set — tools will return setup guidance.\n'
+ 'Create a key at https://tracetify.com/dashboard (AI & MCP page).'
);
process.exit(1);
}

@@ -14,0 +14,0 @@

{
"name": "tracetify-mcp",
"mcpName": "io.github.tracetify/tracetify-mcp",
"version": "0.1.2",
"version": "0.1.3",
"description": "MCP server for Tracetify — trace how any product actually grew, from inside Claude Code or Cursor.",

@@ -6,0 +6,0 @@ "keywords": [

@@ -16,2 +16,13 @@ /**

async function call(path, init = {}) {
// 没配 key 时 server 照常启动、工具照常列出——目录站的健康检查和
// 用户的 tools/list 都不该因为缺环境变量而看到一个死进程;引导
// 放在真正调用的那一刻,出现在宿主的对话里,比 stderr 里一行
// 没人看的报错有用得多
if (!apiKey) {
throw new Error(
'TRACETIFY_API_KEY is not set. Create a free key at https://tracetify.com/dashboard '
+ '(AI & MCP page) and add it to your MCP client config — reading the public report '
+ 'library costs nothing once connected.'
);
}
const res = await fetchImpl(`${baseUrl}${path}`, {

@@ -18,0 +29,0 @@ ...init,

@@ -63,2 +63,16 @@ import { describe, expect, it, vi } from 'vitest';

});
it('starts without an API key: tools list, calls return setup guidance', async () => {
const fetchImpl = vi.fn();
const server = createServer({ baseUrl: 'https://api.test', fetchImpl });
const client = new Client({ name: 'test', version: '0.0.0' });
const [a, b] = InMemoryTransport.createLinkedPair();
await Promise.all([server.connect(a), client.connect(b)]);
const { tools } = await client.listTools();
expect(tools).toHaveLength(4);
const res = await client.callTool({ name: 'search_reports', arguments: { query: 'x' } });
expect(res.isError).toBe(true);
expect(res.content[0].text).toContain('tracetify.com/dashboard');
expect(fetchImpl).not.toHaveBeenCalled();
});
});