@kasarlabs/unruggable-mcp 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 +21 -0
- package/README.md +31 -0
- package/bin/unruggable-mcp.js +14 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +69 -0
- package/build/index.js.map +1 -0
- package/build/lib/abis/unruggableFactory.d.ts +92 -0
- package/build/lib/abis/unruggableFactory.js +512 -0
- package/build/lib/abis/unruggableFactory.js.map +1 -0
- package/build/lib/constants/index.d.ts +1 -0
- package/build/lib/constants/index.js +2 -0
- package/build/lib/constants/index.js.map +1 -0
- package/build/lib/dependances/types.d.ts +85 -0
- package/build/lib/dependances/types.js +51 -0
- package/build/lib/dependances/types.js.map +1 -0
- package/build/lib/utils/helper.d.ts +6 -0
- package/build/lib/utils/helper.js +12 -0
- package/build/lib/utils/helper.js.map +1 -0
- package/build/schemas/index.d.ts +135 -0
- package/build/schemas/index.js +73 -0
- package/build/schemas/index.js.map +1 -0
- package/build/tools/createMemecoin.d.ts +11 -0
- package/build/tools/createMemecoin.js +28 -0
- package/build/tools/createMemecoin.js.map +1 -0
- package/build/tools/getLockedLiquidity.d.ts +27 -0
- package/build/tools/getLockedLiquidity.js +48 -0
- package/build/tools/getLockedLiquidity.js.map +1 -0
- package/build/tools/isMemecoin.d.ts +11 -0
- package/build/tools/isMemecoin.js +22 -0
- package/build/tools/isMemecoin.js.map +1 -0
- package/build/tools/launchOnEkubo.d.ts +11 -0
- package/build/tools/launchOnEkubo.js +41 -0
- package/build/tools/launchOnEkubo.js.map +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kasar Labs
|
|
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,31 @@
|
|
|
1
|
+
# Snak - Unruggable Plugin
|
|
2
|
+
|
|
3
|
+
The Unruggable Plugin provides comprehensive tools for creating and managing memecoins on Starknet using the Unruggable protocol, which ensures fair launches with locked liquidity.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
This plugin adds the following tools:
|
|
8
|
+
|
|
9
|
+
- **is_memecoin**: Check if a given address is a memecoin created by the Unruggable Factory.
|
|
10
|
+
- **get_locked_liquidity**: Get locked liquidity information for a specific token.
|
|
11
|
+
- **create_memecoin**: Create a new memecoin using the Unruggable Factory with specified parameters.
|
|
12
|
+
- **launch_on_ekubo**: Launch a memecoin on Ekubo DEX with concentrated liquidity.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
The Unruggable Plugin is used internally by the Starknet Agent and doesn't need to be called directly. When the agent is initialized, it automatically registers these tools, making them available for use.
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
When asking the agent to perform Unruggable-related tasks, it will use the appropriate tool from this plugin:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
"Create a memecoin called PEPE with 1 million supply" // Uses create_memecoin
|
|
24
|
+
"Is this token an Unruggable memecoin?" // Uses is_memecoin
|
|
25
|
+
"Check the locked liquidity for this token" // Uses get_locked_liquidity
|
|
26
|
+
"Launch my memecoin on Ekubo" // Uses launch_on_ekubo
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Development
|
|
30
|
+
|
|
31
|
+
To extend this plugin, add new tools in the `src/tools` directory and register them in the `registerTools` function in `src/index.ts`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync } from 'fs';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
import { dirname, join } from 'path';
|
|
5
|
+
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const buildPath = join(__dirname, '..', 'build', 'index.js');
|
|
8
|
+
|
|
9
|
+
if (!existsSync(buildPath)) {
|
|
10
|
+
console.error('Build not found. Run: npm run build');
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
await import(buildPath);
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { registerToolsWithServer, getOnchainWrite, } from '@kasarlabs/ask-starknet-core';
|
|
5
|
+
import dotenv from 'dotenv';
|
|
6
|
+
import { contractAddressSchema, launchOnEkuboSchema, createMemecoinSchema, } from './schemas/index.js';
|
|
7
|
+
import { getLockedLiquidity } from './tools/getLockedLiquidity.js';
|
|
8
|
+
import { isMemecoin } from './tools/isMemecoin.js';
|
|
9
|
+
import { createMemecoin } from './tools/createMemecoin.js';
|
|
10
|
+
import { launchOnEkubo } from './tools/launchOnEkubo.js';
|
|
11
|
+
dotenv.config();
|
|
12
|
+
const server = new McpServer({
|
|
13
|
+
name: 'starknet-unruggable-mcp',
|
|
14
|
+
version: '0.0.1',
|
|
15
|
+
});
|
|
16
|
+
const registerTools = (UnruggableToolRegistry) => {
|
|
17
|
+
UnruggableToolRegistry.push({
|
|
18
|
+
name: 'is_memecoin',
|
|
19
|
+
description: 'Check if address is a memecoin',
|
|
20
|
+
schema: contractAddressSchema,
|
|
21
|
+
execute: async (params) => {
|
|
22
|
+
const onchainWrite = getOnchainWrite();
|
|
23
|
+
return await isMemecoin(onchainWrite, params);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
UnruggableToolRegistry.push({
|
|
27
|
+
name: 'get_locked_liquidity',
|
|
28
|
+
description: 'Get locked liquidity info for token',
|
|
29
|
+
schema: contractAddressSchema,
|
|
30
|
+
execute: async (params) => {
|
|
31
|
+
const onchainWrite = getOnchainWrite();
|
|
32
|
+
return await getLockedLiquidity(onchainWrite, params);
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
UnruggableToolRegistry.push({
|
|
36
|
+
name: 'create_memecoin',
|
|
37
|
+
description: 'Create a new memecoin using the Unruggable Factory',
|
|
38
|
+
schema: createMemecoinSchema,
|
|
39
|
+
execute: async (params) => {
|
|
40
|
+
const onchainWrite = getOnchainWrite();
|
|
41
|
+
return await createMemecoin(onchainWrite, params);
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
UnruggableToolRegistry.push({
|
|
45
|
+
name: 'launch_on_ekubo',
|
|
46
|
+
description: 'Launch a memecoin on Ekubo DEX with concentrated liquidity',
|
|
47
|
+
schema: launchOnEkuboSchema,
|
|
48
|
+
execute: async (params) => {
|
|
49
|
+
const onchainWrite = getOnchainWrite();
|
|
50
|
+
return await launchOnEkubo(onchainWrite, params);
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
};
|
|
54
|
+
export const RegisterToolInServer = async () => {
|
|
55
|
+
const tools = [];
|
|
56
|
+
registerTools(tools);
|
|
57
|
+
await registerToolsWithServer(server, tools);
|
|
58
|
+
};
|
|
59
|
+
async function main() {
|
|
60
|
+
const transport = new StdioServerTransport();
|
|
61
|
+
await RegisterToolInServer();
|
|
62
|
+
await server.connect(transport);
|
|
63
|
+
console.error('Starknet Unruggable MCP Server running on stdio');
|
|
64
|
+
}
|
|
65
|
+
main().catch((error) => {
|
|
66
|
+
console.error('Fatal error in main():', error);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAEL,uBAAuB,EACvB,eAAe,GAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;IAC3B,IAAI,EAAE,yBAAyB;IAC/B,OAAO,EAAE,OAAO;CACjB,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AAC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,IAAI,EAAE;IAC7C,MAAM,KAAK,GAAc,EAAE,CAAC;IAC5B,aAAa,CAAC,KAAK,CAAC,CAAC;IACrB,MAAM,uBAAuB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAE7C,MAAM,oBAAoB,EAAE,CAAC;IAC7B,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;AACnE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
export declare const FACTORY_ABI: ({
|
|
2
|
+
type: string;
|
|
3
|
+
name: string;
|
|
4
|
+
interface_name: string;
|
|
5
|
+
members?: undefined;
|
|
6
|
+
variants?: undefined;
|
|
7
|
+
items?: undefined;
|
|
8
|
+
inputs?: undefined;
|
|
9
|
+
kind?: undefined;
|
|
10
|
+
} | {
|
|
11
|
+
type: string;
|
|
12
|
+
name: string;
|
|
13
|
+
members: {
|
|
14
|
+
name: string;
|
|
15
|
+
type: string;
|
|
16
|
+
}[];
|
|
17
|
+
interface_name?: undefined;
|
|
18
|
+
variants?: undefined;
|
|
19
|
+
items?: undefined;
|
|
20
|
+
inputs?: undefined;
|
|
21
|
+
kind?: undefined;
|
|
22
|
+
} | {
|
|
23
|
+
type: string;
|
|
24
|
+
name: string;
|
|
25
|
+
variants: {
|
|
26
|
+
name: string;
|
|
27
|
+
type: string;
|
|
28
|
+
}[];
|
|
29
|
+
interface_name?: undefined;
|
|
30
|
+
members?: undefined;
|
|
31
|
+
items?: undefined;
|
|
32
|
+
inputs?: undefined;
|
|
33
|
+
kind?: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
type: string;
|
|
36
|
+
name: string;
|
|
37
|
+
items: {
|
|
38
|
+
type: string;
|
|
39
|
+
name: string;
|
|
40
|
+
inputs: {
|
|
41
|
+
name: string;
|
|
42
|
+
type: string;
|
|
43
|
+
}[];
|
|
44
|
+
outputs: {
|
|
45
|
+
type: string;
|
|
46
|
+
}[];
|
|
47
|
+
state_mutability: string;
|
|
48
|
+
}[];
|
|
49
|
+
interface_name?: undefined;
|
|
50
|
+
members?: undefined;
|
|
51
|
+
variants?: undefined;
|
|
52
|
+
inputs?: undefined;
|
|
53
|
+
kind?: undefined;
|
|
54
|
+
} | {
|
|
55
|
+
type: string;
|
|
56
|
+
name: string;
|
|
57
|
+
inputs: {
|
|
58
|
+
name: string;
|
|
59
|
+
type: string;
|
|
60
|
+
}[];
|
|
61
|
+
interface_name?: undefined;
|
|
62
|
+
members?: undefined;
|
|
63
|
+
variants?: undefined;
|
|
64
|
+
items?: undefined;
|
|
65
|
+
kind?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
type: string;
|
|
68
|
+
name: string;
|
|
69
|
+
kind: string;
|
|
70
|
+
members: {
|
|
71
|
+
name: string;
|
|
72
|
+
type: string;
|
|
73
|
+
kind: string;
|
|
74
|
+
}[];
|
|
75
|
+
interface_name?: undefined;
|
|
76
|
+
variants?: undefined;
|
|
77
|
+
items?: undefined;
|
|
78
|
+
inputs?: undefined;
|
|
79
|
+
} | {
|
|
80
|
+
type: string;
|
|
81
|
+
name: string;
|
|
82
|
+
kind: string;
|
|
83
|
+
variants: {
|
|
84
|
+
name: string;
|
|
85
|
+
type: string;
|
|
86
|
+
kind: string;
|
|
87
|
+
}[];
|
|
88
|
+
interface_name?: undefined;
|
|
89
|
+
members?: undefined;
|
|
90
|
+
items?: undefined;
|
|
91
|
+
inputs?: undefined;
|
|
92
|
+
})[];
|