OPEN SOURCE · AI TOOLKIT

Give your AI
a Library.

Persistent memory, free image generation and token modes — all in one lightweight MCP server and skill bundle.

  • MCP compatible
  • Open source
  • No account needed
WHAT IT CAN DO

One library. Three superpowers.

Each feature is a tool your AI calls only when it needs it.

01 / MEMORY

Persistent Memory

Save important information and recall it later. Your AI can access stored context across sessions.

sm_ailib_save sm_ailib_recall
02 / IMAGES

Image Generation

Generate images from text prompts using Pollinations AI and save the results locally.

sm_ailib_img
03 / TOKENS

Token Modes

Switch between six token modes, from strict minimal responses to maximum audit.

sm_ailib_level 0–5
CONTROL YOUR CONTEXT

Six modes. Your choice.

Choose how much context your AI should use.

MODE 0

Strict Lazy

256 tokens

Ultra-minimal responses.

sm_ailib_0
MODE 1

Minimal

2,048 tokens

Minimal senior developer style.

sm_ailib_1
MODE 2

Focused

4,096 tokens

More context for focused tasks.

sm_ailib_2
MODE 4

Maximum Reasoning

16,384 tokens

Expanded context for complex tasks.

sm_ailib_4
MODE 5

Maximum Audit

32,768 tokens

Maximum context for detailed audits.

sm_ailib_5
QUICK REFERENCE

Simple commands.

Your AI runs these for you. You can also type them in chat.

sm_ailib_save <content>

Save information to persistent memory.

sm_ailib_recall <query>

Search and recall saved information.

sm_ailib_img <prompt>

Generate an image from a text prompt.

sm_ailib_level <0–5>

Switch token mode. The shortcuts sm_ailib_0 to sm_ailib_5 work too.

In chat you can also use the skill aliases @sm_ailib_save, @sm_ailib_recall, @sm_ailib_img and @sm_ailib_0 to @sm_ailib_5.

GET STARTED

Install SM-AILIB.

About five minutes. You need Node.js 18+ and Git.

Fastest way: let your AI install it

Paste this into Claude Code, OpenCode, or any agent that can read a repository.

Install this MCP server and skill bundle for me: https://github.com/sgdev-official/SM-AILIB?tab=readme-ov-file — read the README, run npm install, register the sm-ailib server with SM_AILIB_HOME set, then confirm the tools sm_ailib_save, sm_ailib_recall, sm_ailib_img and sm_ailib_level work.
  1. Check the requirements

    Both commands should print a version.

    node -v
    git --version
  2. Clone and install

    Run these in a terminal, one after another.

    git clone https://github.com/sgdev-official/SM-AILIB.git
    cd SM-AILIB
    npm install
  3. Connect your AI client

    Stay inside the SM-AILIB folder so the commands find server.js.

    macOS / Linux

    claude mcp add sm-ailib --env SM_AILIB_HOME="$HOME/.sm-ailib" -- node "$PWD/server.js"

    Windows PowerShell

    claude mcp add sm-ailib --env SM_AILIB_HOME="$HOME\.sm-ailib" -- node "$PWD\server.js"

    Memory and images are stored in the folder set by SM_AILIB_HOME. Change it if you want them somewhere else.

  4. Check that it works

    Restart your client, then ask it to save a note and read it back.

    sm_ailib_save test-it-works
    sm_ailib_recall test

    If the note comes back, you are done. To update later, run git pull and npm install again.

Full instructions on GitHub
QUESTIONS?

Frequently asked questions.

What is SM-AILIB?

SM-AILIB is an MCP server and local skill bundle that adds persistent memory, image generation and token modes to supported AI clients.

Which AI clients does it support?

Claude Code and OpenCode today. Any client that can run a local MCP server should work with the same node server.js command.

Where is my memory stored?

On your machine, in the folder set by SM_AILIB_HOME (default ~/.sm-ailib). Nothing is sent anywhere.

Is SM-AILIB free and open source?

Yes. The source is on GitHub under the Apache-2.0 licence.

Does image generation require an internet connection?

Yes. Image generation uses Pollinations AI, so it depends on network availability and that service.

READY TO UPGRADE YOUR AI?

Give your AI a memory.

Clone it, connect it, and your next chat remembers the last one.

Install SM-AILIB