@andrewhopper/hivemind
v1.0.1
Published
MCP
Readme
Hivemind MCP Server
An MCP server for managing development knowledge and validation through facts and acceptance criteria. This server provides tools for storing, retrieving, and validating architectural decisions, coding standards, and best practices.
Features
- Store and manage development facts with strictness levels
- Track dependencies between facts
- Define acceptance criteria for validation
- Categorize facts by type (frontend, backend, database, etc.)
- Prisma-based SQLite storage
- Full TypeScript support
Installation
npm install @modelcontextprotocol/hivemindConfiguration
Environment Variables:
- No environment variables required by default
- SQLite database is created automatically in
prisma/facts.db
Database Setup:
# Generate Prisma Client npm run prisma:generate # Run migrations npx prisma migrate deploy # Seed the database with default facts npm run db:seed
Usage
As an MCP Server
import { Server } from '@modelcontextprotocol/hivemind';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio';
const server = new Server({
name: 'hivemind',
version: '1.0.0'
});
const transport = new StdioServerTransport();
await server.connect(transport);Available Tools
get_all_facts: Get all facts in the systemget_fact: Get a fact by IDsearch_facts: Search facts by type, strictness, and versionset_fact: Create or update a factvalidate_criteria: Validate content against fact acceptance criteria
Development
Project Structure
hivemind/
├── prisma/
│ ├── schema.prisma # Database schema
│ ├── migrations/ # Database migrations
│ └── seed/ # Seed data
│ ├── index.ts # Main seed file
│ └── data/ # Categorized seed data
│ ├── frontend.ts
│ ├── backend.ts
│ ├── database.ts
│ ├── architecture.ts
│ ├── documentation.ts
│ └── tooling.ts
├── src/
│ ├── index.ts # Main server file
│ ├── storage.ts # Database operations
│ ├── types.ts # Type definitions
│ └── validation.ts # Validation logic
└── package.jsonScripts
npm run build- Build the TypeScript codenpm run dev- Run the server in development modenpm run start- Run the built servernpm run prisma:generate- Generate Prisma Clientnpm run prisma:seed- Run database seedingnpm run db:seed- Alias for prisma db seed
Seeding
The server comes with pre-defined facts covering various aspects of development:
- Frontend practices (React, Next.js, styling)
- Backend patterns (Python, FastCGI, MVC)
- Database requirements (PostgreSQL, ORMs)
- Architecture decisions
- Documentation standards
- Development tooling
To modify or add new facts:
- Edit or create new files in
prisma/seed/data/ - Run
npm run db:seedto apply changes
License
MIT
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
