@pipeworx/mcp-phishtank 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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pipeworx
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # mcp-phishtank
2
+
3
+ PhishTank MCP — wraps PhishTank API (checkurl.phishtank.com)
4
+
5
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 965+ live data sources.
6
+
7
+ ## Tools
8
+
9
+ | Tool | Description |
10
+ |------|-------------|
11
+
12
+ ## Quick Start
13
+
14
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
15
+
16
+ ```json
17
+ {
18
+ "mcpServers": {
19
+ "phishtank": {
20
+ "url": "https://gateway.pipeworx.io/phishtank/mcp"
21
+ }
22
+ }
23
+ }
24
+ ```
25
+
26
+ Or connect to the full Pipeworx gateway for access to all 965+ data sources:
27
+
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "pipeworx": {
32
+ "url": "https://gateway.pipeworx.io/mcp"
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ ## Using with ask_pipeworx
39
+
40
+ Instead of calling tools directly, you can ask questions in plain English:
41
+
42
+ ```
43
+ ask_pipeworx({ question: "your question about Phishtank data" })
44
+ ```
45
+
46
+ The gateway picks the right tool and fills the arguments automatically.
47
+
48
+ ## More
49
+
50
+ - [All tools and guides](https://github.com/pipeworx-io/examples)
51
+ - [pipeworx.io](https://pipeworx.io)
52
+
53
+ ## License
54
+
55
+ MIT
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@pipeworx/mcp-phishtank",
3
+ "version": "0.1.0",
4
+ "description": "PhishTank MCP — wraps PhishTank API (checkurl.phishtank.com)",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "phishtank"],
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/pipeworx-io/mcp-phishtank"
13
+ },
14
+ "scripts": {
15
+ "typecheck": "tsc --noEmit"
16
+ },
17
+ "devDependencies": {
18
+ "typescript": "^5.7.0"
19
+ }
20
+ }
package/server.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.pipeworx-io/phishtank",
4
+ "title": "Phishtank",
5
+ "description": "PhishTank MCP — wraps PhishTank API (checkurl.phishtank.com)",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/phishtank",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-phishtank",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/phishtank/mcp"
16
+ }
17
+ ]
18
+ }
package/src/index.ts ADDED
@@ -0,0 +1,97 @@
1
+ interface McpToolDefinition {
2
+ name: string;
3
+ description: string;
4
+ inputSchema: {
5
+ type: 'object';
6
+ properties: Record<string, unknown>;
7
+ required?: string[];
8
+ };
9
+ }
10
+
11
+ interface McpToolExport {
12
+ tools: McpToolDefinition[];
13
+ callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
14
+ meter?: { credits: number };
15
+ cost?: Record<string, unknown>;
16
+ provider?: string;
17
+ }
18
+
19
+ /**
20
+ * PhishTank MCP — wraps PhishTank API (checkurl.phishtank.com)
21
+ *
22
+ * Free, no authentication required. Checks whether a URL is a known phishing site.
23
+ *
24
+ * Tools:
25
+ * - check_url: check if a URL is in the PhishTank phishing database
26
+ */
27
+
28
+
29
+ const BASE_URL = 'https://checkurl.phishtank.com/checkurl/';
30
+
31
+ const tools: McpToolExport['tools'] = [
32
+ {
33
+ name: 'check_url',
34
+ description:
35
+ 'Check if a URL is a known phishing site in the PhishTank database. Returns whether it is a phish, verification status, and details URL. Example: check_url("http://suspicious-site.example.com/login").',
36
+ inputSchema: {
37
+ type: 'object',
38
+ properties: {
39
+ url: {
40
+ type: 'string',
41
+ description: 'The full URL to check for phishing (e.g., "http://example.com/fake-login")',
42
+ },
43
+ },
44
+ required: ['url'],
45
+ },
46
+ },
47
+ ];
48
+
49
+ async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
50
+ switch (name) {
51
+ case 'check_url':
52
+ return checkUrl(args.url as string);
53
+ default:
54
+ throw new Error(`Unknown tool: ${name}`);
55
+ }
56
+ }
57
+
58
+ async function checkUrl(url: string) {
59
+ const res = await fetch(BASE_URL, {
60
+ method: 'POST',
61
+ headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
62
+ body: new URLSearchParams({
63
+ url,
64
+ format: 'json',
65
+ }).toString(),
66
+ });
67
+ if (!res.ok) throw new Error(`PhishTank API error: ${res.status}`);
68
+
69
+ const data = (await res.json()) as {
70
+ results: {
71
+ url: string;
72
+ in_database: boolean;
73
+ phish_id?: string;
74
+ phish_detail_page?: string;
75
+ verified?: boolean;
76
+ verified_at?: string;
77
+ valid?: boolean;
78
+ };
79
+ meta: {
80
+ timestamp: string;
81
+ };
82
+ };
83
+
84
+ const r = data.results;
85
+ return {
86
+ url: r.url,
87
+ in_database: r.in_database,
88
+ is_phish: r.in_database && r.valid === true,
89
+ phish_id: r.phish_id ?? null,
90
+ detail_page: r.phish_detail_page ?? null,
91
+ verified: r.verified ?? null,
92
+ verified_at: r.verified_at ?? null,
93
+ checked_at: data.meta.timestamp,
94
+ };
95
+ }
96
+
97
+ export default { tools, callTool, meter: { credits: 1 } } satisfies McpToolExport;
package/tsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "strict": true,
7
+ "esModuleInterop": true,
8
+ "skipLibCheck": true,
9
+ "outDir": "dist",
10
+ "rootDir": "src",
11
+ "declaration": true
12
+ },
13
+ "include": ["src"]
14
+ }