@pipeworx/mcp-dexscreener 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,61 @@
1
+ # mcp-dexscreener
2
+
3
+ DEX Screener MCP — DEX price/liquidity/volume data
4
+
5
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 250+ live data sources.
6
+
7
+ ## Tools
8
+
9
+ | Tool | Description |
10
+ |------|-------------|
11
+ | `get_pair` | Pair detail (price USD/native, liquidity, 24h volume, 5m/1h/6h/24h tx counts). |
12
+ | `get_token` | All trading pairs for a token address on one chain. |
13
+ | `search_pairs` | Free-text search across all chains. Returns up to 30 pairs. |
14
+ | `latest_token_profiles` | Newest token profiles created (cross-chain). |
15
+ | `latest_boosted_tokens` | Tokens being actively promoted on DEX Screener. |
16
+ | `token_boosts_top` | Most-boosted tokens, optionally filtered to a chain / token. |
17
+
18
+ ## Quick Start
19
+
20
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
21
+
22
+ ```json
23
+ {
24
+ "mcpServers": {
25
+ "dexscreener": {
26
+ "url": "https://gateway.pipeworx.io/dexscreener/mcp"
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ Or connect to the full Pipeworx gateway for access to all 250+ data sources:
33
+
34
+ ```json
35
+ {
36
+ "mcpServers": {
37
+ "pipeworx": {
38
+ "url": "https://gateway.pipeworx.io/mcp"
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ ## Using with ask_pipeworx
45
+
46
+ Instead of calling tools directly, you can ask questions in plain English:
47
+
48
+ ```
49
+ ask_pipeworx({ question: "your question about Dexscreener data" })
50
+ ```
51
+
52
+ The gateway picks the right tool and fills the arguments automatically.
53
+
54
+ ## More
55
+
56
+ - [All tools and guides](https://github.com/pipeworx-io/examples)
57
+ - [pipeworx.io](https://pipeworx.io)
58
+
59
+ ## License
60
+
61
+ MIT
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@pipeworx/mcp-dexscreener",
3
+ "version": "0.1.0",
4
+ "description": "DEX Screener MCP — DEX price/liquidity/volume data",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "dexscreener"],
9
+ "license": "MIT",
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/pipeworx-io/mcp-dexscreener"
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/dexscreener",
4
+ "title": "Dexscreener",
5
+ "description": "DEX Screener MCP — DEX price/liquidity/volume data",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/dexscreener",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-dexscreener",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/dexscreener/mcp"
16
+ }
17
+ ]
18
+ }
package/src/index.ts ADDED
@@ -0,0 +1,133 @@
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
+ * DEX Screener MCP — DEX price/liquidity/volume data
21
+ *
22
+ * Auth: none. ~300 req/min per IP.
23
+ * Docs: https://docs.dexscreener.com/api/reference
24
+ */
25
+
26
+
27
+ const BASE = 'https://api.dexscreener.com';
28
+ const LATEST = `${BASE}/latest/dex`;
29
+
30
+ const tools: McpToolExport['tools'] = [
31
+ {
32
+ name: 'get_pair',
33
+ description: 'Pair detail (price USD/native, liquidity, 24h volume, 5m/1h/6h/24h tx counts).',
34
+ inputSchema: {
35
+ type: 'object',
36
+ properties: {
37
+ chain: { type: 'string', description: 'Chain id — ethereum | solana | bsc | polygon | arbitrum | base | …' },
38
+ pair_address: { type: 'string', description: 'Pair / pool address' },
39
+ },
40
+ required: ['chain', 'pair_address'],
41
+ },
42
+ },
43
+ {
44
+ name: 'get_token',
45
+ description: 'All trading pairs for a token address on one chain.',
46
+ inputSchema: {
47
+ type: 'object',
48
+ properties: {
49
+ chain: { type: 'string', description: 'Chain id' },
50
+ token_address: { type: 'string', description: 'Token contract address' },
51
+ },
52
+ required: ['chain', 'token_address'],
53
+ },
54
+ },
55
+ {
56
+ name: 'search_pairs',
57
+ description: 'Free-text search across all chains. Returns up to 30 pairs.',
58
+ inputSchema: {
59
+ type: 'object',
60
+ properties: { query: { type: 'string' } },
61
+ required: ['query'],
62
+ },
63
+ },
64
+ {
65
+ name: 'latest_token_profiles',
66
+ description: 'Newest token profiles created (cross-chain).',
67
+ inputSchema: { type: 'object', properties: {} },
68
+ },
69
+ {
70
+ name: 'latest_boosted_tokens',
71
+ description: 'Tokens being actively promoted on DEX Screener.',
72
+ inputSchema: { type: 'object', properties: {} },
73
+ },
74
+ {
75
+ name: 'token_boosts_top',
76
+ description: 'Most-boosted tokens, optionally filtered to a chain / token.',
77
+ inputSchema: {
78
+ type: 'object',
79
+ properties: {
80
+ chain: { type: 'string' },
81
+ token: { type: 'string', description: 'Token address (chain required if passed)' },
82
+ },
83
+ },
84
+ },
85
+ ];
86
+
87
+ async function callTool(name: string, args: Record<string, unknown>): Promise<unknown> {
88
+ switch (name) {
89
+ case 'get_pair':
90
+ return dsGet(`${LATEST}/pairs/${encodeURIComponent(reqStr(args, 'chain', '"ethereum"'))}/${encodeURIComponent(reqStr(args, 'pair_address', '"0x..."'))}`);
91
+ case 'get_token':
92
+ return dsGet(`${LATEST}/tokens/${encodeURIComponent(reqStr(args, 'token_address', '"0x..."'))}/${encodeURIComponent(reqStr(args, 'chain', '"ethereum"'))}`);
93
+ case 'search_pairs':
94
+ return dsGet(`${LATEST}/search?q=${encodeURIComponent(reqStr(args, 'query', '"WETH"'))}`);
95
+ case 'latest_token_profiles':
96
+ return dsGet(`${BASE}/token-profiles/latest/v1`);
97
+ case 'latest_boosted_tokens':
98
+ return dsGet(`${BASE}/token-boosts/latest/v1`);
99
+ case 'token_boosts_top':
100
+ if (args.chain && args.token) {
101
+ return dsGet(`${BASE}/token-boosts/top/v1/${encodeURIComponent(String(args.chain))}/${encodeURIComponent(String(args.token))}`);
102
+ }
103
+ return dsGet(`${BASE}/token-boosts/top/v1`);
104
+ default:
105
+ throw new Error(`Unknown tool: ${name}`);
106
+ }
107
+ }
108
+
109
+ async function dsGet(url: string) {
110
+ const res = await fetch(url, {
111
+ headers: {
112
+ Accept: 'application/json',
113
+ 'User-Agent': 'pipeworx-mcp-dexscreener/1.0 (+https://pipeworx.io)',
114
+ },
115
+ });
116
+ if (res.status === 404) throw new Error('DEX Screener: not found');
117
+ if (res.status === 429) throw new Error('DEX Screener: rate-limit (HTTP 429)');
118
+ if (!res.ok) {
119
+ const t = await res.text();
120
+ throw new Error(`DEX Screener error: ${res.status} ${t.slice(0, 200)}`);
121
+ }
122
+ return res.json();
123
+ }
124
+
125
+ function reqStr(args: Record<string, unknown>, key: string, example: string): string {
126
+ const v = args[key];
127
+ if (typeof v !== 'string' || !v.trim()) {
128
+ throw new Error(`Required argument "${key}" is missing. Pass a string like ${example}.`);
129
+ }
130
+ return v;
131
+ }
132
+
133
+ 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
+ }