AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

SelfHub

mcp-sagargupta16-selfhub · by Sagargupta16

Personal MCP-powered digital hub - private data center with AI integration for memory, notes, and personal knowledge management

No reviews yet
0 installs
25 views
0.0% view→install

Install

$ agentstack add mcp-sagargupta16-selfhub

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-sagargupta16-selfhub)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of SelfHub? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

SelfHub MCP Server

[](https://github.com/Sagargupta16/SelfHub/actions/workflows/ci.yml) [](LICENSE)

Your Personal AI Memory Hub - Store and retrieve your personal data from any MCP-enabled AI assistant.

🎯 What is SelfHub?

SelfHub is a Model Context Protocol (MCP) server that acts as your personal digital memory. Store notes, preferences, code snippets, tasks, and any information you want - then access them seamlessly from any AI assistant that supports MCP (Claude Desktop, VS Code Copilot, etc.).

Think of it as your personal knowledge base that travels with you across all AI conversations.

🚀 Setup with Claude Desktop

Step 1: Install and Build

git clone https://github.com/Sagargupta16/SelfHub.git
cd SelfHub
pnpm install
cp .env.example .env   # set MONGODB_URI to your MongoDB connection string
pnpm build

# Optional: load sample data
pnpm seed

Step 2: Configure Claude Desktop

Open the Claude Desktop configuration file:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Add this configuration (replace with your actual path):

{
  "mcpServers": {
    "selfhub": {
      "command": "node",
      "args": ["C:\\absolute\\path\\to\\SelfHub\\build\\index.js"]
    }
  }
}

Important for Windows: Use double backslashes (\\) in the path!

Step 3: Restart Claude Desktop

Completely quit and restart Claude Desktop.

Step 4: Test It!

In Claude, try:

  • "List all my memories"
  • "Search my memories for typescript"
  • "Store that I prefer dark mode in all applications"

💻 Setup with VS Code

Step 1: Build the Server

pnpm build

Step 2: Configure VS Code

Create .vscode/mcp.json in your workspace (replace with your actual path):

{
  "servers": {
    "selfhub": {
      "type": "stdio",
      "command": "node",
      "args": ["C:\\absolute\\path\\to\\SelfHub\\build\\index.js"]
    }
  }
}

Then reload VS Code: Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) → Type "Reload Window" → Press Enter

Step 3: Test in Copilot Chat

Open GitHub Copilot Chat (Ctrl+Alt+I) and try:

@workspace list my memories
@workspace search my memories for "typescript"
@workspace store in my memory: I love using pnpm for package management

Note: You need GitHub Copilot extension installed and enabled.

🛠️ Available Tools

Memory Management (5 tools)

1. store_memory

Store new information in your memory hub.

Example:

Store that I prefer TypeScript over JavaScript for all new projects

Parameters:

  • content (required) - The information to store
  • type - Memory type: short-term, long-term, contextual
  • category - Category: personal, professional, learning, projects, code, tasks, etc.
  • title - Optional title
  • tags - Array of tags
  • importance - 1-5 importance level
2. retrieve_memory

Get a specific memory by its ID.

Example:

Retrieve memory mem_001
3. list_memories

List memories with optional filters.

Example:

List all my professional memories
Show me memories tagged with 'typescript'
List my personal memories

Parameters:

  • type - Filter by type
  • category - Filter by category
  • tags - Filter by tags
  • contextId - Filter by context
  • limit - Max results (default: 50)
  • offset - Pagination offset
4. search_memories

Search through your memories using text queries.

Example:

Search my memories for "typescript"
Find memories about "API design"

Parameters:

  • query (required) - Search query
  • category - Filter by category
  • type - Filter by type
  • tags - Filter by tags
  • limit - Max results (default: 10)
5. delete_memory

Delete a memory by ID.

Example:

Delete memory mem_005

Context Management (3 tools)

6. create_context

Create a new organizational context.

Example:

Create a new context called "Machine Learning Project" for project type

Parameters:

  • name (required) - Context name
  • type (required) - conversation, project, topic, temporal
  • description - Optional description
  • tags - Array of tags
  • memoryIds - Initial memory IDs to include
7. activate_context

Activate a context and load its memories.

Example:

Activate the "SelfHub Development" context
8. list_contexts

List all contexts with optional filters.

Example:

List all my project contexts
Show active contexts

Analytics (1 tool)

9. get_stats

Get usage statistics and insights.

Example:

Show me my memory statistics

Returns:

  • Total memories count
  • Memories by type breakdown
  • Memories by category breakdown
  • Total contexts
  • Most used tags

📚 Example Usage Scenarios

Personal Knowledge Management

Store that I prefer dark mode in all applications
Store my favorite TypeScript coding conventions
Remember that I use pnpm for package management
Search my memories for "preferences"

Project Development

Create a new context called "SelfHub Development" for project type
Store in SelfHub context: Database schema uses Drizzle ORM
Activate the SelfHub Development context
List all memories in the SelfHub context

Learning & Notes

Store as learning: Vector embeddings represent text as numerical arrays
Tag with "machine-learning" and "embeddings"
Search my learning memories for "embeddings"
List all my learning-related memories

