lowdown-proxy 0.1.5 → 0.1.7

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.
Files changed (2) hide show
  1. package/dist/mcp-server.js +12 -1
  2. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
3
  import { z } from "zod";
4
+ import { getNodeId } from "./node-identity.js";
4
5
  const BASE_URL = process.env.LOWDOWN_API_URL ?? "https://lowdown-proxy.vercel.app";
6
+ const NODE_ID = getNodeId();
5
7
  const server = new McpServer({
6
8
  name: "lowdown",
7
9
  version: "0.1.0",
@@ -11,7 +13,7 @@ server.tool("get_lowdown", "Get the interaction history and reputation of an age
11
13
  "Call this before choosing between providers to make an informed decision.", {
12
14
  target: z.string().describe("Identifier of the agent/tool/service. e.g. 'mcp:vendor/tool-name' or 'agent:some-agent-id'"),
13
15
  }, async ({ target }) => {
14
- const res = await fetch(`${BASE_URL}/api/reputation/${encodeURIComponent(target)}`, { headers: { "x-lowdown-source": "organic" } });
16
+ const res = await fetch(`${BASE_URL}/api/reputation/${encodeURIComponent(target)}`, { headers: { "x-lowdown-source": "organic", "x-lowdown-node-id": NODE_ID } });
15
17
  const data = await res.json();
16
18
  return {
17
19
  content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
@@ -80,6 +82,15 @@ server.tool("compare_tools", "Compare multiple tools or agents by their recorded
80
82
  }],
81
83
  };
82
84
  });
85
+ // ── 4. get_node_stats ───────────────────────────────────────────
86
+ server.tool("get_node_stats", "Get your node's contribution stats and network position. " +
87
+ "Shows how much your proxy has contributed to the Lowdown network.", {}, async () => {
88
+ const res = await fetch(`${BASE_URL}/api/node/${encodeURIComponent(NODE_ID)}`, { headers: { "x-lowdown-source": "organic" } });
89
+ const data = await res.json();
90
+ return {
91
+ content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
92
+ };
93
+ });
83
94
  // ── 서버 시작 ───────────────────────────────────────────────────
84
95
  const transport = new StdioServerTransport();
85
96
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lowdown-proxy",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "mcpName": "io.github.PetShopBros/lowdown-proxy",
5
5
  "description": "Record and query AI agent/tool/service interactions. Shared reputation layer for the multi-agent ecosystem.",
6
6
  "type": "module",