@agent402-dev/check-mcp 0.1.0 → 0.2.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
@@ -4,7 +4,6 @@ MCP server (stdio) that returns **facts with evidence addresses** about a Solana
4
4
  It does not judge or rate tokens and gives no investment advice.
5
5
 
6
6
  > Factual information from public on-chain data. Not investment advice.
7
- > 공개 온체인 데이터에 따른 사실 정보이며 투자 권유가 아닙니다.
8
7
 
9
8
  Part of the [Agent402 toolkit](https://github.com/agent402-dev/agent402-toolkit) (Solana). Uses [`@agent402-dev/check-engine`](https://github.com/agent402-dev/agent402-toolkit/tree/main/packages/check-engine).
10
9
  Not related to `agent402.tools`, `@agents402` or other similarly named sites, accounts or projects, including projects named "a402" on other chains.
@@ -43,4 +42,4 @@ Token amounts in results are in the token's smallest unit (raw integer) unless t
43
42
  Apache-2.0. See [LICENSE](https://github.com/agent402-dev/agent402-toolkit/blob/main/LICENSE) and [NOTICE](https://github.com/agent402-dev/agent402-toolkit/blob/main/NOTICE).
44
43
 
45
44
  ---
46
- Factual information from public on-chain data. Not investment advice. / 공개 온체인 데이터에 따른 사실 정보이며 투자 권유가 아닙니다.
45
+ Factual information from public on-chain data. Not investment advice.
package/dist/server.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- // A402 Check MCP 서버 (stdio, 무료). 설정은 환경변수:
3
- // A402_CHECK_API — 호스팅 API 주소 (기본: 공개 Worker) — token_check_summary
4
- // A402_CHECK_RPC_URL — 자신의 Solana 메인넷 RPC — token_check (로컬 전체 리포트). 없으면 설정 방법만 안내
5
- // 결제 기능 없음. RPC 주소·키는 출력하지 않음 (stdout 은 MCP 프로토콜 전용)
2
+ // A402 Check MCP server (stdio, free). Configured with environment variables:
3
+ // A402_CHECK_API — hosted API address (default: public Worker) — token_check_summary
4
+ // A402_CHECK_RPC_URL — your own Solana mainnet RPC — token_check (full local report). If unset, only explains how to set it up
5
+ // No payment features. RPC addresses and keys are never printed (stdout is for the MCP protocol only)
6
6
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
7
7
  import { fetchChainReader } from '@agent402-dev/check-engine/rpc-lite';
8
8
  import { createServer, DEFAULT_API } from './tools.js';
package/dist/tools.d.ts CHANGED
@@ -3,9 +3,9 @@ import type { ChainReader, HistoryReader } from '@agent402-dev/check-engine/chai
3
3
  export declare const DEFAULT_API = "https://a402-check.agent402-ebc.workers.dev";
4
4
  export interface ToolDeps {
5
5
  apiBase: string;
6
- /** 호스팅 API 호출용 fetch */
6
+ /** fetch for calling the hosted API */
7
7
  fetch: typeof fetch;
8
- /** 로컬 전체 리포트용 판독기 (사용자 RPC). 없으면 token_check 는 설정 방법만 안내 */
8
+ /** Reader for the full local report (your RPC). If missing, token_check only explains how to set it up */
9
9
  reader: (() => ChainReader & HistoryReader) | null;
10
10
  now?: () => Date;
11
11
  }
@@ -17,7 +17,7 @@ type ToolResult = {
17
17
  isError?: boolean;
18
18
  };
19
19
  export declare function summaryTool(d: ToolDeps, mint: string): Promise<ToolResult>;
20
- /** 전체 리포트를 이 컴퓨터에서 실행 (사용자 RPC). RPC 주소·키는 응답·오류에 넣지 않음 */
20
+ /** Runs the full report on this computer (your RPC). RPC addresses and keys are never put in responses or errors */
21
21
  export declare function fullTool(d: ToolDeps, mint: string): Promise<ToolResult>;
22
22
  export declare function createServer(d: ToolDeps): McpServer;
23
23
  export {};
package/dist/tools.js CHANGED
@@ -1,13 +1,13 @@
1
- // A402 Check MCP 도구 (무료):
2
- // - token_check_summary: 호스팅 API 무료 요약 (항목 1~4, 키 불필요, IP 당 하루 20회)
3
- // - token_check: 사용자 자신의 Solana RPC 로 로컬에서 전체 리포트 (항목 1~8). 결제 없음
1
+ // A402 Check MCP tools (free):
2
+ // - token_check_summary: free summary from the hosted API (sections 1 to 4, no key needed, 20 per IP per day)
3
+ // - token_check: full report (sections 1 to 8) run locally with your own Solana RPC. No payment
4
4
  import { z } from 'zod';
5
5
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
6
6
  import { checkFull, LOCAL_LIMITS } from '@agent402-dev/check-engine/full';
7
7
  import { MintNotFoundError } from '@agent402-dev/check-engine/summary';
8
8
  import { NotAMintError } from '@agent402-dev/check-engine/mint';
9
9
  export const DEFAULT_API = 'https://a402-check.agent402-ebc.workers.dev';
10
- const DISCLAIMER = '공개 온체인 데이터에 따른 사실 정보이며 투자 권유가 아닙니다. / Factual information from public on-chain data. Not investment advice.';
10
+ const DISCLAIMER = 'Factual information from public on-chain data. Not investment advice.';
11
11
  const MINT = z.string().regex(/^[1-9A-HJ-NP-Za-km-z]{32,44}$/, 'Solana base58 mint address');
12
12
  const text = (obj, isError = false) => ({ content: [{ type: 'text', text: JSON.stringify(obj, null, 2) }], ...(isError ? { isError } : {}) });
13
13
  async function readJson(res) {
@@ -26,12 +26,12 @@ export async function summaryTool(d, mint) {
26
26
  return text(body);
27
27
  return text({ status: res.status, ...body, remainingToday: res.headers.get('x-ratelimit-remaining') }, true);
28
28
  }
29
- /** 전체 리포트를 이 컴퓨터에서 실행 (사용자 RPC). RPC 주소·키는 응답·오류에 넣지 않음 */
29
+ /** Runs the full report on this computer (your RPC). RPC addresses and keys are never put in responses or errors */
30
30
  export async function fullTool(d, mint) {
31
31
  if (!d.reader) {
32
32
  return text({
33
33
  error: 'rpc_not_configured',
34
- message: 'token_check 는 자신의 Solana 메인넷 RPC 로 이 컴퓨터에서 실행합니다 (무료). MCP 설정에 A402_CHECK_RPC_URL 을 넣으세요. 키 없는 공개 RPC 는 항목 5~8 에 쓰는 호출(getTokenLargestAccounts·getProgramAccounts)을 막는 경우가 많습니다. 항목 1~4 만 필요하면 token_check_summary 를 쓰세요',
34
+ message: 'token_check runs on this computer with your own Solana mainnet RPC (free). Add A402_CHECK_RPC_URL to your MCP settings. Public RPCs without a key often block the calls used for sections 5 to 8 (getTokenLargestAccounts, getProgramAccounts). If you only need sections 1 to 4, use token_check_summary',
35
35
  notes: [DISCLAIMER],
36
36
  }, true);
37
37
  }
@@ -41,10 +41,10 @@ export async function fullTool(d, mint) {
41
41
  }
42
42
  catch (e) {
43
43
  if (e instanceof MintNotFoundError)
44
- return text({ error: 'mint_not_found', message: '이 주소에 계정이 없습니다', notes: [DISCLAIMER] }, true);
44
+ return text({ error: 'mint_not_found', message: 'There is no account at this address', notes: [DISCLAIMER] }, true);
45
45
  if (e instanceof NotAMintError)
46
- return text({ error: 'not_a_mint', message: '이 주소는 SPL Token / Token-2022 민트가 아닙니다', notes: [DISCLAIMER] }, true);
47
- return text({ error: 'upstream_unavailable', message: '설정한 RPC 에서 온체인 데이터를 읽지 못했습니다. RPC 주소·요금제 한도를 확인하세요', notes: [DISCLAIMER] }, true);
46
+ return text({ error: 'not_a_mint', message: 'This address is not an SPL Token / Token-2022 mint', notes: [DISCLAIMER] }, true);
47
+ return text({ error: 'upstream_unavailable', message: 'Could not read on-chain data from the configured RPC. Check the RPC address and plan limits', notes: [DISCLAIMER] }, true);
48
48
  }
49
49
  }
50
50
  export function createServer(d) {
package/package.json CHANGED
@@ -20,10 +20,10 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@modelcontextprotocol/sdk": "1.32.2",
23
- "@agent402-dev/check-engine": "^0.1.0",
23
+ "@agent402-dev/check-engine": "^0.2.0",
24
24
  "zod": "^4.6.7"
25
25
  },
26
- "version": "0.1.0",
26
+ "version": "0.2.0",
27
27
  "author": "Agent402",
28
28
  "license": "Apache-2.0",
29
29
  "type": "module",