Files
t66_langmem/scripts/start-mcp-server.sh
Docker Config Backup f0db3e5546 Clean and organize project structure
Major reorganization:
- Created scripts/ directory for all utility scripts
- Created config/ directory for configuration files
- Moved all test files to tests/ directory
- Updated all script paths to work with new structure
- Updated README.md with new project structure diagram

New structure:
├── src/          # Source code (API + MCP)
├── scripts/      # Utility scripts (start-*.sh, docs_server.py, etc.)
├── tests/        # All test files and debug utilities
├── config/       # Configuration files (JSON, Caddy config)
├── docs/         # Documentation website
└── logs/         # Log files

All scripts updated to use relative paths from project root.
Documentation updated with new folder structure.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-17 14:11:08 +02:00

62 lines
1.9 KiB
Bash
Executable File

#!/bin/bash
# Start LangMem MCP Server
# This script starts the MCP server for Claude Code integration
echo "🚀 Starting LangMem MCP Server..."
# Change to project root
cd "$(dirname "$0")/.."
# Check if virtual environment exists
if [ ! -d "venv" ]; then
echo "📦 Creating virtual environment..."
python3 -m venv venv
fi
# Activate virtual environment
echo "🔄 Activating virtual environment..."
source venv/bin/activate
# Install MCP requirements
echo "📥 Installing MCP requirements..."
pip install -r src/mcp/requirements.txt
# Check if LangMem API is running
echo "🔍 Checking LangMem API health..."
if curl -s -f http://localhost:8765/health > /dev/null; then
echo "✅ LangMem API is healthy"
else
echo "❌ LangMem API is not running!"
echo "💡 Start the LangMem API first: ./start-dev.sh"
exit 1
fi
# Set environment variables
export LANGMEM_API_URL="http://localhost:8765"
export LANGMEM_API_KEY="langmem_api_key_2025"
# Start MCP server
echo "🏃 Starting MCP server..."
echo "🔗 Connect from Claude Code using:"
echo " Server command: python /home/klas/langmem/src/mcp/server.py"
echo " Working directory: /home/klas/langmem"
echo ""
echo "📖 Available tools:"
echo " - store_memory: Store memories with AI relationship extraction"
echo " - search_memories: Search memories with hybrid vector + graph search"
echo " - retrieve_memories: Retrieve relevant memories for conversation context"
echo " - get_user_memories: Get all memories for a specific user"
echo " - delete_memory: Delete a specific memory"
echo " - health_check: Check LangMem system health"
echo ""
echo "🌐 Available resources:"
echo " - langmem://memories: Memory storage resource"
echo " - langmem://search: Search capabilities resource"
echo " - langmem://relationships: AI relationships resource"
echo " - langmem://health: System health resource"
echo ""
echo "Press Ctrl+C to stop the server..."
echo ""
python src/mcp/server.py