From 0d65c71614d6f75bc428a3ea236e9ad81688d963 Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 09:15:21 +0100 Subject: [PATCH 01/18] feat: remove starknet-knowledge tool from cc-mcp --- packages/mcps/cairo-coder/src/index.ts | 119 +---------------------- packages/mcps/cairo-coder/src/schemas.ts | 24 +---- 2 files changed, 3 insertions(+), 140 deletions(-) diff --git a/packages/mcps/cairo-coder/src/index.ts b/packages/mcps/cairo-coder/src/index.ts index a44027c2..27513d26 100644 --- a/packages/mcps/cairo-coder/src/index.ts +++ b/packages/mcps/cairo-coder/src/index.ts @@ -6,9 +6,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js' import packageJson from '../package.json' with { type: 'json' }; import { assistWithCairoSchema, - type AssistWithCairoInput, - starknetGeneralKnowledgeSchema, - type StarknetGeneralKnowledgeInput, + type AssistWithCairoInput } from './schemas.js'; /** @@ -98,34 +96,13 @@ Call this tool when the user needs to: - **Understand Cairo syntax** and best practices - **Complete TODO sections** in Cairo smart contracts -This tool has access to Cairo documentation, code examples, corelib references, and technical guides. - -**Do NOT use this tool for general Starknet ecosystem questions or news.** Use starknet_general_knowledge instead.`, +This tool has access to Cairo documentation, code examples, corelib references, and technical guides.`, assistWithCairoSchema.shape, async (args: AssistWithCairoInput) => { return await this.handleCairoAssistance(args); } ); - // Tool 2: Starknet general knowledge - this.server.tool( - 'starknet_general_knowledge', - `Provides general knowledge about the Starknet ecosystem, protocol concepts, recent updates, and news. - -Call this tool when the user needs to: -- **Understand Starknet concepts** (account abstraction, sequencers, STARK proofs, etc.) -- **Discover ecosystem projects** and integrations -- **Get information from the Starknet blog** -- **Understand high-level architecture** and design decisions - -This tool has access to Starknet blog posts, conceptual documentation, and ecosystem information. - -**Do NOT use this tool for writing Cairo code.** Use assist_with_cairo instead.`, - starknetGeneralKnowledgeSchema.shape, - async (args: StarknetGeneralKnowledgeInput) => { - return await this.handleGeneralKnowledge(args); - } - ); } /** @@ -224,98 +201,6 @@ This tool has access to Starknet blog posts, conceptual documentation, and ecosy } } - /** - * Handles general Starknet knowledge requests by calling the Cairo Coder API - * @param args - The arguments containing query and optional conversation history - * @returns The response from the Cairo Coder API or an error message - */ - private async handleGeneralKnowledge(args: StarknetGeneralKnowledgeInput) { - try { - const { query, history } = args; - - if (!query) { - throw new Error('Query parameter is required'); - } - - // Validate API key is available in public API mode - if (!this.isLocalMode && !this.apiKey) { - throw new Error( - 'CAIRO_CODER_API_KEY environment variable is required when using public API' - ); - } - - // Add context to guide the backend towards general knowledge responses - let contextualMessage = `As a Starknet ecosystem expert, answer the following question about Starknet concepts, or general knowledge:\n\n${query}`; - - if (history && history.length > 0) { - contextualMessage = `Previous conversation context:\n${history.join('\n')}\n\nCurrent query: ${contextualMessage}`; - } - - const requestBody: CairoCoderRequest = { - messages: [ - { - role: 'user', - content: contextualMessage, - }, - ], - }; - - // Prepare headers based on mode - const headers: Record = { - 'Content-Type': 'application/json', - mcp: 'true', - }; - - // Only add API key header in public API mode - if (!this.isLocalMode && this.apiKey) { - headers['x-api-key'] = this.apiKey; - } - - const response = await fetch(this.apiUrl, { - method: 'POST', - headers, - body: JSON.stringify(requestBody), - }); - - if (!response.ok) { - const errorText = await response.text(); - throw new Error( - `API request failed: ${response.status} ${response.statusText} - ${errorText}` - ); - } - - const data = (await response.json()) as CairoCoderResponse; - - if (!data.choices || data.choices.length === 0) { - throw new Error('No response received from Cairo Coder API'); - } - - const assistantResponse = data.choices[0].message.content; - - return { - content: [ - { - type: 'text' as const, - text: assistantResponse, - }, - ], - }; - } catch (error) { - const errorMessage = - error instanceof Error ? error.message : 'Unknown error occurred'; - - return { - content: [ - { - type: 'text' as const, - text: `Error: ${errorMessage}`, - }, - ], - isError: true, - }; - } - } - /** * Starts the MCP server with stdio transport * @throws {Error} If the server fails to start diff --git a/packages/mcps/cairo-coder/src/schemas.ts b/packages/mcps/cairo-coder/src/schemas.ts index a35d1591..25b9e7a4 100644 --- a/packages/mcps/cairo-coder/src/schemas.ts +++ b/packages/mcps/cairo-coder/src/schemas.ts @@ -24,26 +24,4 @@ export const assistWithCairoSchema = z.object({ ), }); -export type AssistWithCairoInput = z.infer; - -/** - * Schema for the starknet_general_knowledge tool - * Specialized for general Starknet ecosystem knowledge, concepts, and news - */ -export const starknetGeneralKnowledgeSchema = z.object({ - query: z - .string() - .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')." - ), - history: z - .array(z.string()) - .optional() - .describe( - 'Optional: The preceding conversation history. This can help the tool understand the context of the discussion and provide more accurate answers.' - ), -}); - -export type StarknetGeneralKnowledgeInput = z.infer< - typeof starknetGeneralKnowledgeSchema ->; +export type AssistWithCairoInput = z.infer; \ No newline at end of file From 5778d8e0babbc0456afc7065260958543258dcf4 Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 09:24:12 +0100 Subject: [PATCH 02/18] feat: add src starknet-knowledge-mcp --- packages/mcps/starknet-knowledge/.env.example | 9 + packages/mcps/starknet-knowledge/.eslintrc.js | 23 ++ packages/mcps/starknet-knowledge/.gitignore | 86 +++++++ packages/mcps/starknet-knowledge/README.md | 152 ++++++++++++ packages/mcps/starknet-knowledge/package.json | 70 ++++++ packages/mcps/starknet-knowledge/src/index.ts | 227 ++++++++++++++++++ .../mcps/starknet-knowledge/src/schemas.ts | 23 ++ .../mcps/starknet-knowledge/tsconfig.json | 21 ++ pnpm-lock.yaml | 97 +++++--- 9 files changed, 675 insertions(+), 33 deletions(-) create mode 100644 packages/mcps/starknet-knowledge/.env.example create mode 100644 packages/mcps/starknet-knowledge/.eslintrc.js create mode 100644 packages/mcps/starknet-knowledge/.gitignore create mode 100644 packages/mcps/starknet-knowledge/README.md create mode 100644 packages/mcps/starknet-knowledge/package.json create mode 100644 packages/mcps/starknet-knowledge/src/index.ts create mode 100644 packages/mcps/starknet-knowledge/src/schemas.ts create mode 100644 packages/mcps/starknet-knowledge/tsconfig.json diff --git a/packages/mcps/starknet-knowledge/.env.example b/packages/mcps/starknet-knowledge/.env.example new file mode 100644 index 00000000..1d974827 --- /dev/null +++ b/packages/mcps/starknet-knowledge/.env.example @@ -0,0 +1,9 @@ +# Cairo Coder API Configuration +# Copy this file to .env and fill in your actual API key + +# Your Cairo Coder API key (required) +# Get it from: https://cairo-coder.com/ +# CAIRO_CODER_API_KEY=your-api-key-here + +# Your Cairo Coder Endpoint (if deployed locally) +CAIRO_CODER_API_ENDPOINT=http://localhost:3001 \ No newline at end of file diff --git a/packages/mcps/starknet-knowledge/.eslintrc.js b/packages/mcps/starknet-knowledge/.eslintrc.js new file mode 100644 index 00000000..46567e82 --- /dev/null +++ b/packages/mcps/starknet-knowledge/.eslintrc.js @@ -0,0 +1,23 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + extends: ['eslint:recommended', '@typescript-eslint/recommended'], + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', + }, + env: { + node: true, + es6: true, + }, + rules: { + // Personnalisez vos règles ici + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'warn', + 'prefer-const': 'error', + 'no-var': 'error', + }, + ignorePatterns: ['dist/', 'node_modules/', '*.js'], +}; diff --git a/packages/mcps/starknet-knowledge/.gitignore b/packages/mcps/starknet-knowledge/.gitignore new file mode 100644 index 00000000..494ca540 --- /dev/null +++ b/packages/mcps/starknet-knowledge/.gitignore @@ -0,0 +1,86 @@ +# Dependencies +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Build outputs +dist/ +build/ +*.tsbuildinfo + +# Environment variables +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Coverage directory used by tools like istanbul +coverage/ +*.lcov + +# nyc test coverage +.nyc_output + +# Dependency directories +node_modules/ +jspm_packages/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next + +# Nuxt.js build output +.nuxt + +# Storybook build outputs +.out +.storybook-out + +# Temporary folders +tmp/ +temp/ \ No newline at end of file diff --git a/packages/mcps/starknet-knowledge/README.md b/packages/mcps/starknet-knowledge/README.md new file mode 100644 index 00000000..6c37cefb --- /dev/null +++ b/packages/mcps/starknet-knowledge/README.md @@ -0,0 +1,152 @@ +
+ Cairo Coder MCP Logo + + [![npm version](https://img.shields.io/npm/v/@kasarlabs/cairo-coder-mcp.svg)](https://www.npmjs.com/package/@kasarlabs/cairo-coder-mcp) + [![npm downloads](https://img.shields.io/npm/dm/@kasarlabs/cairo-coder-mcp.svg)](https://www.npmjs.com/package/@kasarlabs/cairo-coder-mcp) + [![GitHub stars](https://img.shields.io/github/stars/kasarlabs/cairo-coder-mcp.svg)](https://github.com/kasarlabs/cairo-coder-mcp/stargazers) + [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +
+ +# Cairo Coder MCP Server + +A Model Context Protocol (MCP) server for Cairo and Starknet development assistance via the Cairo Coder API. + +## Quick Start + +Use this MCP server directly with npx: + +```bash +npx -y @kasarlabs/cairo-coder-mcp +``` + +## Configuration + +The server supports two modes of operation: + +### Mode 1: Public Cairo Coder API (Default) + +Use the official Cairo Coder API with your API key. + +**Environment Variables:** + +- `CAIRO_CODER_API_KEY`: Your Cairo Coder API key (required) + +**MCP Client Setup:** + +```json +{ + "mcpServers": { + "cairo-coder": { + "command": "npx", + "args": ["-y", "@kasarlabs/cairo-coder-mcp"], + "env": { + "CAIRO_CODER_API_KEY": "your-api-key-here" + } + } + } +} +``` + +### Mode 2: Local/Custom Endpoint + +Use a local or custom Cairo Coder API endpoint (no API key required). + +**Environment Variables:** + +- `CAIRO_CODER_API_ENDPOINT`: Your local endpoint URL (e.g., "http://localhost:8000") + +**MCP Client Setup:** + +```json +{ + "mcpServers": { + "cairo-coder": { + "command": "npx", + "args": ["-y", "@kasarlabs/cairo-coder-mcp"], + "env": { + "CAIRO_CODER_API_ENDPOINT": "http://localhost:8000" + } + } + } +} +``` + +> **Note:** When using `CAIRO_CODER_API_ENDPOINT`, the server automatically switches to local mode and no API key is required or used. + +## Available Tools + +### assist_with_cairo + +Get help with Cairo and Starknet development tasks. + +**Parameters:** + +- `query` (string, required): Your Cairo/Starknet development question +- `context` (string, optional): Additional context or code snippets + +**Examples:** + +```typescript +// Simple request +{ + "query": "Write a simple Cairo contract that implements a counter" +} + +// With context +{ + "query": "How can I optimize this contract?", + "context": "#[starknet::contract]\nmod Counter {\n // existing code here\n}" +} +``` + +## What You Can Do + +- **Write Cairo code**: Generate smart contracts and Cairo code +- **Refactor code**: Improve and optimize existing code +- **Implement features**: Complete TODOs and implement specific functionality +- **Learn Starknet**: Get contextual information about the Starknet ecosystem +- **Best practices**: Receive advice based on Cairo/Starknet documentation + +## Tips for Better Results + +- Use specific queries (e.g., "Using OpenZeppelin to build an ERC20" instead of just "ERC20") +- Include relevant code snippets when working with existing code +- Provide necessary context for more accurate responses + +## Development + +### Prerequisites + +- Node.js >= 18 +- npm or yarn + +### Local Installation + +```bash +git clone +cd cairo-coder-mcp +npm install +``` + +### Available Scripts + +```bash +npm run build # Build the project +npm run dev # Start in development mode +npm start # Start in production mode +``` + +## License + +MIT + +## Support + +For issues and questions: + +- GitHub Issues: [Create an issue](https://github.com/kasarlabs/cairo-coder-mcp/issues) +- MCP Documentation: [Model Context Protocol](https://modelcontextprotocol.io/) + +## Contributing + +Contributions are welcome! Please check the contribution guidelines before submitting a PR. diff --git a/packages/mcps/starknet-knowledge/package.json b/packages/mcps/starknet-knowledge/package.json new file mode 100644 index 00000000..4cef8122 --- /dev/null +++ b/packages/mcps/starknet-knowledge/package.json @@ -0,0 +1,70 @@ +{ + "name": "@kasarlabs/starknet-knowledge-mcp", + "version": "0.1.0", + "description": "MCP server to interact with the Cairo Coder API", + "type": "module", + "main": "build/index.js", + "exports": { + ".": { + "import": "./build/index.js", + "types": "./build/index.d.ts" + } + }, + "bin": { + "cairo-coder-mcp": "./build/index.js" + }, + "files": [ + "build", + "README.md", + "LICENSE" + ], + "scripts": { + "build": "tsc && chmod +x build/index.js", + "start": "node build/index.js", + "dev": "tsx src/index.ts", + "lint": "eslint src/**/*.ts", + "lint:fix": "eslint src/**/*.ts --fix", + "clean": "rm -rf build node_modules", + "prepublishOnly": "npm run clean && npm install && npm run build", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "mcp", + "cairo", + "starknet", + "blockchain", + "smart-contracts", + "cli", + "npx" + ], + "author": "KasarLabs", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "1.22.0", + "dotenv": "^16.5.0", + "zod": "^3.24.2" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.0.0", + "tsx": "^4.7.0", + "typescript": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "repository": { + "type": "git", + "url": "https://github.com/kasarlabs/ask-starknet", + "directory": "packages/mcps/cairo-coder" + }, + "bugs": { + "url": "https://github.com/kasarlabs/ask-starknet/issues" + }, + "homepage": "https://github.com/kasarlabs/ask-starknet/tree/main/packages/mcps/cairo-coder#readme" +} diff --git a/packages/mcps/starknet-knowledge/src/index.ts b/packages/mcps/starknet-knowledge/src/index.ts new file mode 100644 index 00000000..cef701be --- /dev/null +++ b/packages/mcps/starknet-knowledge/src/index.ts @@ -0,0 +1,227 @@ +#!/usr/bin/env node + +import 'dotenv/config'; +import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; +import packageJson from '../package.json' with { type: 'json' }; +import { + starknetGeneralKnowledgeSchema, + type StarknetGeneralKnowledgeInput, +} from './schemas.js'; + +/** + * Represents a message in the Cairo Coder conversation + */ +interface CairoCoderMessage { + role: 'user' | 'assistant' | 'system'; + content: string; +} + +/** + * Request payload for the Cairo Coder API + */ +interface CairoCoderRequest { + messages: CairoCoderMessage[]; +} + +/** + * Response from the Cairo Coder API + */ +interface CairoCoderResponse { + choices: Array<{ + message: { + content: string; + role: string; + }; + }>; +} + +/** + * MCP Server implementation for Cairo Coder API integration + * Provides AI-powered assistance for Cairo and Starknet development + */ +class CairoCoderMCPServer { + private server: McpServer; + private apiKey: string; + private apiUrl: string; + private isLocalMode: boolean; + + /** + * Initializes the Cairo Coder MCP Server + * @throws {Error} If CAIRO_CODER_API_KEY environment variable is not set when using public API + */ + constructor() { + this.server = new McpServer({ + name: 'cairo-coder-mcp', + version: packageJson.version, + }); + + // Check if local endpoint is specified + const localEndpoint = process.env.CAIRO_CODER_API_ENDPOINT; + + if (localEndpoint) { + // Local mode: use custom endpoint, no API key required + this.isLocalMode = true; + this.apiUrl = `${localEndpoint}/v1/chat/completions`; + this.apiKey = ''; + console.error( + `Cairo Coder MCP server configured for local mode: ${this.apiUrl}` + ); + } else { + // Public API mode: use official endpoint, API key required + this.isLocalMode = false; + this.apiUrl = 'https://api.cairo-coder.com/v1/chat/completions'; + this.apiKey = process.env.CAIRO_CODER_API_KEY || ''; + console.error('Cairo Coder MCP server configured for public API mode'); + } + + this.setupToolHandlers(); + } + + /** + * Sets up the tool handlers for the MCP server + * Configures both assist_with_cairo and starknet_general_knowledge tools + */ + private setupToolHandlers(): void { + this.server.tool( + 'starknet_general_knowledge', + `Provides general knowledge about the Starknet ecosystem, protocol concepts, recent updates, and news. + +Call this tool when the user needs to: +- **Understand Starknet concepts** (account abstraction, sequencers, STARK proofs, etc.) +- **Discover ecosystem projects** and integrations +- **Get information from the Starknet blog** +- **Understand high-level architecture** and design decisions + +This tool has access to Starknet blog posts, conceptual documentation, and ecosystem information.`, + starknetGeneralKnowledgeSchema.shape, + async (args: StarknetGeneralKnowledgeInput) => { + return await this.handleGeneralKnowledge(args); + } + ); + } + + /** + * Handles general Starknet knowledge requests by calling the Cairo Coder API + * @param args - The arguments containing query and optional conversation history + * @returns The response from the Cairo Coder API or an error message + */ + private async handleGeneralKnowledge(args: StarknetGeneralKnowledgeInput) { + try { + const { query, history } = args; + + if (!query) { + throw new Error('Query parameter is required'); + } + + // Validate API key is available in public API mode + if (!this.isLocalMode && !this.apiKey) { + throw new Error( + 'CAIRO_CODER_API_KEY environment variable is required when using public API' + ); + } + + // Add context to guide the backend towards general knowledge responses + let contextualMessage = `As a Starknet ecosystem expert, answer the following question about Starknet concepts, or general knowledge:\n\n${query}`; + + if (history && history.length > 0) { + contextualMessage = `Previous conversation context:\n${history.join('\n')}\n\nCurrent query: ${contextualMessage}`; + } + + const requestBody: CairoCoderRequest = { + messages: [ + { + role: 'user', + content: contextualMessage, + }, + ], + }; + + // Prepare headers based on mode + const headers: Record = { + 'Content-Type': 'application/json', + mcp: 'true', + }; + + // Only add API key header in public API mode + if (!this.isLocalMode && this.apiKey) { + headers['x-api-key'] = this.apiKey; + } + + const response = await fetch(this.apiUrl, { + method: 'POST', + headers, + body: JSON.stringify(requestBody), + }); + + if (!response.ok) { + const errorText = await response.text(); + throw new Error( + `API request failed: ${response.status} ${response.statusText} - ${errorText}` + ); + } + + const data = (await response.json()) as CairoCoderResponse; + + if (!data.choices || data.choices.length === 0) { + throw new Error('No response received from Cairo Coder API'); + } + + const assistantResponse = data.choices[0].message.content; + + return { + content: [ + { + type: 'text' as const, + text: assistantResponse, + }, + ], + }; + } catch (error) { + const errorMessage = + error instanceof Error ? error.message : 'Unknown error occurred'; + + return { + content: [ + { + type: 'text' as const, + text: `Error: ${errorMessage}`, + }, + ], + isError: true, + }; + } + } + + /** + * Starts the MCP server with stdio transport + * @throws {Error} If the server fails to start + */ + async run(): Promise { + const transport = new StdioServerTransport(); + console.error('Cairo Coder MCP server running on stdio'); + await this.server.connect(transport); + + // Handle graceful shutdown + process.on('SIGINT', async () => { + await this.server.close(); + process.exit(0); + }); + } +} + +/** + * Main entry point for the application + * Creates and starts the Cairo Coder MCP server + */ +async function main() { + const server = new CairoCoderMCPServer(); + await server.run(); +} + +main().catch((error) => { + console.error('Fatal error in main():', error); + process.exit(1); +}); + +export default CairoCoderMCPServer; diff --git a/packages/mcps/starknet-knowledge/src/schemas.ts b/packages/mcps/starknet-knowledge/src/schemas.ts new file mode 100644 index 00000000..bb32ee56 --- /dev/null +++ b/packages/mcps/starknet-knowledge/src/schemas.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +/** + * Schema for the starknet_general_knowledge tool + * Specialized for general Starknet ecosystem knowledge, concepts, and news + */ +export const starknetGeneralKnowledgeSchema = z.object({ + query: z + .string() + .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')." + ), + history: z + .array(z.string()) + .optional() + .describe( + 'Optional: The preceding conversation history. This can help the tool understand the context of the discussion and provide more accurate answers.' + ), +}); + +export type StarknetGeneralKnowledgeInput = z.infer< + typeof starknetGeneralKnowledgeSchema +>; diff --git a/packages/mcps/starknet-knowledge/tsconfig.json b/packages/mcps/starknet-knowledge/tsconfig.json new file mode 100644 index 00000000..206174e4 --- /dev/null +++ b/packages/mcps/starknet-knowledge/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Node", + "outDir": "./build", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "resolveJsonModule": true, + "verbatimModuleSyntax": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "build"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d2c898e..5a9c531c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -90,7 +90,7 @@ importers: version: 0.3.55(@browserbasehq/sdk@2.6.0(encoding@0.1.13))(@browserbasehq/stagehand@1.14.0(@playwright/test@1.55.0)(deepmerge@4.3.1)(dotenv@16.5.0)(encoding@0.1.13)(openai@5.12.2(ws@8.18.2)(zod@3.25.76))(zod@3.25.76))(@ibm-cloud/watsonx-ai@1.6.12)(@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(axios@1.12.2)(encoding@0.1.13)(fast-xml-parser@4.5.3)(handlebars@4.7.8)(ibm-cloud-sdk-core@5.4.2)(ignore@5.3.2)(jsonwebtoken@9.0.2)(openai@5.12.2(ws@8.18.2)(zod@3.25.76))(playwright@1.55.0)(weaviate-client@3.8.1(encoding@0.1.13))(ws@8.18.2) '@langchain/core': specifier: ^0.3.72 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@langchain/google-genai': specifier: ^0.2.18 version: 0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))) @@ -127,7 +127,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -158,7 +158,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -195,7 +195,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -226,7 +226,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -369,7 +369,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -400,7 +400,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -480,7 +480,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -514,10 +514,10 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: ^1.11.2 - version: 1.17.5 + version: 1.22.0(@cfworker/json-schema@4.1.1) dotenv: specifier: ^16.4.7 version: 16.5.0 @@ -567,7 +567,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -598,7 +598,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -629,7 +629,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -687,6 +687,37 @@ importers: specifier: ^5.8.2 version: 5.9.2 + packages/mcps/starknet-knowledge: + dependencies: + '@modelcontextprotocol/sdk': + specifier: 1.22.0 + version: 1.22.0(@cfworker/json-schema@4.1.1) + dotenv: + specifier: ^16.5.0 + version: 16.5.0 + zod: + specifier: ^3.24.2 + version: 3.25.76 + devDependencies: + '@types/node': + specifier: ^20.0.0 + version: 20.19.21 + '@typescript-eslint/eslint-plugin': + specifier: ^6.0.0 + version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2) + '@typescript-eslint/parser': + specifier: ^6.0.0 + version: 6.21.0(eslint@8.57.1)(typescript@5.9.2) + eslint: + specifier: ^8.0.0 + version: 8.57.1 + tsx: + specifier: ^4.7.0 + version: 4.20.6 + typescript: + specifier: ^5.0.0 + version: 5.9.2 + packages/mcps/starknet-rpc: dependencies: '@kasarlabs/ask-starknet-core': @@ -694,7 +725,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -725,7 +756,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -756,7 +787,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -784,7 +815,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -815,7 +846,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -6867,14 +6898,14 @@ snapshots: '@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))': dependencies: '@anthropic-ai/sdk': 0.56.0 - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) fast-xml-parser: 4.5.3 '@langchain/community@0.3.55(@browserbasehq/sdk@2.6.0(encoding@0.1.13))(@browserbasehq/stagehand@1.14.0(@playwright/test@1.55.0)(deepmerge@4.3.1)(dotenv@16.5.0)(encoding@0.1.13)(openai@5.12.2(ws@8.18.2)(zod@3.25.76))(zod@3.25.76))(@ibm-cloud/watsonx-ai@1.6.12)(@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(axios@1.12.2)(encoding@0.1.13)(fast-xml-parser@4.5.3)(handlebars@4.7.8)(ibm-cloud-sdk-core@5.4.2)(ignore@5.3.2)(jsonwebtoken@9.0.2)(openai@5.12.2(ws@8.18.2)(zod@3.25.76))(playwright@1.55.0)(weaviate-client@3.8.1(encoding@0.1.13))(ws@8.18.2)': dependencies: '@browserbasehq/stagehand': 1.14.0(@playwright/test@1.55.0)(deepmerge@4.3.1)(dotenv@16.5.0)(encoding@0.1.13)(openai@5.12.2(ws@8.18.2)(zod@3.25.76))(zod@3.25.76) '@ibm-cloud/watsonx-ai': 1.6.12 - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@langchain/openai': 0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(ws@8.18.2) '@langchain/weaviate': 0.2.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(encoding@0.1.13) binary-extensions: 2.3.0 @@ -6883,7 +6914,7 @@ snapshots: ibm-cloud-sdk-core: 5.4.2 js-yaml: 4.1.0 langchain: 0.3.33(@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(axios@1.12.2)(handlebars@4.7.8)(openai@5.12.2(ws@8.18.2)(zod@3.25.76))(ws@8.18.2) - langsmith: 0.3.67(openai@5.12.2(zod@3.25.76)) + langsmith: 0.3.67(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) openai: 5.12.2(ws@8.18.2)(zod@3.25.76) uuid: 10.0.0 zod: 3.25.76 @@ -6916,14 +6947,14 @@ snapshots: - handlebars - peggy - '@langchain/core@0.3.75(openai@5.12.2(zod@3.25.76))': + '@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))': dependencies: '@cfworker/json-schema': 4.1.1 ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.20 - langsmith: 0.3.67(openai@5.12.2(zod@3.25.76)) + langsmith: 0.3.67(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -6939,12 +6970,12 @@ snapshots: '@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))': dependencies: '@google/generative-ai': 0.24.1 - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) uuid: 11.1.0 '@langchain/langgraph-checkpoint@0.1.1(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))': dependencies: - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) uuid: 10.0.0 '@langchain/langgraph-sdk@0.1.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))': @@ -6954,11 +6985,11 @@ snapshots: p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@langchain/langgraph@0.4.9(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(zod-to-json-schema@3.24.5(zod@3.25.76))': dependencies: - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@langchain/langgraph-checkpoint': 0.1.1(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))) '@langchain/langgraph-sdk': 0.1.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))) uuid: 10.0.0 @@ -6983,7 +7014,7 @@ snapshots: '@langchain/openai@0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(ws@8.18.2)': dependencies: - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) js-tiktoken: 1.0.20 openai: 5.12.2(ws@8.18.2)(zod@3.25.76) zod: 3.25.76 @@ -6992,12 +7023,12 @@ snapshots: '@langchain/textsplitters@0.1.0(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))': dependencies: - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) js-tiktoken: 1.0.20 '@langchain/weaviate@0.2.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(encoding@0.1.13)': dependencies: - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) uuid: 10.0.0 weaviate-client: 3.8.1(encoding@0.1.13) transitivePeerDependencies: @@ -9866,13 +9897,13 @@ snapshots: langchain@0.3.33(@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(axios@1.12.2)(handlebars@4.7.8)(openai@5.12.2(ws@8.18.2)(zod@3.25.76))(ws@8.18.2): dependencies: - '@langchain/core': 0.3.75(openai@5.12.2(zod@3.25.76)) + '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) '@langchain/openai': 0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(ws@8.18.2) '@langchain/textsplitters': 0.1.0(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))) js-tiktoken: 1.0.20 js-yaml: 4.1.0 jsonpointer: 5.0.1 - langsmith: 0.3.67(openai@5.12.2(zod@3.25.76)) + langsmith: 0.3.67(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) openapi-types: 12.1.3 p-retry: 4.6.2 uuid: 10.0.0 @@ -9890,7 +9921,7 @@ snapshots: - openai - ws - langsmith@0.3.67(openai@5.12.2(zod@3.25.76)): + langsmith@0.3.67(openai@5.12.2(ws@8.18.2)(zod@3.25.76)): dependencies: '@types/uuid': 10.0.0 chalk: 4.1.2 From dd150199cb0684d6a14ad00623fca1a971fd0731 Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 09:38:43 +0100 Subject: [PATCH 03/18] feat: update readme, package json, mcps.json --- packages/mcp/mcps.json | 21 +++++- packages/mcp/mcps.local.json | 21 +++++- packages/mcps/cairo-coder/README.md | 6 +- packages/mcps/starknet-knowledge/README.md | 64 ++++++++----------- packages/mcps/starknet-knowledge/package.json | 13 ++-- 5 files changed, 75 insertions(+), 50 deletions(-) diff --git a/packages/mcp/mcps.json b/packages/mcp/mcps.json index 7f7facad..8c59e4da 100644 --- a/packages/mcp/mcps.json +++ b/packages/mcp/mcps.json @@ -444,10 +444,25 @@ "CAIRO_CODER_API_KEY": "" } }, - "description": "AI-powered Cairo code assistance and Starknet general knowledge via Cairo Coder API", + "description": "AI-powered Cairo code writing, generation, refactoring, debugging and implementation assistance. Use for: writing contracts, fixing compilation errors, implementing features, optimizing code, explaining Cairo syntax", "promptInfo": { - "expertise": "Cairo smart contract development, Starknet technical documentation, ecosystem knowledge, and recent Starknet news", - "tools": ["assist_with_cairo", "starknet_general_knowledge"] + "expertise": "Cairo smart contract code generation, refactoring, debugging, syntax, implementation patterns, and Cairo/Starknet programming best practices. NOT for general ecosystem questions", + "tools": ["assist_with_cairo"] + } + }, + "starknet-knowledge": { + "client": { + "command": "npx", + "args": ["-y", "@kasarlabs/starknet-knowledge-mcp@latest"], + "transport": "stdio", + "env": { + "CAIRO_CODER_API_KEY": "" + } + }, + "description": "Starknet ecosystem general knowledge and documentation. Use for: learning about protocols (AVNU, Ekubo, etc.), understanding dApps, discovering ecosystem projects and community, getting protocol explanations, recent Starknet news. NOT for writing code", + "promptInfo": { + "expertise": "Starknet ecosystem protocols, community, dApps, services, technical concepts, architecture explanations, protocol comparisons, recent updates, and general non-coding knowledge. NOT for code generation", + "tools": ["starknet_general_knowledge"] } }, "mcp-doc": { diff --git a/packages/mcp/mcps.local.json b/packages/mcp/mcps.local.json index fb097645..3be82a12 100644 --- a/packages/mcp/mcps.local.json +++ b/packages/mcp/mcps.local.json @@ -429,10 +429,25 @@ "CAIRO_CODER_API_KEY": "" } }, - "description": "AI-powered Cairo code assistance and Starknet general knowledge via Cairo Coder API", + "description": "AI-powered Cairo code writing, generation, refactoring, debugging and implementation assistance. Use for: writing contracts, fixing compilation errors, implementing features, optimizing code, explaining Cairo syntax", "promptInfo": { - "expertise": "Cairo smart contract development, Starknet technical documentation, ecosystem knowledge, and recent Starknet news", - "tools": ["assist_with_cairo", "starknet_general_knowledge"] + "expertise": "Cairo smart contract code generation, refactoring, debugging, syntax, implementation patterns, and Cairo/Starknet programming best practices. NOT for general ecosystem questions", + "tools": ["assist_with_cairo"] + } + }, + "starknet-knowledge": { + "client": { + "command": "node", + "args": ["../mcps/starknet-knowledge/build/index.js"], + "transport": "stdio", + "env": { + "CAIRO_CODER_API_KEY": "" + } + }, + "description": "Starknet ecosystem general knowledge and documentation. Use for: learning about protocols (AVNU, Ekubo, etc.), understanding dApps, discovering ecosystem projects and community, getting protocol explanations, recent Starknet news. NOT for writing code", + "promptInfo": { + "expertise": "Starknet ecosystem protocols, community, dApps, services, technical concepts, architecture explanations, protocol comparisons, recent updates, and general non-coding knowledge. NOT for code generation", + "tools": ["starknet_general_knowledge"] } }, "troves": { diff --git a/packages/mcps/cairo-coder/README.md b/packages/mcps/cairo-coder/README.md index 6c37cefb..0f76b56a 100644 --- a/packages/mcps/cairo-coder/README.md +++ b/packages/mcps/cairo-coder/README.md @@ -77,7 +77,7 @@ Use a local or custom Cairo Coder API endpoint (no API key required). ### assist_with_cairo -Get help with Cairo and Starknet development tasks. +Get AI-powered assistance with Cairo and Starknet development tasks. **Parameters:** @@ -104,9 +104,11 @@ Get help with Cairo and Starknet development tasks. - **Write Cairo code**: Generate smart contracts and Cairo code - **Refactor code**: Improve and optimize existing code - **Implement features**: Complete TODOs and implement specific functionality -- **Learn Starknet**: Get contextual information about the Starknet ecosystem +- **Debug issues**: Get help troubleshooting Cairo compilation and runtime errors - **Best practices**: Receive advice based on Cairo/Starknet documentation +> **Note**: For general Starknet ecosystem knowledge and protocol information, use the [@kasarlabs/starknet-knowledge-mcp](https://www.npmjs.com/package/@kasarlabs/starknet-knowledge-mcp) server instead. + ## Tips for Better Results - Use specific queries (e.g., "Using OpenZeppelin to build an ERC20" instead of just "ERC20") diff --git a/packages/mcps/starknet-knowledge/README.md b/packages/mcps/starknet-knowledge/README.md index 6c37cefb..17db89ca 100644 --- a/packages/mcps/starknet-knowledge/README.md +++ b/packages/mcps/starknet-knowledge/README.md @@ -1,22 +1,13 @@ -
- Cairo Coder MCP Logo - - [![npm version](https://img.shields.io/npm/v/@kasarlabs/cairo-coder-mcp.svg)](https://www.npmjs.com/package/@kasarlabs/cairo-coder-mcp) - [![npm downloads](https://img.shields.io/npm/dm/@kasarlabs/cairo-coder-mcp.svg)](https://www.npmjs.com/package/@kasarlabs/cairo-coder-mcp) - [![GitHub stars](https://img.shields.io/github/stars/kasarlabs/cairo-coder-mcp.svg)](https://github.com/kasarlabs/cairo-coder-mcp/stargazers) - [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -
+# Starknet Knowledge MCP Server -# Cairo Coder MCP Server - -A Model Context Protocol (MCP) server for Cairo and Starknet development assistance via the Cairo Coder API. +A Model Context Protocol (MCP) server providing access to Starknet ecosystem knowledge and documentation via the Cairo Coder API. ## Quick Start Use this MCP server directly with npx: ```bash -npx -y @kasarlabs/cairo-coder-mcp +npx -y @kasarlabs/starknet-knowledge-mcp ``` ## Configuration @@ -36,9 +27,9 @@ Use the official Cairo Coder API with your API key. ```json { "mcpServers": { - "cairo-coder": { + "starknet-knowledge": { "command": "npx", - "args": ["-y", "@kasarlabs/cairo-coder-mcp"], + "args": ["-y", "@kasarlabs/starknet-knowledge-mcp"], "env": { "CAIRO_CODER_API_KEY": "your-api-key-here" } @@ -60,9 +51,9 @@ Use a local or custom Cairo Coder API endpoint (no API key required). ```json { "mcpServers": { - "cairo-coder": { + "starknet-knowledge": { "command": "npx", - "args": ["-y", "@kasarlabs/cairo-coder-mcp"], + "args": ["-y", "@kasarlabs/starknet-knowledge-mcp"], "env": { "CAIRO_CODER_API_ENDPOINT": "http://localhost:8000" } @@ -75,43 +66,44 @@ Use a local or custom Cairo Coder API endpoint (no API key required). ## Available Tools -### assist_with_cairo +### starknet_general_knowledge -Get help with Cairo and Starknet development tasks. +Get information about the Starknet ecosystem, protocols, and general knowledge. **Parameters:** -- `query` (string, required): Your Cairo/Starknet development question -- `context` (string, optional): Additional context or code snippets +- `query` (string, required): Your question about Starknet ecosystem +- `context` (string, optional): Additional context or specific topic area **Examples:** ```typescript -// Simple request +// General ecosystem question { - "query": "Write a simple Cairo contract that implements a counter" + "query": "What are the main DEXs on Starknet?" } -// With context +// Specific protocol information { - "query": "How can I optimize this contract?", - "context": "#[starknet::contract]\nmod Counter {\n // existing code here\n}" + "query": "How does AVNU handle token routing?", + "context": "I'm building a swap aggregator" } ``` -## What You Can Do +## What You Can Learn About -- **Write Cairo code**: Generate smart contracts and Cairo code -- **Refactor code**: Improve and optimize existing code -- **Implement features**: Complete TODOs and implement specific functionality -- **Learn Starknet**: Get contextual information about the Starknet ecosystem -- **Best practices**: Receive advice based on Cairo/Starknet documentation +- **Starknet Ecosystem**: Protocols, dApps, and services on Starknet +- **DeFi Protocols**: Information about DEXs, lending platforms, and yield farming +- **Technical Concepts**: Understanding of Starknet-specific features and technologies +- **Recent Updates**: Latest news and developments in the Starknet ecosystem +- **Best Practices**: Recommendations based on ecosystem standards ## Tips for Better Results -- Use specific queries (e.g., "Using OpenZeppelin to build an ERC20" instead of just "ERC20") -- Include relevant code snippets when working with existing code -- Provide necessary context for more accurate responses +- Be specific about what aspect of the ecosystem you're interested in +- Mention specific protocols or concepts when relevant +- Provide context about your use case for more targeted responses +- Ask about recent developments or protocol comparisons ## Development @@ -124,7 +116,7 @@ Get help with Cairo and Starknet development tasks. ```bash git clone -cd cairo-coder-mcp +cd ask-starknet/packages/mcps/starknet-knowledge npm install ``` @@ -144,7 +136,7 @@ MIT For issues and questions: -- GitHub Issues: [Create an issue](https://github.com/kasarlabs/cairo-coder-mcp/issues) +- GitHub Issues: [Create an issue](https://github.com/kasarlabs/ask-starknet/issues) - MCP Documentation: [Model Context Protocol](https://modelcontextprotocol.io/) ## Contributing diff --git a/packages/mcps/starknet-knowledge/package.json b/packages/mcps/starknet-knowledge/package.json index 4cef8122..e18abb0e 100644 --- a/packages/mcps/starknet-knowledge/package.json +++ b/packages/mcps/starknet-knowledge/package.json @@ -1,7 +1,7 @@ { "name": "@kasarlabs/starknet-knowledge-mcp", "version": "0.1.0", - "description": "MCP server to interact with the Cairo Coder API", + "description": "MCP server for Starknet ecosystem knowledge and documentation", "type": "module", "main": "build/index.js", "exports": { @@ -11,7 +11,7 @@ } }, "bin": { - "cairo-coder-mcp": "./build/index.js" + "starknet-knowledge-mcp": "./build/index.js" }, "files": [ "build", @@ -30,10 +30,11 @@ }, "keywords": [ "mcp", - "cairo", "starknet", + "knowledge", + "documentation", + "ecosystem", "blockchain", - "smart-contracts", "cli", "npx" ], @@ -61,10 +62,10 @@ "repository": { "type": "git", "url": "https://github.com/kasarlabs/ask-starknet", - "directory": "packages/mcps/cairo-coder" + "directory": "packages/mcps/starknet-knowledge" }, "bugs": { "url": "https://github.com/kasarlabs/ask-starknet/issues" }, - "homepage": "https://github.com/kasarlabs/ask-starknet/tree/main/packages/mcps/cairo-coder#readme" + "homepage": "https://github.com/kasarlabs/ask-starknet/tree/main/packages/mcps/starknet-knowledge#readme" } From 829b1fee9025505672c6051dddf6d1b2dc5e486f Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 09:40:18 +0100 Subject: [PATCH 04/18] feat: version to 0.0.1 and name mcp server in index --- packages/mcps/starknet-knowledge/package.json | 2 +- packages/mcps/starknet-knowledge/src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mcps/starknet-knowledge/package.json b/packages/mcps/starknet-knowledge/package.json index e18abb0e..c59deb9e 100644 --- a/packages/mcps/starknet-knowledge/package.json +++ b/packages/mcps/starknet-knowledge/package.json @@ -1,6 +1,6 @@ { "name": "@kasarlabs/starknet-knowledge-mcp", - "version": "0.1.0", + "version": "0.0.1", "description": "MCP server for Starknet ecosystem knowledge and documentation", "type": "module", "main": "build/index.js", diff --git a/packages/mcps/starknet-knowledge/src/index.ts b/packages/mcps/starknet-knowledge/src/index.ts index cef701be..e686a220 100644 --- a/packages/mcps/starknet-knowledge/src/index.ts +++ b/packages/mcps/starknet-knowledge/src/index.ts @@ -52,7 +52,7 @@ class CairoCoderMCPServer { */ constructor() { this.server = new McpServer({ - name: 'cairo-coder-mcp', + name: 'starknet-knowledge-mcp', version: packageJson.version, }); @@ -100,7 +100,7 @@ This tool has access to Starknet blog posts, conceptual documentation, and ecosy } ); } - + /** * Handles general Starknet knowledge requests by calling the Cairo Coder API * @param args - The arguments containing query and optional conversation history From fc9bcaad56bcbfd95ea23291e768cae550a4d4f3 Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 09:56:55 +0100 Subject: [PATCH 05/18] prettier --- packages/mcps/cairo-coder/src/index.ts | 6 +----- packages/mcps/cairo-coder/src/schemas.ts | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/mcps/cairo-coder/src/index.ts b/packages/mcps/cairo-coder/src/index.ts index 27513d26..94882d90 100644 --- a/packages/mcps/cairo-coder/src/index.ts +++ b/packages/mcps/cairo-coder/src/index.ts @@ -4,10 +4,7 @@ import 'dotenv/config'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import packageJson from '../package.json' with { type: 'json' }; -import { - assistWithCairoSchema, - type AssistWithCairoInput -} from './schemas.js'; +import { assistWithCairoSchema, type AssistWithCairoInput } from './schemas.js'; /** * Represents a message in the Cairo Coder conversation @@ -102,7 +99,6 @@ This tool has access to Cairo documentation, code examples, corelib references, return await this.handleCairoAssistance(args); } ); - } /** diff --git a/packages/mcps/cairo-coder/src/schemas.ts b/packages/mcps/cairo-coder/src/schemas.ts index 25b9e7a4..7b9918ef 100644 --- a/packages/mcps/cairo-coder/src/schemas.ts +++ b/packages/mcps/cairo-coder/src/schemas.ts @@ -24,4 +24,4 @@ export const assistWithCairoSchema = z.object({ ), }); -export type AssistWithCairoInput = z.infer; \ No newline at end of file +export type AssistWithCairoInput = z.infer; From 462a607ca4d8c54a7ea482505e80a73889931266 Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 10:40:40 +0100 Subject: [PATCH 06/18] fix: logs --- packages/mcps/starknet-knowledge/src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mcps/starknet-knowledge/src/index.ts b/packages/mcps/starknet-knowledge/src/index.ts index e686a220..aaf5198e 100644 --- a/packages/mcps/starknet-knowledge/src/index.ts +++ b/packages/mcps/starknet-knowledge/src/index.ts @@ -65,14 +65,14 @@ class CairoCoderMCPServer { this.apiUrl = `${localEndpoint}/v1/chat/completions`; this.apiKey = ''; console.error( - `Cairo Coder MCP server configured for local mode: ${this.apiUrl}` + `Starknet-knowledge MCP server configured for local mode: ${this.apiUrl}` ); } else { // Public API mode: use official endpoint, API key required this.isLocalMode = false; this.apiUrl = 'https://api.cairo-coder.com/v1/chat/completions'; this.apiKey = process.env.CAIRO_CODER_API_KEY || ''; - console.error('Cairo Coder MCP server configured for public API mode'); + console.error('Starknet-knowledge MCP server configured for public API mode'); } this.setupToolHandlers(); @@ -199,7 +199,7 @@ This tool has access to Starknet blog posts, conceptual documentation, and ecosy */ async run(): Promise { const transport = new StdioServerTransport(); - console.error('Cairo Coder MCP server running on stdio'); + console.error('Starknet-knowledge MCP server running on stdio'); await this.server.connect(transport); // Handle graceful shutdown From 30b308719d18dd63210c19f53bcf2f08fcccc456 Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 10:42:03 +0100 Subject: [PATCH 07/18] prettier --- packages/mcps/starknet-knowledge/src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/mcps/starknet-knowledge/src/index.ts b/packages/mcps/starknet-knowledge/src/index.ts index aaf5198e..c128a312 100644 --- a/packages/mcps/starknet-knowledge/src/index.ts +++ b/packages/mcps/starknet-knowledge/src/index.ts @@ -72,7 +72,9 @@ class CairoCoderMCPServer { this.isLocalMode = false; this.apiUrl = 'https://api.cairo-coder.com/v1/chat/completions'; this.apiKey = process.env.CAIRO_CODER_API_KEY || ''; - console.error('Starknet-knowledge MCP server configured for public API mode'); + console.error( + 'Starknet-knowledge MCP server configured for public API mode' + ); } this.setupToolHandlers(); From b5882b4e8101109e9b189463efd51e354debab2c Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 10:45:38 +0100 Subject: [PATCH 08/18] prettier format error opus/interfaces/index --- packages/mcps/opus/src/interfaces/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/mcps/opus/src/interfaces/index.ts b/packages/mcps/opus/src/interfaces/index.ts index b850bd7b..8c1c7c59 100644 --- a/packages/mcps/opus/src/interfaces/index.ts +++ b/packages/mcps/opus/src/interfaces/index.ts @@ -33,8 +33,7 @@ export interface BorrowActionResult { * Interface for operations that modify trove debt */ export interface DebtActionResult { - /** Amount of debt modified */ - amount?: string; + /** Amount of debt modified */ amount?: string; /** Debt before operation */ before_debt?: string; /** Debt after operation */ From 0864ad717533db371eaf030f06cce16f201c5471 Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 10:47:57 +0100 Subject: [PATCH 09/18] opus same as before --- packages/mcps/opus/src/interfaces/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/mcps/opus/src/interfaces/index.ts b/packages/mcps/opus/src/interfaces/index.ts index 8c1c7c59..53375beb 100644 --- a/packages/mcps/opus/src/interfaces/index.ts +++ b/packages/mcps/opus/src/interfaces/index.ts @@ -33,7 +33,8 @@ export interface BorrowActionResult { * Interface for operations that modify trove debt */ export interface DebtActionResult { - /** Amount of debt modified */ amount?: string; + /** Amount of debt modified */ + amount?: string; /** Debt before operation */ before_debt?: string; /** Debt after operation */ From 78f88b3d37f4ab8ff00a72f25eb7334ebd7a09a3 Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 10:50:31 +0100 Subject: [PATCH 10/18] opus fix again --- packages/mcps/opus/src/interfaces/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcps/opus/src/interfaces/index.ts b/packages/mcps/opus/src/interfaces/index.ts index 53375beb..b850bd7b 100644 --- a/packages/mcps/opus/src/interfaces/index.ts +++ b/packages/mcps/opus/src/interfaces/index.ts @@ -33,7 +33,7 @@ export interface BorrowActionResult { * Interface for operations that modify trove debt */ export interface DebtActionResult { - /** Amount of debt modified */ + /** Amount of debt modified */ amount?: string; /** Debt before operation */ before_debt?: string; From f18af338e3c5a7478583d3a76bbf08b0b13b77ac Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 11:04:12 +0100 Subject: [PATCH 11/18] fix: pin prettier version 3.7.0 --- package.json | 2 +- packages/mcps/opus/src/interfaces/index.ts | 13 ++++--------- pnpm-lock.yaml | 20 ++++++++++---------- 3 files changed, 15 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index c47ba85a..1b194969 100755 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "eslint-plugin-prettier": "^5.2.3", "globals": "^15.15.0", "lerna": "^9.0.0", - "prettier": "^3.6.1", + "prettier": "3.7.0", "turbo": "^2.4.4", "typescript": "^5.7.3", "typescript-eslint": "^8.25.0" diff --git a/packages/mcps/opus/src/interfaces/index.ts b/packages/mcps/opus/src/interfaces/index.ts index b850bd7b..ac330451 100644 --- a/packages/mcps/opus/src/interfaces/index.ts +++ b/packages/mcps/opus/src/interfaces/index.ts @@ -63,8 +63,7 @@ export interface CollateralActionResult { * Result interface for opening a new trove */ export interface OpenTroveResult - extends TroveActionResult, - BorrowActionResult {} + extends TroveActionResult, BorrowActionResult {} /** * Result interface for repaying trove debt @@ -75,23 +74,19 @@ export interface RepayTroveResult extends TroveActionResult, DebtActionResult {} * Result interface for borrowing from a trove */ export interface BorrowTroveResult - extends TroveActionResult, - DebtActionResult, - BorrowActionResult {} + extends TroveActionResult, DebtActionResult, BorrowActionResult {} /** * Result interface for depositing collateral to a trove */ export interface DepositTroveResult - extends TroveActionResult, - CollateralActionResult {} + extends TroveActionResult, CollateralActionResult {} /** * Result interface for withdrawing collateral from a trove */ export interface WithdrawTroveResult - extends TroveActionResult, - CollateralActionResult {} + extends TroveActionResult, CollateralActionResult {} /** * Result interface for retrieving user's troves diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a9c531c..6c915a12 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -35,7 +35,7 @@ importers: version: 9.1.0(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7)) eslint-plugin-prettier: specifier: ^5.2.3 - version: 5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7)))(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7))(prettier@3.6.1) + version: 5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7)))(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7))(prettier@3.7.0) globals: specifier: ^15.15.0 version: 15.15.0 @@ -43,8 +43,8 @@ importers: specifier: ^9.0.0 version: 9.0.0(@types/node@22.15.17) prettier: - specifier: ^3.6.1 - version: 3.6.1 + specifier: 3.7.0 + version: 3.7.0 turbo: specifier: ^2.4.4 version: 2.5.3 @@ -5111,8 +5111,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.6.1: - resolution: {integrity: sha512-5xGWRa90Sp2+x1dQtNpIpeOQpTDBs9cZDmA/qs2vDNN2i18PdapqY7CmBeyLlMuGqXJRIOPaCaVZTLNQRWUH/A==} + prettier@3.7.0: + resolution: {integrity: sha512-pBiBj/gjRY9Qpk1b7cDda6Rbwvkaggos779AHQ0Ek/odwDx6xG6DRBxtnp1QmxbuD7pAO8/SQ8vuhtGv9LoLWA==} engines: {node: '>=14'} hasBin: true @@ -8610,10 +8610,10 @@ snapshots: dependencies: eslint: 9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7) - eslint-plugin-prettier@5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7)))(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7))(prettier@3.6.1): + eslint-plugin-prettier@5.4.0(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7)))(eslint@9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7))(prettier@3.7.0): dependencies: eslint: 9.26.0(@cfworker/json-schema@4.1.1)(jiti@1.21.7) - prettier: 3.6.1 + prettier: 3.7.0 prettier-linter-helpers: 1.0.0 synckit: 0.11.4 optionalDependencies: @@ -9279,7 +9279,7 @@ snapshots: isstream: 0.1.2 jsonwebtoken: 9.0.2 mime-types: 2.1.35 - retry-axios: 2.6.0(axios@1.12.2(debug@4.4.1)) + retry-axios: 2.6.0(axios@1.12.2) tough-cookie: 4.1.4 transitivePeerDependencies: - supports-color @@ -10758,7 +10758,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.6.1: {} + prettier@3.7.0: {} pretty-format@29.7.0: dependencies: @@ -10958,7 +10958,7 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - retry-axios@2.6.0(axios@1.12.2(debug@4.4.1)): + retry-axios@2.6.0(axios@1.12.2): dependencies: axios: 1.12.2(debug@4.4.1) From 13b41bbe7b6c8e4022ed527a6bbbbf5c9f11eb0a Mon Sep 17 00:00:00 2001 From: alvinouille Date: Thu, 27 Nov 2025 11:06:38 +0100 Subject: [PATCH 12/18] fix: version package to 0.1.0 --- packages/mcps/starknet-knowledge/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcps/starknet-knowledge/package.json b/packages/mcps/starknet-knowledge/package.json index c59deb9e..e18abb0e 100644 --- a/packages/mcps/starknet-knowledge/package.json +++ b/packages/mcps/starknet-knowledge/package.json @@ -1,6 +1,6 @@ { "name": "@kasarlabs/starknet-knowledge-mcp", - "version": "0.0.1", + "version": "0.1.0", "description": "MCP server for Starknet ecosystem knowledge and documentation", "type": "module", "main": "build/index.js", From 976ce18140f603b14768abd70a60ae20e1510ea9 Mon Sep 17 00:00:00 2001 From: Etienne Duclos Date: Fri, 28 Nov 2025 16:02:39 +0100 Subject: [PATCH 13/18] first version heritate from starknet-general-knowledge --- packages/mcps/assist-with-dojo/.env.example | 9 + packages/mcps/assist-with-dojo/.eslintrc.js | 23 ++ packages/mcps/assist-with-dojo/.gitignore | 86 +++++++ packages/mcps/assist-with-dojo/README.md | 144 +++++++++++ packages/mcps/assist-with-dojo/package.json | 71 ++++++ packages/mcps/assist-with-dojo/src/index.ts | 232 ++++++++++++++++++ packages/mcps/assist-with-dojo/src/schemas.ts | 23 ++ packages/mcps/assist-with-dojo/tsconfig.json | 21 ++ 8 files changed, 609 insertions(+) create mode 100644 packages/mcps/assist-with-dojo/.env.example create mode 100644 packages/mcps/assist-with-dojo/.eslintrc.js create mode 100644 packages/mcps/assist-with-dojo/.gitignore create mode 100644 packages/mcps/assist-with-dojo/README.md create mode 100644 packages/mcps/assist-with-dojo/package.json create mode 100644 packages/mcps/assist-with-dojo/src/index.ts create mode 100644 packages/mcps/assist-with-dojo/src/schemas.ts create mode 100644 packages/mcps/assist-with-dojo/tsconfig.json diff --git a/packages/mcps/assist-with-dojo/.env.example b/packages/mcps/assist-with-dojo/.env.example new file mode 100644 index 00000000..1d974827 --- /dev/null +++ b/packages/mcps/assist-with-dojo/.env.example @@ -0,0 +1,9 @@ +# Cairo Coder API Configuration +# Copy this file to .env and fill in your actual API key + +# Your Cairo Coder API key (required) +# Get it from: https://cairo-coder.com/ +# CAIRO_CODER_API_KEY=your-api-key-here + +# Your Cairo Coder Endpoint (if deployed locally) +CAIRO_CODER_API_ENDPOINT=http://localhost:3001 \ No newline at end of file diff --git a/packages/mcps/assist-with-dojo/.eslintrc.js b/packages/mcps/assist-with-dojo/.eslintrc.js new file mode 100644 index 00000000..46567e82 --- /dev/null +++ b/packages/mcps/assist-with-dojo/.eslintrc.js @@ -0,0 +1,23 @@ +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + extends: ['eslint:recommended', '@typescript-eslint/recommended'], + parserOptions: { + ecmaVersion: 2020, + sourceType: 'module', + }, + env: { + node: true, + es6: true, + }, + rules: { + // Personnalisez vos règles ici + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-explicit-any': 'warn', + 'prefer-const': 'error', + 'no-var': 'error', + }, + ignorePatterns: ['dist/', 'node_modules/', '*.js'], +}; diff --git a/packages/mcps/assist-with-dojo/.gitignore b/packages/mcps/assist-with-dojo/.gitignore new file mode 100644 index 00000000..494ca540 --- /dev/null +++ b/packages/mcps/assist-with-dojo/.gitignore @@ -0,0 +1,86 @@ +# Dependencies +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Build outputs +dist/ +build/ +*.tsbuildinfo + +# Environment variables +.env +.env.local +.env.development.local +.env.test.local +.env.production.local + +# IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db + +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Coverage directory used by tools like istanbul +coverage/ +*.lcov + +# nyc test coverage +.nyc_output + +# Dependency directories +node_modules/ +jspm_packages/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# next.js build output +.next + +# Nuxt.js build output +.nuxt + +# Storybook build outputs +.out +.storybook-out + +# Temporary folders +tmp/ +temp/ \ No newline at end of file diff --git a/packages/mcps/assist-with-dojo/README.md b/packages/mcps/assist-with-dojo/README.md new file mode 100644 index 00000000..80b44a0b --- /dev/null +++ b/packages/mcps/assist-with-dojo/README.md @@ -0,0 +1,144 @@ +# Starknet Knowledge MCP Server + +A Model Context Protocol (MCP) server providing access to Starknet ecosystem knowledge and documentation via the Cairo Coder API. + +## Quick Start + +Use this MCP server directly with npx: + +```bash +npx -y @kasarlabs/assist-with-dojo-mcp +``` + +## Configuration + +The server supports two modes of operation: + +### Mode 1: Public Cairo Coder API (Default) + +Use the official Cairo Coder API with your API key. + +**Environment Variables:** + +- `CAIRO_CODER_API_KEY`: Your Cairo Coder API key (required) + +**MCP Client Setup:** + +```json +{ + "mcpServers": { + "assist-with-dojo": { + "command": "npx", + "args": ["-y", "@kasarlabs/assist-with-dojo-mcp"], + "env": { + "CAIRO_CODER_API_KEY": "your-api-key-here" + } + } + } +} +``` + +### Mode 2: Local/Custom Endpoint + +Use a local or custom Cairo Coder API endpoint (no API key required). + +**Environment Variables:** + +- `CAIRO_CODER_API_ENDPOINT`: Your local endpoint URL (e.g., "http://localhost:8000") + +**MCP Client Setup:** + +```json +{ + "mcpServers": { + "assist-with-dojo": { + "command": "npx", + "args": ["-y", "@kasarlabs/assist-with-dojo-mcp"], + "env": { + "CAIRO_CODER_API_ENDPOINT": "http://localhost:8000" + } + } + } +} +``` + +> **Note:** When using `CAIRO_CODER_API_ENDPOINT`, the server automatically switches to local mode and no API key is required or used. + +## Available Tools + +### assist-with-dojo + +Get information about the Starknet ecosystem, protocols, and general knowledge. + +**Parameters:** + +- `query` (string, required): Your question about Starknet ecosystem +- `context` (string, optional): Additional context or specific topic area + +**Examples:** + +```typescript +// General ecosystem question +{ + "query": "What are the main DEXs on Starknet?" +} + +// Specific protocol information +{ + "query": "How does AVNU handle token routing?", + "context": "I'm building a swap aggregator" +} +``` + +## What You Can Learn About + +- **Starknet Ecosystem**: Protocols, dApps, and services on Starknet +- **DeFi Protocols**: Information about DEXs, lending platforms, and yield farming +- **Technical Concepts**: Understanding of Starknet-specific features and technologies +- **Recent Updates**: Latest news and developments in the Starknet ecosystem +- **Best Practices**: Recommendations based on ecosystem standards + +## Tips for Better Results + +- Be specific about what aspect of the ecosystem you're interested in +- Mention specific protocols or concepts when relevant +- Provide context about your use case for more targeted responses +- Ask about recent developments or protocol comparisons + +## Development + +### Prerequisites + +- Node.js >= 18 +- npm or yarn + +### Local Installation + +```bash +git clone +cd ask-starknet/packages/mcps/assist-with-dojo +npm install +``` + +### Available Scripts + +```bash +npm run build # Build the project +npm run dev # Start in development mode +npm start # Start in production mode +``` + +## License + +MIT + +## Support + +For issues and questions: + +- GitHub Issues: [Create an issue](https://github.com/kasarlabs/ask-starknet/issues) +- MCP Documentation: [Model Context Protocol](https://modelcontextprotocol.io/) + +## Contributing + +Contributions are welcome! Please check the contribution guidelines before submitting a PR. diff --git a/packages/mcps/assist-with-dojo/package.json b/packages/mcps/assist-with-dojo/package.json new file mode 100644 index 00000000..9795d5d6 --- /dev/null +++ b/packages/mcps/assist-with-dojo/package.json @@ -0,0 +1,71 @@ +{ + "name": "@kasarlabs/assist-with-dojo-mcp", + "version": "0.1.0", + "description": "MCP server for Starknet ecosystem knowledge and documentation", + "type": "module", + "main": "build/index.js", + "exports": { + ".": { + "import": "./build/index.js", + "types": "./build/index.d.ts" + } + }, + "bin": { + "assist-with-dojo-mcp": "./build/index.js" + }, + "files": [ + "build", + "README.md", + "LICENSE" + ], + "scripts": { + "build": "tsc && chmod +x build/index.js", + "start": "node build/index.js", + "dev": "tsx src/index.ts", + "lint": "eslint src/**/*.ts", + "lint:fix": "eslint src/**/*.ts --fix", + "clean": "rm -rf build node_modules", + "prepublishOnly": "npm run clean && npm install && npm run build", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [ + "mcp", + "starknet", + "knowledge", + "documentation", + "ecosystem", + "blockchain", + "cli", + "npx" + ], + "author": "KasarLabs", + "license": "MIT", + "publishConfig": { + "access": "public" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "1.22.0", + "dotenv": "^16.5.0", + "zod": "^3.24.2" + }, + "devDependencies": { + "@types/node": "^20.0.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "eslint": "^8.0.0", + "tsx": "^4.7.0", + "typescript": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "repository": { + "type": "git", + "url": "https://github.com/kasarlabs/ask-starknet", + "directory": "packages/mcps/assist-with-dojo" + }, + "bugs": { + "url": "https://github.com/kasarlabs/ask-starknet/issues" + }, + "homepage": "https://github.com/kasarlabs/ask-starknet/tree/main/packages/mcps/assist-with-dojo#readme" +} diff --git a/packages/mcps/assist-with-dojo/src/index.ts b/packages/mcps/assist-with-dojo/src/index.ts new file mode 100644 index 00000000..49b05fdd --- /dev/null +++ b/packages/mcps/assist-with-dojo/src/index.ts @@ -0,0 +1,232 @@ +#!/usr/bin/env node + +import 'dotenv/config'; +import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; +import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; +import packageJson from '../package.json' with { type: 'json' }; +import { + starknetGeneralKnowledgeSchema, + type StarknetGeneralKnowledgeInput, +} from './schemas.js'; + +/** + * Represents a message in the Cairo Coder conversation + */ +interface CairoCoderMessage { + role: 'user' | 'assistant' | 'system'; + content: string; +} + +/** + * Request payload for the Cairo Coder API + */ +interface CairoCoderRequest { + messages: CairoCoderMessage[]; + streaming: boolean; +} + +/** + * Response from the Cairo Coder API + */ +interface CairoCoderResponse { + choices: Array<{ + message: { + content: string; + role: string; + }; + }>; +} + +/** + * MCP Server implementation for Cairo Coder API integration + * Provides AI-powered assistance for Cairo and Starknet development + */ +class CairoCoderMCPServer { + private server: McpServer; + private apiKey: string; + private apiUrl: string; + private isLocalMode: boolean; + + /** + * Initializes the Cairo Coder MCP Server + * @throws {Error} If CAIRO_CODER_API_KEY environment variable is not set when using public API + */ + constructor() { + this.server = new McpServer({ + name: 'assist-with-dojo-mcp', + version: packageJson.version, + }); + + // Check if local endpoint is specified + const localEndpoint = process.env.CAIRO_CODER_API_ENDPOINT; + + if (localEndpoint) { + // Local mode: use custom endpoint, no API key required + this.isLocalMode = true; + this.apiUrl = `${localEndpoint}/v1/agents/dojo-agent/chat/completions`; + this.apiKey = ''; + console.error( + `assist-with-dojo MCP server configured for local mode: ${this.apiUrl}` + ); + } else { + // Public API mode: use official endpoint, API key required + this.isLocalMode = false; + this.apiUrl = + 'https://api.cairo-coder.com/v1/agents/dojo-agent/chat/completions'; + this.apiKey = process.env.CAIRO_CODER_API_KEY || ''; + console.error( + 'assist-with-dojo MCP server configured for public API mode' + ); + } + + this.setupToolHandlers(); + } + + /** + * Sets up the tool handlers for the MCP server + * Configures both assist_with_cairo and assist-with-dojo tools + */ + private setupToolHandlers(): void { + this.server.tool( + 'assist-with-dojo', + `Provides general knowledge about the Starknet ecosystem, protocol concepts, recent updates, and news. + +Call this tool when the user needs to: +- **Understand Starknet concepts** (account abstraction, sequencers, STARK proofs, etc.) +- **Discover ecosystem projects** and integrations +- **Get information from the Starknet blog** +- **Understand high-level architecture** and design decisions + +This tool has access to Starknet blog posts, conceptual documentation, and ecosystem information.`, + starknetGeneralKnowledgeSchema.shape, + async (args: StarknetGeneralKnowledgeInput) => { + return await this.handleGeneralKnowledge(args); + } + ); + } + + /** + * Handles general Starknet knowledge requests by calling the Cairo Coder API + * @param args - The arguments containing query and optional conversation history + * @returns The response from the Cairo Coder API or an error message + */ + private async handleGeneralKnowledge(args: StarknetGeneralKnowledgeInput) { + try { + const { query, history } = args; + + if (!query) { + throw new Error('Query parameter is required'); + } + + // Validate API key is available in public API mode + if (!this.isLocalMode && !this.apiKey) { + throw new Error( + 'CAIRO_CODER_API_KEY environment variable is required when using public API' + ); + } + + // Add context to guide the backend towards general knowledge responses + let contextualMessage = `As a Dojo Expert can you explain to the user about this request :\n\n${query}`; + + if (history && history.length > 0) { + contextualMessage = `Previous conversation context:\n${history.join('\n')}\n\nCurrent query: ${contextualMessage}`; + } + + const requestBody: CairoCoderRequest = { + messages: [ + { + role: 'user', + content: contextualMessage, + }, + ], + streaming: false, + }; + + // Prepare headers based on mode + const headers: Record = { + 'Content-Type': 'application/json', + mcp: 'true', + }; + + // Only add API key header in public API mode + if (!this.isLocalMode && this.apiKey) { + headers['x-api-key'] = this.apiKey; + } + + const response = await fetch(this.apiUrl, { + method: 'POST', + headers, + body: JSON.stringify(requestBody), + }); + + if (!response.ok) { + const errorText = await response.text(); + throw new Error( + `API request failed: ${response.status} ${response.statusText} - ${errorText}` + ); + } + + const data = (await response.json()) as CairoCoderResponse; + + if (!data.choices || data.choices.length === 0) { + throw new Error('No response received from Cairo Coder API'); + } + + const assistantResponse = data.choices[0].message.content; + + return { + content: [ + { + type: 'text' as const, + text: assistantResponse, + }, + ], + }; + } catch (error) { + const errorMessage = + error instanceof Error ? error.message : 'Unknown error occurred'; + + return { + content: [ + { + type: 'text' as const, + text: `Error: ${errorMessage}`, + }, + ], + isError: true, + }; + } + } + + /** + * Starts the MCP server with stdio transport + * @throws {Error} If the server fails to start + */ + async run(): Promise { + const transport = new StdioServerTransport(); + console.error('assist-with-dojo MCP server running on stdio'); + await this.server.connect(transport); + + // Handle graceful shutdown + process.on('SIGINT', async () => { + await this.server.close(); + process.exit(0); + }); + } +} + +/** + * Main entry point for the application + * Creates and starts the Cairo Coder MCP server + */ +async function main() { + const server = new CairoCoderMCPServer(); + await server.run(); +} + +main().catch((error) => { + console.error('Fatal error in main():', error); + process.exit(1); +}); + +export default CairoCoderMCPServer; diff --git a/packages/mcps/assist-with-dojo/src/schemas.ts b/packages/mcps/assist-with-dojo/src/schemas.ts new file mode 100644 index 00000000..c83e3788 --- /dev/null +++ b/packages/mcps/assist-with-dojo/src/schemas.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +/** + * Schema for the assist-with-dojo tool + * Specialized for general Starknet ecosystem knowledge, concepts, and news + */ +export const starknetGeneralKnowledgeSchema = z.object({ + query: z + .string() + .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')." + ), + history: z + .array(z.string()) + .optional() + .describe( + 'Optional: The preceding conversation history. This can help the tool understand the context of the discussion and provide more accurate answers.' + ), +}); + +export type StarknetGeneralKnowledgeInput = z.infer< + typeof starknetGeneralKnowledgeSchema +>; diff --git a/packages/mcps/assist-with-dojo/tsconfig.json b/packages/mcps/assist-with-dojo/tsconfig.json new file mode 100644 index 00000000..206174e4 --- /dev/null +++ b/packages/mcps/assist-with-dojo/tsconfig.json @@ -0,0 +1,21 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "Node", + "outDir": "./build", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "resolveJsonModule": true, + "verbatimModuleSyntax": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "build"] +} From 42cfc12e135820c780fcf3bbed73ad1ab2050faa Mon Sep 17 00:00:00 2001 From: Etienne Duclos Date: Fri, 28 Nov 2025 16:09:50 +0100 Subject: [PATCH 14/18] version with the mcp.local and mcp.json with assis-with-dojo and quick fix of the gitingore for vscode file --- .gitignore | 2 +- packages/mcp/mcps.json | 15 +++++++++++++++ packages/mcp/mcps.local.json | 15 +++++++++++++++ 3 files changed, 31 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2bef4966..b632d47d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ **/node_modules **/.turbo .env - +**/.vscode **/log_iterations.json **/log_autonomous.txt diff --git a/packages/mcp/mcps.json b/packages/mcp/mcps.json index 8c59e4da..087f1e5a 100644 --- a/packages/mcp/mcps.json +++ b/packages/mcp/mcps.json @@ -511,5 +511,20 @@ "create_swap" ] } + }, + "assist-with-dojo": { + "client": { + "command": "npx", + "args": ["-y", "@kasarlabs/assist-with-dojo-mcp@latest"], + "transport": "stdio", + "env": { + "CAIRO_CODER_API_KEY": "" + } + }, + "description": "AI-powered assistance for Dojo game engine development on Starknet. Use for: learning about Dojo, understanding Dojo concepts, building games with Dojo, getting Dojo best practices", + "promptInfo": { + "expertise": "Dojo game engine, ECS architecture, onchain gaming on Starknet, Dojo toolchain, and Dojo development patterns", + "tools": ["assist-with-dojo"] + } } } diff --git a/packages/mcp/mcps.local.json b/packages/mcp/mcps.local.json index 3be82a12..f8f94384 100644 --- a/packages/mcp/mcps.local.json +++ b/packages/mcp/mcps.local.json @@ -508,5 +508,20 @@ "create_swap" ] } + }, + "assist-with-dojo": { + "client": { + "command": "node", + "args": ["../mcps/assist-with-dojo/build/index.js"], + "transport": "stdio", + "env": { + "CAIRO_CODER_API_KEY": "" + } + }, + "description": "AI-powered assistance for Dojo game engine development on Starknet. Use for: learning about Dojo, understanding Dojo concepts, building games with Dojo, getting Dojo best practices", + "promptInfo": { + "expertise": "Dojo game engine, ECS architecture, onchain gaming on Starknet, Dojo toolchain, and Dojo development patterns", + "tools": ["assist-with-dojo"] + } } } From 5ccffcf672a4dd70990f8d121e9dcfa6d33a9860 Mon Sep 17 00:00:00 2001 From: Etienne Duclos Date: Fri, 12 Dec 2025 11:59:08 +0100 Subject: [PATCH 15/18] version ready for revew --- packages/mcps/assist-with-dojo/.env.example | 2 +- packages/mcps/assist-with-dojo/src/index.ts | 86 +++--- packages/mcps/assist-with-dojo/src/schemas.ts | 6 +- pnpm-lock.yaml | 254 ++++++++---------- 4 files changed, 150 insertions(+), 198 deletions(-) diff --git a/packages/mcps/assist-with-dojo/.env.example b/packages/mcps/assist-with-dojo/.env.example index 1d974827..d4613119 100644 --- a/packages/mcps/assist-with-dojo/.env.example +++ b/packages/mcps/assist-with-dojo/.env.example @@ -3,7 +3,7 @@ # Your Cairo Coder API key (required) # Get it from: https://cairo-coder.com/ -# CAIRO_CODER_API_KEY=your-api-key-here +CAIRO_CODER_API_KEY=your-api-key-here # Your Cairo Coder Endpoint (if deployed locally) CAIRO_CODER_API_ENDPOINT=http://localhost:3001 \ No newline at end of file diff --git a/packages/mcps/assist-with-dojo/src/index.ts b/packages/mcps/assist-with-dojo/src/index.ts index fb621d84..e4c3c42d 100644 --- a/packages/mcps/assist-with-dojo/src/index.ts +++ b/packages/mcps/assist-with-dojo/src/index.ts @@ -4,31 +4,27 @@ import 'dotenv/config'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import packageJson from '../package.json' with { type: 'json' }; -import { - starknetGeneralKnowledgeSchema, - type StarknetGeneralKnowledgeInput, -} from './schemas.js'; +import { assistWithDojoSchema, type AssistWithDojoInput } from './schemas.js'; /** - * Represents a message in the Cairo Coder conversation + * Represents a message in the Dojo assistant conversation */ -interface CairoCoderMessage { +interface DojoAssistantMessage { role: 'user' | 'assistant' | 'system'; content: string; } /** - * Request payload for the Cairo Coder API + * Request payload for the Dojo assistant API */ -interface CairoCoderRequest { - messages: CairoCoderMessage[]; - streaming: boolean; +interface DojoAssistantRequest { + messages: DojoAssistantMessage[]; } /** - * Response from the Cairo Coder API + * Response from the Dojo assistant API */ -interface CairoCoderResponse { +interface DojoAssistantResponse { choices: Array<{ message: { content: string; @@ -38,17 +34,17 @@ interface CairoCoderResponse { } /** - * MCP Server implementation for Cairo Coder API integration - * Provides AI-powered assistance for Cairo and Starknet development + * MCP Server implementation for Dojo assistant API integration + * Provides AI-powered assistance for Dojo development */ -class CairoCoderMCPServer { +class DojoAssistantMCPServer { private server: McpServer; private apiKey: string; private apiUrl: string; private isLocalMode: boolean; /** - * Initializes the Cairo Coder MCP Server + * Initializes the Dojo Assistant MCP Server * @throws {Error} If CAIRO_CODER_API_KEY environment variable is not set when using public API */ constructor() { @@ -66,16 +62,15 @@ class CairoCoderMCPServer { this.apiUrl = `${localEndpoint}/v1/chat/completions`; this.apiKey = ''; console.error( - `assist-with-dojo MCP server configured for local mode: ${this.apiUrl}` + `Assist-with-dojo MCP server configured for local mode: ${this.apiUrl}` ); } else { // Public API mode: use official endpoint, API key required this.isLocalMode = false; - this.apiUrl = - 'https://api.cairo-coder.com/v1/agents/dojo-agent/chat/completions'; + this.apiUrl = 'https://api.cairo-coder.com/v1/chat/completions'; this.apiKey = process.env.CAIRO_CODER_API_KEY || ''; console.error( - 'assist-with-dojo MCP server configured for public API mode' + 'Assist-with-dojo MCP server configured for public API mode' ); } @@ -84,33 +79,35 @@ class CairoCoderMCPServer { /** * Sets up the tool handlers for the MCP server - * Configures both assist_with_cairo and assist-with-dojo tools + * Configures the assist_with_dojo tool */ private setupToolHandlers(): void { this.server.tool( - 'assist-with-dojo', - `Provides general knowledge about the Starknet ecosystem, protocol concepts, recent updates, and news. + 'assist_with_dojo', + `Provides expert responses to queries about Dojo and all its components. Call this tool when the user needs to: -- **Understand Starknet concepts** (account abstraction, sequencers, STARK proofs, etc.) -- **Discover ecosystem projects** and integrations -- **Get information from the Starknet blog** -- **Understand high-level architecture** and design decisions - -This tool has access to Starknet blog posts, conceptual documentation, and ecosystem information.`, - starknetGeneralKnowledgeSchema.shape, - async (args: StarknetGeneralKnowledgeInput) => { - return await this.handleGeneralKnowledge(args); +- **Understand Dojo core concepts** and architecture +- **Work with Dojo components**: Katana (local development node), Torii (indexer), Sozo (CLI tool), Saya (settlement layer), Cainome (bindings generator) +- **Learn about Dojo SDKs**: dojo.js, dojo.c, dojo.unity, dojo.rust, dojo.godot, dojo.bevy, dojo.unreal +- **Use Dojo libraries**: Origami (game primitives) and Alexandria (standard library) +- **Build onchain games** with the Dojo framework +- **Deploy and manage** Dojo worlds and contracts + +This tool has access to comprehensive Dojo documentation, component guides, SDK references, and library documentation.`, + assistWithDojoSchema.shape, + async (args: AssistWithDojoInput) => { + return await this.handleDojoAssistance(args); } ); } /** - * Handles general Starknet knowledge requests by calling the Cairo Coder API + * Handles Dojo assistance requests by calling the Dojo assistant API * @param args - The arguments containing query and optional conversation history - * @returns The response from the Cairo Coder API or an error message + * @returns The response from the Dojo assistant API or an error message */ - private async handleGeneralKnowledge(args: StarknetGeneralKnowledgeInput) { + private async handleDojoAssistance(args: AssistWithDojoInput) { try { const { query, history } = args; @@ -125,21 +122,20 @@ This tool has access to Starknet blog posts, conceptual documentation, and ecosy ); } - // Add context to guide the backend towards general knowledge responses - let contextualMessage = `As a Dojo Expert can you explain to the user about this request :\n\n${query}`; + // Add context to guide the backend towards Dojo-specific responses + let contextualMessage = `As a Dojo expert, answer the following question:\n\n${query}`; if (history && history.length > 0) { contextualMessage = `Previous conversation context:\n${history.join('\n')}\n\nCurrent query: ${contextualMessage}`; } - const requestBody: CairoCoderRequest = { + const requestBody: DojoAssistantRequest = { messages: [ { role: 'user', content: contextualMessage, }, ], - streaming: false, }; // Prepare headers based on mode @@ -166,10 +162,10 @@ This tool has access to Starknet blog posts, conceptual documentation, and ecosy ); } - const data = (await response.json()) as CairoCoderResponse; + const data = (await response.json()) as DojoAssistantResponse; if (!data.choices || data.choices.length === 0) { - throw new Error('No response received from Cairo Coder API'); + throw new Error('No response received from Dojo assistant API'); } const assistantResponse = data.choices[0].message.content; @@ -204,7 +200,7 @@ This tool has access to Starknet blog posts, conceptual documentation, and ecosy */ async run(): Promise { const transport = new StdioServerTransport(); - console.error('assist-with-dojo MCP server running on stdio'); + console.error('AssistWithDojo server running on stdio'); await this.server.connect(transport); // Handle graceful shutdown @@ -217,10 +213,10 @@ This tool has access to Starknet blog posts, conceptual documentation, and ecosy /** * Main entry point for the application - * Creates and starts the Cairo Coder MCP server + * Creates and starts the Dojo Assistant MCP server */ async function main() { - const server = new CairoCoderMCPServer(); + const server = new DojoAssistantMCPServer(); await server.run(); } @@ -229,4 +225,4 @@ main().catch((error) => { process.exit(1); }); -export default CairoCoderMCPServer; +export default DojoAssistantMCPServer; diff --git a/packages/mcps/assist-with-dojo/src/schemas.ts b/packages/mcps/assist-with-dojo/src/schemas.ts index c83e3788..ab840c60 100644 --- a/packages/mcps/assist-with-dojo/src/schemas.ts +++ b/packages/mcps/assist-with-dojo/src/schemas.ts @@ -4,7 +4,7 @@ import { z } from 'zod'; * Schema for the assist-with-dojo tool * Specialized for general Starknet ecosystem knowledge, concepts, and news */ -export const starknetGeneralKnowledgeSchema = z.object({ +export const assistWithDojoSchema = z.object({ query: z .string() .describe( @@ -18,6 +18,4 @@ export const starknetGeneralKnowledgeSchema = z.object({ ), }); -export type StarknetGeneralKnowledgeInput = z.infer< - typeof starknetGeneralKnowledgeSchema ->; +export type AssistWithDojoInput = z.infer; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8d3af396..90d5e308 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,7 +46,7 @@ importers: specifier: ^9.0.0 version: 9.0.0(@types/node@22.15.17) prettier: - specifier: 3.7.0 + specifier: ^3.7.0 version: 3.7.0 turbo: specifier: ^2.4.4 @@ -86,30 +86,26 @@ importers: packages/mcp: dependencies: '@langchain/anthropic': - specifier: ^0.3.27 - version: 0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) + specifier: 0.3.27 + version: 0.3.27(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) '@langchain/community': - specifier: ^0.3.55 - version: 0.3.55(64csqmzchne5gyjitktwqd4jqe) + specifier: 0.3.55 + version: 0.3.55(dpqkbclv4iizp3a7jidlszst7q) '@langchain/core': - specifier: ^0.3.72 -<<<<<<< HEAD - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - version: 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + specifier: 0.3.72 + version: 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) '@langchain/google-genai': - specifier: ^0.2.18 - version: 0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) + specifier: 0.2.18 + version: 0.2.18(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) '@langchain/langgraph': - specifier: ^0.4.9 - version: 0.4.9(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(zod-to-json-schema@3.24.5(zod@3.25.76)) + specifier: 0.4.9 + version: 0.4.9(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(zod-to-json-schema@3.24.5(zod@3.25.76)) '@langchain/mcp-adapters': - specifier: ^0.6.0 - version: 0.6.0(@cfworker/json-schema@4.1.1)(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) + specifier: 0.6.0 + version: 0.6.0(@cfworker/json-schema@4.1.1)(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) '@langchain/openai': - specifier: ^0.6.11 - version: 0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + specifier: 0.6.11 + version: 0.6.11(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -134,7 +130,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -165,7 +161,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -192,6 +188,37 @@ importers: specifier: ^5.8.2 version: 5.9.2 + packages/mcps/assist-with-dojo: + dependencies: + '@modelcontextprotocol/sdk': + specifier: 1.22.0 + version: 1.22.0(@cfworker/json-schema@4.1.1) + dotenv: + specifier: ^16.5.0 + version: 16.5.0 + zod: + specifier: ^3.24.2 + version: 3.25.76 + devDependencies: + '@types/node': + specifier: ^20.0.0 + version: 20.19.21 + '@typescript-eslint/eslint-plugin': + specifier: ^6.0.0 + version: 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2) + '@typescript-eslint/parser': + specifier: ^6.0.0 + version: 6.21.0(eslint@8.57.1)(typescript@5.9.2) + eslint: + specifier: ^8.0.0 + version: 8.57.1 + tsx: + specifier: ^4.7.0 + version: 4.20.6 + typescript: + specifier: ^5.0.0 + version: 5.9.2 + packages/mcps/avnu: dependencies: '@avnu/avnu-sdk': @@ -202,7 +229,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -233,7 +260,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -376,7 +403,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -407,7 +434,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -487,7 +514,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -521,7 +548,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: ^1.11.2 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -574,7 +601,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -605,7 +632,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -636,7 +663,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -694,8 +721,6 @@ importers: specifier: ^5.8.2 version: 5.9.2 -<<<<<<< HEAD -======= packages/mcps/starkgate: dependencies: '@hyperlane-xyz/core': @@ -742,7 +767,6 @@ importers: specifier: ^5.8.2 version: 5.9.2 ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 packages/mcps/starknet-knowledge: dependencies: '@modelcontextprotocol/sdk': @@ -781,7 +805,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -812,7 +836,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -843,7 +867,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.75 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -871,7 +895,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -905,7 +929,7 @@ importers: version: link:../../core '@langchain/core': specifier: ^0.3.42 - version: 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + version: 0.3.75(openai@5.12.2(zod@3.25.76)) '@modelcontextprotocol/sdk': specifier: 1.22.0 version: 1.22.0(@cfworker/json-schema@4.1.1) @@ -2518,6 +2542,10 @@ packages: youtubei.js: optional: true + '@langchain/core@0.3.72': + resolution: {integrity: sha512-WsGWVZYnlKffj2eEfDocPNiaTRoxyYiLSQdQ7oxZvxGZBqo/90vpjbC33UGK1uPNBM4kT+pkdaol/MnvKUh8TQ==} + engines: {node: '>=18'} + '@langchain/core@0.3.75': resolution: {integrity: sha512-kTyBS0DTeD0JYa9YH5lg6UdDbHmvplk3t9PCjP5jDQZCK5kPe2aDFToqdiCaLzZg8RzzM+clXLVyJtPTE8bZ2Q==} engines: {node: '>=18'} @@ -7168,14 +7196,11 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} -<<<<<<< HEAD -======= prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 prettier@3.7.0: resolution: {integrity: sha512-pBiBj/gjRY9Qpk1b7cDda6Rbwvkaggos779AHQ0Ek/odwDx6xG6DRBxtnp1QmxbuD7pAO8/SQ8vuhtGv9LoLWA==} engines: {node: '>=14'} @@ -10757,43 +10782,27 @@ snapshots: '@js-sdsl/ordered-map@4.4.2': {} - '@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': + '@langchain/anthropic@0.3.27(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': dependencies: '@anthropic-ai/sdk': 0.56.0 -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) fast-xml-parser: 4.5.3 - '@langchain/community@0.3.55(64csqmzchne5gyjitktwqd4jqe)': + '@langchain/community@0.3.55(dpqkbclv4iizp3a7jidlszst7q)': dependencies: '@browserbasehq/stagehand': 1.14.0(@playwright/test@1.55.0)(bufferutil@4.0.9)(deepmerge@4.3.1)(dotenv@16.5.0)(encoding@0.1.13)(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))(utf-8-validate@5.0.10)(zod@3.25.76) '@ibm-cloud/watsonx-ai': 1.6.12 -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) - '@langchain/openai': 0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(ws@8.18.2) - '@langchain/weaviate': 0.2.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(encoding@0.1.13) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) - '@langchain/openai': 0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@langchain/weaviate': 0.2.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(encoding@0.1.13) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) + '@langchain/openai': 0.6.11(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@langchain/weaviate': 0.2.2(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(encoding@0.1.13) binary-extensions: 2.3.0 expr-eval: 2.0.2 flat: 5.0.2 ibm-cloud-sdk-core: 5.4.2 js-yaml: 4.1.0 -<<<<<<< HEAD - langchain: 0.3.33(@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))))(axios@1.12.2)(handlebars@4.7.8)(openai@5.12.2(ws@8.18.2)(zod@3.25.76))(ws@8.18.2) - langsmith: 0.3.67(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) - openai: 5.12.2(ws@8.18.2)(zod@3.25.76) -======= - langchain: 0.3.33(@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))))(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))))(axios@1.12.2)(handlebars@4.7.8)(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + langchain: 0.3.33(@langchain/anthropic@0.3.27(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))))(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))))(axios@1.12.2)(handlebars@4.7.8)(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) langsmith: 0.3.67(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) openai: 5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 uuid: 10.0.0 zod: 3.25.76 optionalDependencies: @@ -10830,17 +10839,14 @@ snapshots: - handlebars - peggy -<<<<<<< HEAD - '@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))': -======= - '@langchain/core@0.3.75(openai@5.12.2(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))': + '@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))': dependencies: '@cfworker/json-schema': 4.1.1 ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.20 - langsmith: 0.3.67(openai@5.12.2(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) + langsmith: 0.3.67(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -10853,14 +10859,14 @@ snapshots: - '@opentelemetry/sdk-trace-base' - openai - '@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))': + '@langchain/core@0.3.75(openai@5.12.2(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))': dependencies: '@cfworker/json-schema': 4.1.1 ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.20 - langsmith: 0.3.67(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) + langsmith: 0.3.67(openai@5.12.2(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -10874,14 +10880,13 @@ snapshots: - openai '@langchain/core@0.3.75(openai@5.12.2(zod@3.25.76))': ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 dependencies: '@cfworker/json-schema': 4.1.1 ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.20 - langsmith: 0.3.67(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) + langsmith: 0.3.67(openai@5.12.2(zod@3.25.76)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -10894,49 +10899,31 @@ snapshots: - '@opentelemetry/sdk-trace-base' - openai - '@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': + '@langchain/google-genai@0.2.18(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': dependencies: '@google/generative-ai': 0.24.1 -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) uuid: 11.1.0 - '@langchain/langgraph-checkpoint@0.1.1(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': + '@langchain/langgraph-checkpoint@0.1.1(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': dependencies: -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) uuid: 10.0.0 - '@langchain/langgraph-sdk@0.1.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': + '@langchain/langgraph-sdk@0.1.2(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': dependencies: '@types/json-schema': 7.0.15 p-queue: 6.6.2 p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 - - '@langchain/langgraph@0.4.9(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(zod-to-json-schema@3.24.5(zod@3.25.76))': - dependencies: -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) - '@langchain/langgraph-checkpoint': 0.1.1(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))) - '@langchain/langgraph-sdk': 0.1.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) - '@langchain/langgraph-checkpoint': 0.1.1(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) - '@langchain/langgraph-sdk': 0.1.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) + + '@langchain/langgraph@0.4.9(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(zod-to-json-schema@3.24.5(zod@3.25.76))': + dependencies: + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) + '@langchain/langgraph-checkpoint': 0.1.1(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) + '@langchain/langgraph-sdk': 0.1.2(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) uuid: 10.0.0 zod: 3.25.76 optionalDependencies: @@ -10945,9 +10932,9 @@ snapshots: - react - react-dom - '@langchain/mcp-adapters@0.6.0(@cfworker/json-schema@4.1.1)(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': + '@langchain/mcp-adapters@0.6.0(@cfworker/json-schema@4.1.1)(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': dependencies: - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) '@modelcontextprotocol/sdk': 1.22.0(@cfworker/json-schema@4.1.1) debug: 4.4.1(supports-color@8.1.1) zod: 3.25.76 @@ -10957,35 +10944,23 @@ snapshots: - '@cfworker/json-schema' - supports-color - '@langchain/openai@0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': + '@langchain/openai@0.6.11(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))': dependencies: -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) js-tiktoken: 1.0.20 openai: 5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76) zod: 3.25.76 transitivePeerDependencies: - ws - '@langchain/textsplitters@0.1.0(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': + '@langchain/textsplitters@0.1.0(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))': dependencies: -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) js-tiktoken: 1.0.20 - '@langchain/weaviate@0.2.2(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(encoding@0.1.13)': + '@langchain/weaviate@0.2.2(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(encoding@0.1.13)': dependencies: -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) uuid: 10.0.0 weaviate-client: 3.8.1(encoding@0.1.13) transitivePeerDependencies: @@ -15282,7 +15257,7 @@ snapshots: isstream: 0.1.2 jsonwebtoken: 9.0.2 mime-types: 2.1.35 - retry-axios: 2.6.0(axios@1.12.2) + retry-axios: 2.6.0(axios@1.12.2(debug@4.4.1)) tough-cookie: 4.1.4 transitivePeerDependencies: - supports-color @@ -15988,33 +15963,23 @@ snapshots: kuler@2.0.0: {} - langchain@0.3.33(@langchain/anthropic@0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))))(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))))(axios@1.12.2)(handlebars@4.7.8)(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)): + langchain@0.3.33(@langchain/anthropic@0.3.27(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))))(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(@langchain/google-genai@0.2.18(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))))(axios@1.12.2)(handlebars@4.7.8)(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)): dependencies: -<<<<<<< HEAD - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) - '@langchain/openai': 0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76)))(ws@8.18.2) - '@langchain/textsplitters': 0.1.0(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.2)(zod@3.25.76))) - js-tiktoken: 1.0.20 - js-yaml: 4.1.0 - jsonpointer: 5.0.1 - langsmith: 0.3.67(openai@5.12.2(ws@8.18.2)(zod@3.25.76)) -======= - '@langchain/core': 0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) - '@langchain/openai': 0.6.11(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) - '@langchain/textsplitters': 0.1.0(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) + '@langchain/core': 0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) + '@langchain/openai': 0.6.11(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)))(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10)) + '@langchain/textsplitters': 0.1.0(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) js-tiktoken: 1.0.20 js-yaml: 4.1.0 jsonpointer: 5.0.1 langsmith: 0.3.67(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)) ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 openapi-types: 12.1.3 p-retry: 4.6.2 uuid: 10.0.0 yaml: 2.8.1 zod: 3.25.76 optionalDependencies: - '@langchain/anthropic': 0.3.27(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) - '@langchain/google-genai': 0.2.18(@langchain/core@0.3.75(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) + '@langchain/anthropic': 0.3.27(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) + '@langchain/google-genai': 0.2.18(@langchain/core@0.3.72(openai@5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76))) axios: 1.12.2(debug@4.4.1) handlebars: 4.7.8 transitivePeerDependencies: @@ -16024,9 +15989,6 @@ snapshots: - openai - ws -<<<<<<< HEAD - langsmith@0.3.67(openai@5.12.2(ws@8.18.2)(zod@3.25.76)): -======= langsmith@0.3.67(openai@5.12.2(ws@7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76)): dependencies: '@types/uuid': 10.0.0 @@ -16052,7 +16014,6 @@ snapshots: openai: 5.12.2(ws@8.18.3(bufferutil@4.0.9)(utf-8-validate@5.0.10))(zod@3.25.76) langsmith@0.3.67(openai@5.12.2(zod@3.25.76)): ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 dependencies: '@types/uuid': 10.0.0 chalk: 4.1.2 @@ -17144,11 +17105,8 @@ snapshots: dependencies: fast-diff: 1.3.0 -<<<<<<< HEAD -======= prettier@2.8.8: {} ->>>>>>> 3c5d81d8e99c6caf80fd533b4ad0cd123d88bc75 prettier@3.7.0: {} pretty-format@29.7.0: @@ -17438,7 +17396,7 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - retry-axios@2.6.0(axios@1.12.2): + retry-axios@2.6.0(axios@1.12.2(debug@4.4.1)): dependencies: axios: 1.12.2(debug@4.4.1) From 7497bb7bf49d873dbb8f6ed3099026b374fc5a74 Mon Sep 17 00:00:00 2001 From: Etienne Duclos Date: Fri, 12 Dec 2025 12:55:24 +0100 Subject: [PATCH 16/18] version with categories --- packages/mcp/categories.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcp/categories.json b/packages/mcp/categories.json index 56cd0e95..e1b9b186 100644 --- a/packages/mcp/categories.json +++ b/packages/mcp/categories.json @@ -36,7 +36,7 @@ "knowledge": { "name": "knowledge", "description": "AI-powered assistance, documentation, help guides, and educational resources for Starknet ecosystem and MCP servers", - "mcps": ["mcp-doc", "starknet-knowledge"] + "mcps": ["mcp-doc", "starknet-knowledge", "assist-with-dojo"] }, "tokens": { "name": "tokens", From 559b01a320127088888eeac7dc9fd35dcab34ead Mon Sep 17 00:00:00 2001 From: Etienne Duclos Date: Fri, 12 Dec 2025 15:11:06 +0100 Subject: [PATCH 17/18] version with nameds --- packages/mcps/assist-with-dojo/src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcps/assist-with-dojo/src/index.ts b/packages/mcps/assist-with-dojo/src/index.ts index e4c3c42d..2e022c11 100644 --- a/packages/mcps/assist-with-dojo/src/index.ts +++ b/packages/mcps/assist-with-dojo/src/index.ts @@ -79,11 +79,11 @@ class DojoAssistantMCPServer { /** * Sets up the tool handlers for the MCP server - * Configures the assist_with_dojo tool + * Configures the assist-with-dojo tool */ private setupToolHandlers(): void { this.server.tool( - 'assist_with_dojo', + 'assist-with-dojo', `Provides expert responses to queries about Dojo and all its components. Call this tool when the user needs to: From 47d07b0a397fc62ac1143effec0d76a0e40bae5f Mon Sep 17 00:00:00 2001 From: Etienne Duclos Date: Fri, 12 Dec 2025 15:42:13 +0100 Subject: [PATCH 18/18] version updated --- packages/mcps/assist-with-dojo/src/schemas.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mcps/assist-with-dojo/src/schemas.ts b/packages/mcps/assist-with-dojo/src/schemas.ts index ab840c60..3ea066f0 100644 --- a/packages/mcps/assist-with-dojo/src/schemas.ts +++ b/packages/mcps/assist-with-dojo/src/schemas.ts @@ -2,19 +2,19 @@ import { z } from 'zod'; /** * Schema for the assist-with-dojo tool - * Specialized for general Starknet ecosystem knowledge, concepts, and news + * Specialized for Dojo game engine, its components, SDKs, and onchain game development */ export const assistWithDojoSchema = z.object({ query: z .string() .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')." + "The user's question about Dojo game engine and its ecosystem. Use this for understanding Dojo core concepts, components (Katana, Torii, Sozo, Saya, Cainome), SDKs (dojo.js, dojo.c, dojo.unity, dojo.rust, dojo.godot, dojo.bevy, dojo.unreal), libraries (Origami, Alexandria), building onchain games, and deploying Dojo worlds (e.g., 'How do I use Katana for local development?' or 'Explain Dojo's ECS architecture')." ), history: z .array(z.string()) .optional() .describe( - 'Optional: The preceding conversation history. This can help the tool understand the context of the discussion and provide more accurate answers.' + 'Optional: The preceding conversation history about Dojo. This can help the tool understand the context of the discussion and provide more accurate answers.' ), });