@kasarlabs/starknet-knowledge-mcp 0.1.1

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) 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,144 @@
1
+ # Starknet Knowledge MCP Server
2
+
3
+ A Model Context Protocol (MCP) server providing access to Starknet ecosystem knowledge and documentation via the Cairo Coder API.
4
+
5
+ ## Quick Start
6
+
7
+ Use this MCP server directly with npx:
8
+
9
+ ```bash
10
+ npx -y @kasarlabs/starknet-knowledge-mcp
11
+ ```
12
+
13
+ ## Configuration
14
+
15
+ The server supports two modes of operation:
16
+
17
+ ### Mode 1: Public Cairo Coder API (Default)
18
+
19
+ Use the official Cairo Coder API with your API key.
20
+
21
+ **Environment Variables:**
22
+
23
+ - `CAIRO_CODER_API_KEY`: Your Cairo Coder API key (required)
24
+
25
+ **MCP Client Setup:**
26
+
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "starknet-knowledge": {
31
+ "command": "npx",
32
+ "args": ["-y", "@kasarlabs/starknet-knowledge-mcp"],
33
+ "env": {
34
+ "CAIRO_CODER_API_KEY": "your-api-key-here"
35
+ }
36
+ }
37
+ }
38
+ }
39
+ ```
40
+
41
+ ### Mode 2: Local/Custom Endpoint
42
+
43
+ Use a local or custom Cairo Coder API endpoint (no API key required).
44
+
45
+ **Environment Variables:**
46
+
47
+ - `CAIRO_CODER_API_ENDPOINT`: Your local endpoint URL (e.g., "http://localhost:8000")
48
+
49
+ **MCP Client Setup:**
50
+
51
+ ```json
52
+ {
53
+ "mcpServers": {
54
+ "starknet-knowledge": {
55
+ "command": "npx",
56
+ "args": ["-y", "@kasarlabs/starknet-knowledge-mcp"],
57
+ "env": {
58
+ "CAIRO_CODER_API_ENDPOINT": "http://localhost:8000"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ > **Note:** When using `CAIRO_CODER_API_ENDPOINT`, the server automatically switches to local mode and no API key is required or used.
66
+
67
+ ## Available Tools
68
+
69
+ ### starknet_general_knowledge
70
+
71
+ Get information about the Starknet ecosystem, protocols, and general knowledge.
72
+
73
+ **Parameters:**
74
+
75
+ - `query` (string, required): Your question about Starknet ecosystem
76
+ - `context` (string, optional): Additional context or specific topic area
77
+
78
+ **Examples:**
79
+
80
+ ```typescript
81
+ // General ecosystem question
82
+ {
83
+ "query": "What are the main DEXs on Starknet?"
84
+ }
85
+
86
+ // Specific protocol information
87
+ {
88
+ "query": "How does AVNU handle token routing?",
89
+ "context": "I'm building a swap aggregator"
90
+ }
91
+ ```
92
+
93
+ ## What You Can Learn About
94
+
95
+ - **Starknet Ecosystem**: Protocols, dApps, and services on Starknet
96
+ - **DeFi Protocols**: Information about DEXs, lending platforms, and yield farming
97
+ - **Technical Concepts**: Understanding of Starknet-specific features and technologies
98
+ - **Recent Updates**: Latest news and developments in the Starknet ecosystem
99
+ - **Best Practices**: Recommendations based on ecosystem standards
100
+
101
+ ## Tips for Better Results
102
+
103
+ - Be specific about what aspect of the ecosystem you're interested in
104
+ - Mention specific protocols or concepts when relevant
105
+ - Provide context about your use case for more targeted responses
106
+ - Ask about recent developments or protocol comparisons
107
+
108
+ ## Development
109
+
110
+ ### Prerequisites
111
+
112
+ - Node.js >= 18
113
+ - npm or yarn
114
+
115
+ ### Local Installation
116
+
117
+ ```bash
118
+ git clone <repository-url>
119
+ cd ask-starknet/packages/mcps/starknet-knowledge
120
+ npm install
121
+ ```
122
+
123
+ ### Available Scripts
124
+
125
+ ```bash
126
+ npm run build # Build the project
127
+ npm run dev # Start in development mode
128
+ npm start # Start in production mode
129
+ ```
130
+
131
+ ## License
132
+
133
+ MIT
134
+
135
+ ## Support
136
+
137
+ For issues and questions:
138
+
139
+ - GitHub Issues: [Create an issue](https://github.com/kasarlabs/ask-starknet/issues)
140
+ - MCP Documentation: [Model Context Protocol](https://modelcontextprotocol.io/)
141
+
142
+ ## Contributing
143
+
144
+ Contributions are welcome! Please check the contribution guidelines before submitting a PR.
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ import 'dotenv/config';
3
+ /**
4
+ * MCP Server implementation for Cairo Coder API integration
5
+ * Provides AI-powered assistance for Cairo and Starknet development
6
+ */
7
+ declare class CairoCoderMCPServer {
8
+ private server;
9
+ private apiKey;
10
+ private apiUrl;
11
+ private isLocalMode;
12
+ /**
13
+ * Initializes the Cairo Coder MCP Server
14
+ * @throws {Error} If CAIRO_CODER_API_KEY environment variable is not set when using public API
15
+ */
16
+ constructor();
17
+ /**
18
+ * Sets up the tool handlers for the MCP server
19
+ * Configures both assist_with_cairo and starknet_general_knowledge tools
20
+ */
21
+ private setupToolHandlers;
22
+ /**
23
+ * Handles general Starknet knowledge requests by calling the Cairo Coder API
24
+ * @param args - The arguments containing query and optional conversation history
25
+ * @returns The response from the Cairo Coder API or an error message
26
+ */
27
+ private handleGeneralKnowledge;
28
+ /**
29
+ * Starts the MCP server with stdio transport
30
+ * @throws {Error} If the server fails to start
31
+ */
32
+ run(): Promise<void>;
33
+ }
34
+ export default CairoCoderMCPServer;
35
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AAoCvB;;;GAGG;AACH,cAAM,mBAAmB;IACvB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAU;IAE7B;;;OAGG;;IA+BH;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAmBzB;;;;OAIG;YACW,sBAAsB;IAuFpC;;;OAGG;IACG,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAW3B;AAgBD,eAAe,mBAAmB,CAAC"}
package/build/index.js ADDED
@@ -0,0 +1,161 @@
1
+ #!/usr/bin/env node
2
+ import 'dotenv/config';
3
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
5
+ import packageJson from '../package.json' with { type: 'json' };
6
+ import { starknetGeneralKnowledgeSchema, } from './schemas.js';
7
+ /**
8
+ * MCP Server implementation for Cairo Coder API integration
9
+ * Provides AI-powered assistance for Cairo and Starknet development
10
+ */
11
+ class CairoCoderMCPServer {
12
+ server;
13
+ apiKey;
14
+ apiUrl;
15
+ isLocalMode;
16
+ /**
17
+ * Initializes the Cairo Coder MCP Server
18
+ * @throws {Error} If CAIRO_CODER_API_KEY environment variable is not set when using public API
19
+ */
20
+ constructor() {
21
+ this.server = new McpServer({
22
+ name: 'starknet-knowledge-mcp',
23
+ version: packageJson.version,
24
+ });
25
+ // Check if local endpoint is specified
26
+ const localEndpoint = process.env.CAIRO_CODER_API_ENDPOINT;
27
+ if (localEndpoint) {
28
+ // Local mode: use custom endpoint, no API key required
29
+ this.isLocalMode = true;
30
+ this.apiUrl = `${localEndpoint}/v1/chat/completions`;
31
+ this.apiKey = '';
32
+ console.error(`Starknet-knowledge MCP server configured for local mode: ${this.apiUrl}`);
33
+ }
34
+ else {
35
+ // Public API mode: use official endpoint, API key required
36
+ this.isLocalMode = false;
37
+ this.apiUrl = 'https://api.cairo-coder.com/v1/chat/completions';
38
+ this.apiKey = process.env.CAIRO_CODER_API_KEY || '';
39
+ console.error('Starknet-knowledge MCP server configured for public API mode');
40
+ }
41
+ this.setupToolHandlers();
42
+ }
43
+ /**
44
+ * Sets up the tool handlers for the MCP server
45
+ * Configures both assist_with_cairo and starknet_general_knowledge tools
46
+ */
47
+ setupToolHandlers() {
48
+ this.server.tool('starknet_general_knowledge', `Provides general knowledge about the Starknet ecosystem, protocol concepts, recent updates, and news.
49
+
50
+ Call this tool when the user needs to:
51
+ - **Understand Starknet concepts** (account abstraction, sequencers, STARK proofs, etc.)
52
+ - **Discover ecosystem projects** and integrations
53
+ - **Get information from the Starknet blog**
54
+ - **Understand high-level architecture** and design decisions
55
+
56
+ This tool has access to Starknet blog posts, conceptual documentation, and ecosystem information.`, starknetGeneralKnowledgeSchema.shape, async (args) => {
57
+ return await this.handleGeneralKnowledge(args);
58
+ });
59
+ }
60
+ /**
61
+ * Handles general Starknet knowledge requests by calling the Cairo Coder API
62
+ * @param args - The arguments containing query and optional conversation history
63
+ * @returns The response from the Cairo Coder API or an error message
64
+ */
65
+ async handleGeneralKnowledge(args) {
66
+ try {
67
+ const { query, history } = args;
68
+ if (!query) {
69
+ throw new Error('Query parameter is required');
70
+ }
71
+ // Validate API key is available in public API mode
72
+ if (!this.isLocalMode && !this.apiKey) {
73
+ throw new Error('CAIRO_CODER_API_KEY environment variable is required when using public API');
74
+ }
75
+ // Add context to guide the backend towards general knowledge responses
76
+ let contextualMessage = `As a Starknet ecosystem expert, answer the following question about Starknet concepts, or general knowledge:\n\n${query}`;
77
+ if (history && history.length > 0) {
78
+ contextualMessage = `Previous conversation context:\n${history.join('\n')}\n\nCurrent query: ${contextualMessage}`;
79
+ }
80
+ const requestBody = {
81
+ messages: [
82
+ {
83
+ role: 'user',
84
+ content: contextualMessage,
85
+ },
86
+ ],
87
+ };
88
+ // Prepare headers based on mode
89
+ const headers = {
90
+ 'Content-Type': 'application/json',
91
+ mcp: 'true',
92
+ };
93
+ // Only add API key header in public API mode
94
+ if (!this.isLocalMode && this.apiKey) {
95
+ headers['x-api-key'] = this.apiKey;
96
+ }
97
+ const response = await fetch(this.apiUrl, {
98
+ method: 'POST',
99
+ headers,
100
+ body: JSON.stringify(requestBody),
101
+ });
102
+ if (!response.ok) {
103
+ const errorText = await response.text();
104
+ throw new Error(`API request failed: ${response.status} ${response.statusText} - ${errorText}`);
105
+ }
106
+ const data = (await response.json());
107
+ if (!data.choices || data.choices.length === 0) {
108
+ throw new Error('No response received from Cairo Coder API');
109
+ }
110
+ const assistantResponse = data.choices[0].message.content;
111
+ return {
112
+ content: [
113
+ {
114
+ type: 'text',
115
+ text: assistantResponse,
116
+ },
117
+ ],
118
+ };
119
+ }
120
+ catch (error) {
121
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
122
+ return {
123
+ content: [
124
+ {
125
+ type: 'text',
126
+ text: `Error: ${errorMessage}`,
127
+ },
128
+ ],
129
+ isError: true,
130
+ };
131
+ }
132
+ }
133
+ /**
134
+ * Starts the MCP server with stdio transport
135
+ * @throws {Error} If the server fails to start
136
+ */
137
+ async run() {
138
+ const transport = new StdioServerTransport();
139
+ console.error('Starknet-knowledge MCP server running on stdio');
140
+ await this.server.connect(transport);
141
+ // Handle graceful shutdown
142
+ process.on('SIGINT', async () => {
143
+ await this.server.close();
144
+ process.exit(0);
145
+ });
146
+ }
147
+ }
148
+ /**
149
+ * Main entry point for the application
150
+ * Creates and starts the Cairo Coder MCP server
151
+ */
152
+ async function main() {
153
+ const server = new CairoCoderMCPServer();
154
+ await server.run();
155
+ }
156
+ main().catch((error) => {
157
+ console.error('Fatal error in main():', error);
158
+ process.exit(1);
159
+ });
160
+ export default CairoCoderMCPServer;
161
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,WAAW,MAAM,iBAAiB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAChE,OAAO,EACL,8BAA8B,GAE/B,MAAM,cAAc,CAAC;AA6BtB;;;GAGG;AACH,MAAM,mBAAmB;IACf,MAAM,CAAY;IAClB,MAAM,CAAS;IACf,MAAM,CAAS;IACf,WAAW,CAAU;IAE7B;;;OAGG;IACH;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,SAAS,CAAC;YAC1B,IAAI,EAAE,wBAAwB;YAC9B,OAAO,EAAE,WAAW,CAAC,OAAO;SAC7B,CAAC,CAAC;QAEH,uCAAuC;QACvC,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;QAE3D,IAAI,aAAa,EAAE,CAAC;YAClB,uDAAuD;YACvD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;YACxB,IAAI,CAAC,MAAM,GAAG,GAAG,aAAa,sBAAsB,CAAC;YACrD,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;YACjB,OAAO,CAAC,KAAK,CACX,4DAA4D,IAAI,CAAC,MAAM,EAAE,CAC1E,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,2DAA2D;YAC3D,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;YACzB,IAAI,CAAC,MAAM,GAAG,iDAAiD,CAAC;YAChE,IAAI,CAAC,MAAM,GAAG,O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AO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAe;wBACrB,IAAI,EAAE,UAAU,YAAY,EAAE;qBAC/B;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,GAAG;QACP,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC7C,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;QAChE,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAErC,2BAA2B;QAC3B,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;YAC9B,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAC1B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED;;;GAGG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,mBAAmB,EAAE,CAAC;IACzC,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC;AACrB,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;AAEH,eAAe,mBAAmB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Schema for the starknet_general_knowledge tool
4
+ * Specialized for general Starknet ecosystem knowledge, concepts, and news
5
+ */
6
+ export declare const starknetGeneralKnowledgeSchema: z.ZodObject<{
7
+ query: z.ZodString;
8
+ history: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ query: string;
11
+ history?: string[] | undefined;
12
+ }, {
13
+ query: string;
14
+ history?: string[] | undefined;
15
+ }>;
16
+ export type StarknetGeneralKnowledgeInput = z.infer<typeof starknetGeneralKnowledgeSchema>;
17
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;EAYzC,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,8BAA8B,CACtC,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Schema for the starknet_general_knowledge tool
4
+ * Specialized for general Starknet ecosystem knowledge, concepts, and news
5
+ */
6
+ export const starknetGeneralKnowledgeSchema = z.object({
7
+ query: z
8
+ .string()
9
+ .describe("The user's question about Starknet ecosystem, concepts, recent updates, or general knowledge. This is for understanding the Starknet protocol, ecosystem projects, news, and high-level concepts (e.g., 'What are the latest updates in Starknet?' or 'Explain account abstraction in Starknet')."),
10
+ history: z
11
+ .array(z.string())
12
+ .optional()
13
+ .describe('Optional: The preceding conversation history. This can help the tool understand the context of the discussion and provide more accurate answers.'),
14
+ });
15
+ //# sourceMappingURL=schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,CACP,mSAAmS,CACpS;IACH,OAAO,EAAE,CAAC;SACP,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,QAAQ,EAAE;SACV,QAAQ,CACP,kJAAkJ,CACnJ;CACJ,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,72 @@
1
+ {
2
+ "name": "@kasarlabs/starknet-knowledge-mcp",
3
+ "version": "0.1.1",
4
+ "description": "MCP server for Starknet ecosystem knowledge and documentation",
5
+ "type": "module",
6
+ "main": "build/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "import": "./build/index.js",
10
+ "types": "./build/index.d.ts"
11
+ }
12
+ },
13
+ "bin": {
14
+ "starknet-knowledge-mcp": "./build/index.js"
15
+ },
16
+ "files": [
17
+ "build",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsc && chmod +x build/index.js",
23
+ "start": "node build/index.js",
24
+ "dev": "tsx src/index.ts",
25
+ "lint": "eslint src/**/*.ts",
26
+ "lint:fix": "eslint src/**/*.ts --fix",
27
+ "clean": "rm -rf build node_modules",
28
+ "prepublishOnly": "npm run clean && npm install && npm run build",
29
+ "test": "echo \"Error: no test specified\" && exit 1"
30
+ },
31
+ "keywords": [
32
+ "mcp",
33
+ "starknet",
34
+ "knowledge",
35
+ "documentation",
36
+ "ecosystem",
37
+ "blockchain",
38
+ "cli",
39
+ "npx"
40
+ ],
41
+ "author": "KasarLabs",
42
+ "license": "MIT",
43
+ "publishConfig": {
44
+ "access": "public"
45
+ },
46
+ "dependencies": {
47
+ "@modelcontextprotocol/sdk": "1.22.0",
48
+ "dotenv": "^16.5.0",
49
+ "zod": "^3.24.2"
50
+ },
51
+ "devDependencies": {
52
+ "@types/node": "^20.0.0",
53
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
54
+ "@typescript-eslint/parser": "^6.0.0",
55
+ "eslint": "^8.0.0",
56
+ "tsx": "^4.7.0",
57
+ "typescript": "^5.0.0"
58
+ },
59
+ "engines": {
60
+ "node": ">=18"
61
+ },
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "https://github.com/kasarlabs/ask-starknet",
65
+ "directory": "packages/mcps/starknet-knowledge"
66
+ },
67
+ "bugs": {
68
+ "url": "https://github.com/kasarlabs/ask-starknet/issues"
69
+ },
70
+ "homepage": "https://github.com/kasarlabs/ask-starknet/tree/main/packages/mcps/starknet-knowledge#readme",
71
+ "gitHead": "bfb4d4b055bbfa15b8e745d414adf52ac5e158fb"
72
+ }