Code Snippets

Store this code snippet: const sum = (a, b) => a + b
Category: code, Tags: javascript, utility
Search my code for "utility functions"

🗂️ Sample Data

Run pnpm seed to load 6 sample memories into your database:

  1. memsample001 - Dark mode UI preference (personal)
  2. memsample002 - TypeScript best practice (professional)
  3. memsample003 - MongoDB basics (learning)
  4. memsample004 - Documentation update task (tasks)
  5. memsample005 - NPM commands quick reference (code)
  6. memsample006 - SelfHub project overview (projects)

And 2 sample contexts:

  1. ctxsample001 - SelfHub Development (project)
  2. ctxsample002 - Personal Preferences (topic)

🏗️ Project Structure

SelfHub/
├── src/
│   ├── index.ts              # Main MCP server
│   ├── seed.ts               # Sample data seeder
│   ├── db/                   # Database layer
│   │   ├── connection.ts
│   │   └── schemas.ts
│   ├── models/               # TypeScript type definitions
│   │   ├── memory.model.ts
│   │   ├── context.model.ts
│   │   └── index.ts
│   ├── services/             # Business logic layer
│   │   ├── memory.service.ts
│   │   └── context.service.ts
│   └── storage/              # Storage implementation
│       └── mongodb-storage.ts # MongoDB persistent storage
├── build/                    # Compiled JavaScript output
├── .env.example              # Environment variable template
├── package.json
├── tsconfig.json
└── README.md

🔧 Development

Available Scripts

# Development mode (auto-reload with tsx)
pnpm dev

# Type checking
pnpm typecheck

# Build for production
pnpm build

# Clean build directory
rm -rf build

How It Works

  1. MCP Server (src/index.ts) - Implements the MCP protocol, defines 9 tools
  2. Services Layer - Business logic for memory and context operations
  3. Storage Layer - MongoDB persistent storage via Mongoose (set MONGODB_URI in .env)
  4. Models - TypeScript interfaces for type safety

Testing Locally

# Start the server
pnpm dev

# You should see:
# 🚀 SelfHub MCP Server running with MongoDB!
# 💾 Database: Connected and ready
# 🛠️  Available tools: 9 (store, retrieve, search, list, delete, contexts, stats)

The server runs on stdio (standard input/output) and waits for MCP protocol messages. You cannot interact with it directly - it needs an MCP client like Claude Desktop or VS Code.

🐛 Troubleshooting

Server Not Showing in Claude Desktop

  1. Check the config path:
  • Make sure you're editing the correct config file
  • Use absolute path, not relative
  1. Verify build exists:

``bash ls build/index.js ``

  1. Check for typos:
  • Windows paths need double backslashes: C:\\path\\to\\
  • JSON syntax must be valid
  1. Restart Claude completely:
  • Quit from system tray
  • Wait a few seconds
  • Start again
  1. Check Claude logs:
  • Windows: %APPDATA%\Claude\logs
  • macOS: ~/Library/Logs/Claude

VS Code Not Showing Tools

  1. Make sure GitHub Copilot is installed:
  • Press Ctrl+Shift+X
  • Search "GitHub Copilot"
  • Install both "GitHub Copilot" and "GitHub Copilot Chat"
  1. Reload VS Code window:
  • Ctrl+Shift+P → "Reload Window"
  1. Check the build:

``bash pnpm build ``

Build Errors

# Clean and rebuild
rm -rf build node_modules
pnpm install
pnpm build

Data Not Persisting

SelfHub uses MongoDB persistent storage - your data survives server restarts. If data isn't persisting:

  1. Check your .env file:
  • Make sure MONGODB_URI points to your MongoDB instance
  • Copy from the template if missing: cp .env.example .env
  1. Verify the connection:
  • The server logs ✅ Connected to MongoDB on startup
  • Without MONGODB_URI, it falls back to mongodb://localhost:27017/selfhub

🔄 Dependency Updates

This project uses Renovate for automated dependency updates - see renovate.json.

📖 Documentation

🗺️ Roadmap

Current Version (v0.2.0)

  • ✅ MongoDB persistent storage
  • ✅ 9 MCP tools
  • ✅ Memory categorization and tagging
  • ✅ Context management
  • ✅ Text-based search
  • ✅ Sample data seeder

Future Enhancements

  • [ ] Vector embeddings for semantic search
  • [ ] File import/export (JSON, Markdown, CSV)
  • [ ] Data encryption for sensitive information
  • [ ] Web UI for management
  • [ ] Multi-user support
  • [ ] Cloud sync

🤝 Contributing

Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) and feel free to submit a Pull Request.

📄 License

MIT License - see [LICENSE](LICENSE) file for details.

💬 Support

If you have questions or run into issues:

  1. Check the [Troubleshooting](#-troubleshooting) section
  2. Review the documentation above
  3. Open an issue on GitHub

🌟 Acknowledgments

Built with:


Made with ❤️ by Sagargupta16

Your personal AI memory hub - remember everything, access anywhere!

Source & license

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

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

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.