Snak logo

Snak

Organization
KasarLabs

Build powerful and secure AI Agents powered by Starknet.

PublisherKasarLabs
Repositorysnak
LanguageTypeScript
Forks
33
Stars
96
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Snak exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    96 stars and 33 forks from the linked repository.

A Agent Engine for creating powerful and secure AI Agents powered by Starknet. Available as both an NPM package and a ready-to-use backend.

Quick Start

Prerequisites

  • Starknet wallet (recommended: Argent X)
  • AI provider API key (Anthropic/OpenAI/Google Gemini/Ollama)
  • Docker and Docker compose installed
  • Node.js and pnpm installed

Installation

bash
git clone https://github.com/kasarlabs/snak.git
cd snak
pnpm install

Configuration

  1. Create a .env file by copying .env.example:
bash
cp .env.example .env

Then, fill in the necessary values in your .env file:

env
# --- Starknet configuration (mandatory) ---
STARKNET_PUBLIC_ADDRESS="YOUR_STARKNET_PUBLIC_ADDRESS"
STARKNET_PRIVATE_KEY="YOUR_STARKNET_PRIVATE_KEY"
STARKNET_RPC_URL="YOUR_STARKNET_RPC_URL"

# --- AI Model API Keys (mandatory) ---
# Add the API keys for the specific AI providers you use in config/models/default.models.json
# The agent will automatically load the correct key based on the provider name.

# Example for OpenAI:
OPENAI_API_KEY="YOUR_OPENAI_API_KEY" # (e.g., sk-...)

# Example for Anthropic:
ANTHROPIC_API_KEY="YOUR_ANTHROPIC_API_KEY" # (e.g., sk-ant-...)

# Example for Google Gemini:
GEMINI_API_KEY="YOUR_GEMINI_API_KEY"

# Example for DeepSeek:
DEEPSEEK_API_KEY="YOUR_DEEPSEEK_API_KEY"

# Note: You do not need an API key if using a local Ollama model.

# --- General Agent Configuration (mandatory) ---
SERVER_API_KEY="YOUR_SERVER_API_KEY" # A secret key for your agent server API
SERVER_PORT="3001"

# --- PostgreSQL Database Configuration (mandatory) ---
POSTGRES_USER=admin
POSTGRES_HOST=localhost
POSTGRES_DB=postgres
POSTGRES_PASSWORD=admin
POSTGRES_PORT=5432

# --- LangSmith Tracing (Optional) ---
# Set LANGSMITH_TRACING=true to enable tracing
LANGSMITH_TRACING=false
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGSMITH_API_KEY="YOUR_LANGSMITH_API_KEY" # (Only needed if LANGSMITH_TRACING=true)
LANGSMITH_PROJECT="Snak" # (Optional project name for LangSmith)

# --- Node Environment ---
NODE_ENV="development" # "development" or "production"
  1. Configure AI Models (Optional): The config/models/default.models.json file defines the default AI models used for different tasks (fast, smart, cheap). You can customize this file or create new model configurations (e.g., my_models.json) and specify them when running the agent. See config/models/example.models.json for the structure.

    The agent uses the provider field in the model configuration to determine which API key to load from the .env file (e.g., if provider is openai, it loads OPENAI_API_KEY).

  2. Create your agent configuration file (e.g., default.agent.json or my_agent.json) in the config/agents/ directory:

json
{
  "name": "Your Agent name",
  "group": "Your Agent group",
  "description": "Your AI Agent Description",
  "lore": ["Some lore of your AI Agent 1", "Some lore of your AI Agent 1"],
  "objectives": [
    "first objective that your AI Agent need to follow",
    "second objective that your AI Agent need to follow"
  ],
  "knowledge": [
    "first knowledge of your AI Agent",
    "second knowledge of your AI Agent"
  ],
  "interval": "Your agent interval beetween each transaction of the Agent in ms,",
  "chatId": "Your Agent Chat-id for isolating memory",
  "max_iterations": "The number of iterations your agent will execute before stopping",
  "mode": "The mode of your agent, can be interactive, autonomous or hybrid",
  "memory": {
    "enabled": "true or false to enable or disable memory",
    "shortTermMemorySize": "The number of messages your agent will remember"
  },
  "plugins": ["Your first plugin", "Your second plugin"],
  "mcp_servers": {
    "nxp_server_example": {
      "command": "npx",
      "args": ["-y", "@npm_package_example/npx_server_example"],
      "env": {
        "API_KEY": "YOUR_API_KEY"
      }
    },
    "local_server_example": {
      "command": "node",
      "args": ["node /path/to/local_server/dist/index.js"]
    }
  }
}

You can simply create your own agent configuration using our tool on snakagent

Usage

Prompt Mode

Run the promt:

bash
# start with the default.agent.json
pnpm run start

# start with your custom configuration
pnpm run start --agent="name_of_your_config.json" --models="name_of_your_config.json"

Server Mode

Run the server :

bash
# start with the default.agent.json
pnpm run start:server

# start with your custom configuration
pnpm run start:server --agent="name_of_your_config.json" --models="name_of_your_config.json"

Available Modes

Interactive ModeAutonomous Mode
Prompt Mode✅✅
Server Mode✅✅

Implement Snak in your project

  1. Install snak package
bash
#using npm
npm install @snakagent

# using pnpm
pnpm add @snakagent
  1. Create your agent instance
typescript
import { SnakAgent } from 'starknet-agent-kit';

const agent = new SnakAgent({
  provider: new RpcProvider({ nodeUrl: process.env.STARKNET_RPC_URL }),
  accountPrivateKey: process.env.STARKNET_PRIVATE_KEY,
  accountPublicKey: process.env.STARKNET_PUBLIC_ADDRESS,
  aiModel: process.env.AI_MODEL,
  aiProvider: process.env.AI_PROVIDER,
  aiProviderApiKey: process.env.AI_PROVIDER_API_KEY,
  signature: 'key',
  agentMode: 'interactive',
  agentconfig: y,
});

const response = await agent.execute("What's my ETH balance?");

Actions

To learn more about actions you can read this doc section. A comprehensive interface in the Kit will provide an easy-to-navigate catalog of all available plugins and their actions, making discovery and usage simpler.

To add actions to your agent you can easily follow the step-by-steps guide here

Contributing

Contributions are welcome! Feel free to submit a Pull Request.

License

MIT License - see the LICENSE file for details.


For detailed documentation visit docs.kasar.io

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "kasarlabs-snak": {
      "command": "",
      "args": []
    }
  }
}

Use Snak MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Snak is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Snak as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Snak MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "kasarlabs-snak": {
      "command": "npx",
      "args": [
        "-y",
        "snak"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Snak MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Snak MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Snak to help me with this task?
Snak
Sure. I read it.
Here is what I found using Snak.

Frequently asked questions

What is the Snak MCP server used for?

Snak is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Snak MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Snak with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Snak MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Snak connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Snak MCP to TypingMind?

Snak runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Snak MCP provide in TypingMind?

Snak exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Snak MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Snak requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