npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vara-mcp-server

v0.4.3

Published

MCP server for Vara Network smart program development with Sails

Downloads

64

Readme

Vara MCP Server

npm version CI License: MIT Node.js

Build Vara Network smart programs 40-100x faster with AI-assisted development in Cursor IDE.

A production-ready Model Context Protocol (MCP) server that lets you scaffold, compile, test, and generate TypeScript clients for Vara Network smart programs using natural language.


🚀 Before vs After

❌ Before: Traditional Vara Development

📋 Manual Steps Required                           ⏱️ Time
─────────────────────────────────────────────────────────
1. Research Sails docs & examples                  30-60 min
2. Manually create Cargo.toml, lib.rs, build.rs   15-30 min  
3. Write service, program, events from scratch     30-60 min
4. Debug build errors (targets, crate-types)       15-45 min
5. Run cargo build, fix errors, repeat             5-10 min
6. Research gear-js API for client code            45-90 min
7. Write TypeScript client from scratch            30-45 min
8. Set up tests with gtest                         20-30 min
─────────────────────────────────────────────────────────
Total: 3-6 hours for a basic counter program 😫

✅ After: With vara-mcp-server

💬 Just Ask in Cursor                              ⏱️ Time
─────────────────────────────────────────────────────────
"Create a Vara MVP called my-counter"              ~2 min
─────────────────────────────────────────────────────────
✓ Complete Rust program with Sails
✓ Service with state, commands, queries, events
✓ Proper Cargo.toml with all dependencies
✓ Build script for WASM compilation
✓ TypeScript client with full API
✓ Ready to deploy!

Total: ~2 minutes 🚀

📊 Speed Comparison

┌─────────────────────────────────────────────────────────────────┐
│                Time to First Working Program                    │
├─────────────────────────────────────────────────────────────────┤
│                                                                 │
│  Traditional    ████████████████████████████████████  3-6 hours │
│                                                                 │
│  With MCP       ██  ~2 minutes                                  │
│                                                                 │
│                 └─────────────────────────────────────────────  │
│                           40-100x faster                        │
└─────────────────────────────────────────────────────────────────┘

📦 Installation

npm install -g vara-mcp-server

⚙️ Cursor IDE Setup

Add to your .cursor/mcp.json (project) or ~/.cursor/mcp.json (global):

{
  "mcpServers": {
    "vara-mcp": {
      "command": "npx",
      "args": ["vara-mcp-server"]
    }
  }
}

Restart Cursor after adding the configuration.


🛠️ Available Tools

| Tool | Description | Example | |------|-------------|---------| | vara_scaffold_program | Create new Vara program from template | "Create a counter program called my-dapp" | | vara_compile | Compile to optimized WASM | "Compile my-dapp in release mode" | | vara_test | Run program tests | "Run tests for my-dapp" | | vara_client_scaffold | Generate TypeScript client | "Generate a client for my-dapp" | | vara_docs_search | Search Vara/Sails documentation | "How do I emit events in Sails?" |


💬 Available Prompts

Create a Vara MVP

Runs the complete workflow automatically:

Scaffold → Compile → Test → Generate Client

Add Feature to Program

Get guidance on adding new features to existing programs with code suggestions.


📚 Available Resources

Access bundled documentation directly in Cursor:

  • Vara Sails Quickstart - Getting started guide
  • Build Targets & Gotchas - Common issues and solutions
  • Gear-JS Interaction Basics - JavaScript SDK guide

🎯 Example Usage

1. Create a New Program

In Cursor chat:

Create a Vara smart program called "my-token" using the counter template

2. Compile to WASM

Compile my-token in release mode

Output:

✓ my_token.opt.wasm (73 KB)
✓ my_token.idl

3. Generate TypeScript Client

Generate a TypeScript client for my-token

4. Use the Client

import { MyTokenClient } from './my-token-client';

const client = new MyTokenClient();
await client.connect('wss://testnet.vara.network');
await client.initKeyring(process.env.VARA_SEED);

// Upload program
const programId = await client.uploadProgram({
  wasmPath: './target/wasm32-gear/release/my_token.opt.wasm'
});

// Interact
await client.sendMessage({ payload: { Counter: { Increment: null } } });
const state = await client.readState();

🔒 Security

This server implements strict security measures:

| Feature | Implementation | |---------|----------------| | Command Allowlist | Only cargo, node, npm/pnpm/yarn, rustup allowed | | Path Sandboxing | All file operations restricted to workspace root | | No Shell Execution | Commands spawned directly with shell: false | | No Secret Persistence | Secrets read from env vars only, never logged |

See security.md for details.


🧪 Development

Prerequisites

  • Node.js 18+
  • pnpm 9+
  • Rust toolchain (for testing builds)

Setup

git clone https://github.com/Adityaakr/vara-mcp-server.git
cd vara-mcp-server
pnpm install
pnpm build
pnpm test

Run Locally

node packages/server/dist/index.js

📁 Project Structure

vara-mcp-server/
├── packages/
│   ├── server/      # MCP server entry point
│   ├── runtime/     # Safe execution utilities
│   ├── templates/   # Sails program templates
│   └── chain/       # TypeScript client generator
├── docs/
│   ├── cursor-setup.md
│   ├── security.md
│   └── troubleshooting.md
└── README.md

🐛 Troubleshooting

cargo not found

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

WASM target not installed

cargo build --release  # output: target/wasm32-gear/release/ (.wasm, .opt.wasm, .idl)

Server not connecting in Cursor

  1. Check path in .cursor/mcp.json
  2. Restart Cursor completely
  3. Enable debug mode: "env": { "VARA_DEBUG": "true" }

See troubleshooting.md for more solutions.


🤝 Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.


📄 License

MIT © Aditya Kumar


🔗 Links