vybe-mcp
v1.0.0
Published
MCP server built with TypeScript and Bun - Second Memory System with Discord integration
Readme
Vybe MCP - Second Memory System
An MCP (Model Context Protocol) server that provides a "second memory" system for AI assistants. Store, retrieve, and share summaries through Discord.
Features
- Summarize & Store: Automatically summarize text and store it in a SQLite database
- Memory Resources: Access stored memories as MCP resources in new chats/tabs
- Discord Integration: Send summaries to Discord channels as .txt files
- Search: Search through stored memories by content
- Docker Support: Run everything in containers
Quick Start
1. Install Dependencies
bun install2. Configure Discord (Optional)
Copy .env.example to .env and fill in your Discord bot credentials:
cp .env.example .envEdit .env:
DISCORD_BOT_TOKEN=your_bot_token_here
DISCORD_CHANNEL_ID=your_channel_id_hereHow to get Discord credentials:
- Go to https://discord.com/developers/applications
- Create a new application
- Go to "Bot" section → Create a bot
- Copy the bot token
- Enable "Message Content Intent" in Bot settings
- Get your channel ID (right-click channel → Copy ID)
3. Run the Server
# Development mode
bun run dev
# Production mode
bun run start
# With MCP Inspector (for testing)
bun run inspectorDocker Setup
Build and Run
# Build image
bun run docker:build
# or
docker build -t vybe-mcp .
# Run container (automatically loads .env file)
bun run docker:run
# or
docker run -i --rm --env-file .env vybe-mcp
# Or use Docker Compose (automatically loads .env file)
docker compose up --buildWith MCP Inspector
# Using npm script (automatically loads .env file)
bun run docker:inspector
# Or manually
npx @modelcontextprotocol/inspector docker run -i --rm --env-file .env vybe-mcpMCP Tools
summarize_and_store
Summarizes text and stores it in the database.
Parameters:
text(required): The text to summarizetags(optional): Array of tags for categorizationmaxLength(optional): Maximum summary length (50-1000, default: 200)metadata(optional): Additional metadata object
Example:
{
"text": "Long conversation about project planning...",
"tags": ["project", "planning"],
"maxLength": 300
}send_to_discord
Sends a summary to Discord channel as a .txt file.
Parameters:
memoryId(optional): ID of stored memory to sendtext(optional): Text to send directlyincludeMetadata(optional): Include metadata in file (default: true)
Example:
{
"memoryId": 1
}search_memories
Search through stored memories.
Parameters:
query(required): Search querylimit(optional): Max results (1-50, default: 10)
Example:
{
"query": "project planning",
"limit": 5
}MCP Resources
memory://{id}
Retrieve a specific memory by ID.
Example: memory://1
memory://all
Get all stored memories (up to 50 most recent).
Example: memory://all
memory://stats
Get memory statistics and recent memories.
Example: memory://stats
Usage in Cursor/Claude
Add to your MCP configuration (~/.cursor/mcp.json):
{
"mcpServers": {
"vybe-mcp": {
"command": "bun",
"args": ["run", "/path/to/vybe-mcp/src/index.ts"],
"env": {
"DISCORD_BOT_TOKEN": "your_token",
"DISCORD_CHANNEL_ID": "your_channel_id"
}
}
}
}Or with Docker:
{
"mcpServers": {
"vybe-mcp": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-v", "/path/to/data:/app/data",
"--env-file", "/path/to/.env",
"vybe-mcp"
]
}
}
}Workflow Example
Store a summary:
Use summarize_and_store to save: "Discussed project timeline with team"In a new chat/tab:
Access memory://all to see all stored memoriesSend to Discord:
Use send_to_discord with memoryId: 1Search:
Use search_memories with query: "project"
Database
The database is stored in data/memories.db (SQLite). The schema includes:
id: Unique memory IDoriginal_text: Full original textsummary: Generated summarycreated_at: Creation timestampupdated_at: Last update timestamptags: JSON array of tagsmetadata: JSON object with additional data
Project Structure
vybe-mcp/
├── src/
│ ├── index.ts # Main MCP server
│ ├── db.ts # Database operations
│ ├── summarizer.ts # Text summarization
│ └── discord.ts # Discord integration
├── data/ # Database storage (created automatically)
├── Dockerfile
├── docker-compose.yml
├── package.json
└── README.mdDevelopment
# Watch mode
bun run dev
# Test with inspector
bun run inspector
# Build
bun run buildLicense
MIT
