setup.sh 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/usr/bin/env bash
  2. #
  3. # setup.sh -- Install an MCP-compatible memory server for persistent agent memory.
  4. #
  5. # Usage:
  6. # ./integrations/mcp-memory/setup.sh
  7. set -euo pipefail
  8. echo "MCP Memory Integration Setup"
  9. echo "=============================="
  10. echo ""
  11. # Install your preferred MCP memory server.
  12. # The memory integration requires an MCP server that provides:
  13. # - remember: store decisions, deliverables, context
  14. # - recall: search memories by keyword or semantic similarity
  15. # - rollback: revert to a previous state
  16. #
  17. # Example (replace with your chosen server):
  18. # pip install <your-mcp-memory-server>
  19. # npm install <your-mcp-memory-server>
  20. echo "This integration requires an MCP-compatible memory server."
  21. echo ""
  22. echo "Your MCP memory server must provide these tools:"
  23. echo " - remember: store decisions, deliverables, and context"
  24. echo " - recall: search memories by keyword or semantic similarity"
  25. echo " - rollback: revert to a previous state"
  26. echo " - search: find specific memories across sessions"
  27. echo ""
  28. echo "Install your preferred MCP memory server, then add it to your"
  29. echo "MCP client config. See integrations/mcp-memory/README.md for details."
  30. echo ""
  31. # Check if an MCP client config exists in common locations
  32. CONFIG_FOUND=false
  33. if [ -f "$HOME/.config/claude/mcp.json" ]; then
  34. echo "Found MCP config at ~/.config/claude/mcp.json"
  35. CONFIG_FOUND=true
  36. fi
  37. if [ -f "$HOME/.cursor/mcp.json" ]; then
  38. echo "Found MCP config at ~/.cursor/mcp.json"
  39. CONFIG_FOUND=true
  40. fi
  41. if [ -f ".mcp.json" ]; then
  42. echo "Found MCP config at .mcp.json"
  43. CONFIG_FOUND=true
  44. fi
  45. if [ "$CONFIG_FOUND" = false ]; then
  46. echo "No MCP client config found."
  47. echo ""
  48. echo "Add your memory server to your MCP client config:"
  49. echo ""
  50. echo ' {'
  51. echo ' "mcpServers": {'
  52. echo ' "memory": {'
  53. echo ' "command": "your-mcp-memory-server",'
  54. echo ' "args": []'
  55. echo ' }'
  56. echo ' }'
  57. echo ' }'
  58. fi
  59. echo ""
  60. echo "Next steps:"
  61. echo " 1. Install an MCP memory server (pip install or npm install)"
  62. echo " 2. Add it to your MCP client config"
  63. echo " 3. Add a Memory Integration section to any agent prompt"
  64. echo " (see integrations/mcp-memory/README.md for the pattern)"