# Hivemind

> A knowledge management system that provides AI coding tools with memory and constraints for libraries, patterns, and development standards.

- **Type:** MCP server
- **Install:** `agentstack add mcp-andrewhopper-hivemind`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [andrewhopper](https://agentstack.voostack.com/s/andrewhopper)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [andrewhopper](https://github.com/andrewhopper)
- **Source:** https://github.com/andrewhopper/hivemind

## Install

```sh
agentstack add mcp-andrewhopper-hivemind
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# HiveMind

A fact management system that provides automatic coding tools with consistent guidance about libraries, patterns, and development standards.

## Why HiveMind?

AI coding tools make the same mistakes again and again.  If you've tried building with NextJS 15 they frequently mess up AppRouter; using ShadCN chances are they've used the wrong command- npx install shadcn-ui instead of npx install shadcn.  They also don't make good or consistent architecture and design decisions.

When working with automatic coding tools like Cline in Cursor, developers often find themselves repeatedly providing the same guidance about coding standards, preferred libraries, and architectural patterns. HiveMind solves this by creating a centralized system for managing and enforcing these development guidelines through the Model Context Protocol (MCP).

This repository is a prototype that demonstrates an MCP server that allows facts to be set, retrieved, searched, and validated against. The goal is to help autonomous coding tools maintain consistency with your project's standards and preferences.

See an [example validation report](docs/validation/2025-02-24-validation-report.md) that demonstrates how HiveMind validates projects against established facts.

## Hivemind in Action

    
      Collaborating with Claude on Dev Standards
    
    
      
    
  

    
      Using dev standards for a new project
    
    
      
    
  

## Features
- **Facts Management**: Store and retrieve development decisions, guidelines, and standards
- **Automated Validation**: Validate code changes against established criteria
- **Flexible Categories**: Support for multiple development aspects (frontend, backend, security, etc.)
- **Configurable Rules**: Adjustable strictness levels for different types of guidelines

## Getting Started

### Prerequisites
- Node.js
- SQLite
- MCP SDK

### Installation
1. Clone the repository
2. Install dependencies:
   ```bash
   cd facts-server
   npm install
   ```
3. Build the project:
   ```bash
   npm run build
   ```
4. Configure the MCP service:

   ```
    "hivemind": {
      "command": "node",
      "args": [
        "/hivemind/facts-server/build/index.js"
      ],
      "env": {},
      "disabled": false,
      "autoApprove": []
    }
   ```

### Configuration

The `.clinerules` file configures how facts are managed:

- Automatic saving of development decisions
- Validation of proposals against existing facts
- Strictness levels for different fact types
- Category mappings for various development aspects

## Usage

### Running the Facts Server
```bash
cd facts-server
npm start
```

### Interacting with Facts

The facts server provides the following tools:
- Create/update facts
- Search facts by type, strictness, and version
- Validate content against fact criteria
- Retrieve existing facts

## Technical Details

### System Architecture

```mermaid
graph TB
    subgraph "System Architecture"
        MCP[Model Context Protocol]
        
        subgraph "Facts Management"
            FS[Facts Server]
            DB[(SQLite DB)]
            VS[Vector Search]
        end
        
        subgraph "Validation Layer"
            VP[Validation Processor]
            RC[Rules Configuration]
        end
        
        IDE[Development Environment]
    end
    
    classDef default fill:#f9f9f9,stroke:#333,stroke-width:2px;
    classDef highlight fill:#e1f5fe,stroke:#0288d1,stroke-width:2px;
    class MCP,FS highlight
```

### Request Flow

```mermaid
%%{init: {'sequence': {'width': 400, 'actorMargin': 30, 'messageMargin': 15, 'boxMargin': 10, 'fontSize': 11, 'actorFontSize': 11, 'noteFontSize': 11, 'messageFontSize': 11}}}%%
sequenceDiagram
    participant IDE as Dev Env
    participant MCP as MCP
    participant FS as Facts
    participant DB as DB
    participant VP as Validator

    IDE->>MCP: Dev Request
    MCP->>FS: Query Facts
    FS->>DB: Fetch Rules
    DB-->>FS: Rules Data
    FS->>VP: Validate
    VP-->>FS: Result
    FS-->>MCP: Facts & Valid.
    MCP-->>IDE: Standards
```

The architecture diagram shows the core components of HiveMind, centered around the Model Context Protocol (MCP) which integrates with your development environment. The Facts Server manages development guidelines and standards using a SQLite database with vector search capabilities.

### Project Structure

```
HiveMind/
├── facts-server/        # MCP server for facts management
│   ├── src/            # TypeScript source files
│   ├── prisma/         # Database schema and migrations
│   └── build/          # Compiled JavaScript output
└── .clinerules         # Configuration for facts integration
```

### Technology Stack
- TypeScript
- Prisma (SQLite)
- MCP SDK
- Vector extensions for similarity search

### Development Scripts
- `npm run build` - Build the TypeScript code
- `npm run dev` - Run with debugging enabled
- `npm start` - Start the facts server

## Contributing

Contributions are welcome! Feel free to submit issues, feature requests, or pull requests.

## Contact

You can reach me on:
- https://www.linkedin.com/in/andrewhopper
- https://x.com/andrewhopper
- https://andrewhopper.com

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [andrewhopper](https://github.com/andrewhopper)
- **Source:** [andrewhopper/hivemind](https://github.com/andrewhopper/hivemind)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-andrewhopper-hivemind
- Seller: https://agentstack.voostack.com/s/andrewhopper
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
