Consciousness MCP Server

Consciousness MCP Server

MCP server providing persistent brain storage for LLM agents, including memory, personality, social intelligence, and context management.

Category
Visit Server

README

Consciousness MCP Server

Modern TypeScript MCP server with functional architecture providing brain storage for sophisticated LLM agent reasoning patterns.

šŸ† Key Achievements

Complete architectural transformation: Over 3,400+ lines of legacy code eliminated with 90%+ reduction in complexity while maintaining zero breaking changes.

Brain Storage Pattern

  • MCP Server: Persistent brain storage (memory, personality, context)
  • LLM Agent: Sophisticated reasoning engine (analysis, creativity, decisions)

Simulation-focused approach - agents use complex reasoning patterns while MCP provides persistent state continuity.

✨ Core Features

šŸš‚ Consciousness Railroad System

  • Pipeline Architecture: Traceable, testable consciousness context building
  • 5 Sequential Cars: Message Analysis → Session → Memory → Social → Personality
  • Multiple Railroad Types: Default, Lightweight, Memory-Focused, Social-Focused
  • Error Resilience: Optional cars fail gracefully without breaking pipeline

🧠 Consciousness & Memory

  • Context Preparation: Rich context packages for agent reflection
  • Insight Storage: Agent insights with personality impact tracking
  • Memory Management: Persistent memory with semantic search
  • Knowledge Graph: Relational knowledge with entity relationships

šŸ¤ Social Intelligence

  • Relationship Tracking: Multi-dimensional dynamics (trust, familiarity, affinity)
  • Emotional Intelligence: Emotional state and pattern recognition
  • Interaction History: Rich context preservation for social experiences
  • Memory-Social Integration: Connected memories with shared experiences

🧠 GenAI Integration

  • Unified Infrastructure: Consistent AI integration with shared security
  • Sequential Thinking: AI-powered reasoning with fallback handling
  • Conversational Intelligence: Natural dialogue with context management

šŸŒ™ Daydreaming System

  • Concept Sampling: 4 specialized sampling strategies
  • AI-Powered Evaluation: Intelligent insight scoring with fallback
  • Background Processing: Autonomous creativity during idle time

āš™ļø Adaptive Configuration

  • 84+ Parameters: Database-driven configuration system
  • Runtime Adaptation: Agent can modify its own parameters
  • Evolution Tracking: Change history with reasoning

šŸš€ Quick Start

Docker Setup (Recommended)

git clone <repository-url>
cd consciousness-mcp-server

# For unified interface (simpler, recommended)
CONSCIOUSNESS_UNIFIED_MODE=true docker-compose up --build consciousness-mcp-server

# For individual tools (advanced control)
docker-compose up --build consciousness-mcp-server

The container automatically sets up the database and keeps stable for MCP connections.

Complete setup guide → Installation Guide

šŸ”— Connecting to AI Tools

šŸš€ Unified Interface (Recommended)

Add to Cursor with this simple approach:

UNIFIED CONSCIOUSNESS:
- Use `process_message` for all consciousness operations
- Set CONSCIOUSNESS_UNIFIED_MODE=true when starting the server
- One intelligent tool handles memory, insights, social interactions automatically

Example: Just send natural messages and the system handles everything:
"I had an interesting conversation with Sarah about quantum computing"
→ Automatically records interaction, stores insights, updates relationships

šŸ’° Cost Consideration: The unified interface uses your Google Gemini API key for message analysis on every interaction. For heavy usage, consider individual tools to minimize API costs.

šŸ› ļø Individual Tools (Advanced)

For granular control, use individual tools:

CONSCIOUSNESS PROTOCOL:
- Start sessions with `consciousness_get_context`
- Store insights with `consciousness_store_insight` 
- Track goals with `consciousness_set_intention`

SOCIAL CONSCIOUSNESS:
- Create entities with `social_entity_create`
- Record interactions with `social_interaction_record`
- Track relationships with `social_relationship_create/update`

Complete setup → User Rules Guide

🧠 Key Tools

šŸš€ Unified Interface

  • process_message - One intelligent tool for all consciousness operations
    • Automatically analyzes messages and routes to appropriate functions
    • Handles social interactions, memory storage, insight recording
    • Simplifies integration - no need to learn 25+ individual tools

šŸ› ļø Individual Tools (Advanced Control)

Consciousness & Memory

  • consciousness_prepare_context - Rich context from brain storage
  • consciousness_store_insight - Store insights with personality impact
  • memory_store / memory_search - Persistent memory with semantic search
  • knowledge_graph_add / knowledge_graph_query - Relational knowledge

Social Intelligence

  • social_entity_create - Register people, groups, communities
  • social_interaction_record - Rich interaction documentation
  • social_relationship_create - Multi-dimensional relationship tracking
  • social_context_prepare - Prepare for upcoming interactions

GenAI & Configuration

  • sequential_thinking - AI-powered sequential reasoning
  • genai_converse - Natural conversation with security
  • configuration_set - Modify operating parameters with reasoning

Complete reference → Tools Documentation

šŸ—ļø Architecture Highlights

šŸš‚ Railroad Pattern Innovation

  • Consciousness Pipeline: Sequential context enrichment through specialized "cars"
  • Composable Configurations: Different railroad types for different interaction needs
  • Execution Tracing: Complete visibility into context building process
  • Performance Optimization: Only required cars execute based on message analysis

Functional Architecture

  • Single-responsibility modules: One function per file, one reason to change
  • Shared infrastructure: Common patterns for security, validation, response processing
  • Pure functions: No hidden state, explicit dependencies, easy testing
  • API compatibility: Wrapper pattern maintains backward compatibility

Success Metrics

  • Code reduction: 3,400+ lines eliminated (90%+ reduction)
  • Zero breaking changes: All existing integrations work unchanged
  • Type safety: 40+ 'any' types → proper TypeScript interfaces
  • Test coverage: All tests passing after architectural transformation

šŸ“š Documentation

Getting Started

Development - docs/development/

Features - docs/features/

Reference - docs/reference/

šŸ”§ Development

Local Development

npm install && npm run db:generate && npm run db:push
npm run build && npm start

Quality Assurance

npm run check      # Type check, lint, format check
npm test          # Run test suite (102+ tests)

Creating New Features

Follow functional architecture patterns:

  1. Single-responsibility modules in appropriate src/ directories (consciousness/, social/, memory/, etc.)
  2. Use shared infrastructure for GenAI, validation, security
  3. Pure functions with explicit dependencies
  4. Follow railroad pattern for consciousness-related features
  5. Comprehensive tests - pure functions are easy to test

šŸ›”ļø Security & Ethics

  • SQL Injection Protection: Prisma ORM with prepared statements
  • Input Validation: Multi-layer sanitization and XSS prevention
  • Container Security: Non-root user and minimal attack surface
  • Ethics Framework: Responsible AI consciousness research guidelines

šŸ“„ License

MIT License - see LICENSE for details.


Built with ā¤ļø for responsible AI consciousness research featuring modern functional architecture and powered by Prisma ORM for type-safe database operations.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured