Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@memory-mesh/mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Memory Mesh CLI
A command-line tool to configure AI-powered knowledge management for development teams using Memory Mesh MCP integration.
Overview
The Memory Mesh CLI provides two essential commands for setting up Memory Mesh MCP integration:
init- Initialize your project with Memory Mesh configuration files and IDE integrationinstall- Configure MCP server connection to Memory Mesh service
This CLI enables AI assistants in your IDE to access and create memory fragments, search team knowledge, explore relationships, and maintain institutional knowledge across your development team.
Installation
npm install -g @memory-mesh/mcp-serverOr use directly with npx:
npx @memory-mesh/mcp-server init
npx @memory-mesh/mcp-server installCommands
Initialize Project
Initialize your project with Memory Mesh configuration:
npx @memory-mesh/mcp-server initOptions:
--ide <ide>- IDE to configure (default: "cursor")--output-dir <dir>- Output directory for IDE config files (default: ".")--workspace-id <id>- Optional: Memory Mesh workspace ID to fetch fragment types--api-token <token>- Optional: Memory Mesh API access token to fetch fragment types--memory-mesh-url <url>- Optional: Memory Mesh API URL (default: "https://memory-mesh.com")--skip-auto-install- Skip automatic MCP server installation (default: false)
Auto-Detection & Auto-Install Behavior
The init command includes intelligent auto-detection and auto-install features:
- IDE Detection: Automatically detects existing MCP installations across multiple IDEs
- Auto-Install: If no MCP installation is found, prompts to automatically install
- Smart Configuration: Creates IDE-specific configuration files with repository context
Supported IDEs for Auto-Detection:
- Cursor:
~/.cursor/mcp.json,~/Library/Application Support/Cursor/,~/.config/cursor/ - Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json - VS Code:
~/Library/Application Support/Code/User/,~/.vscode/ - Cline:
~/.cline/,~/Library/Application Support/Cline/,~/.config/cline/ - Zed:
~/.zed/,~/Library/Application Support/Zed/,~/.config/zed/ - Windsurf:
~/.windsurf/,~/Library/Application Support/Windsurf/,~/.config/windsurf/ - JetBrains IDEs:
~/Library/Application Support/JetBrains/*/mcp.json - Sublime Text:
~/Library/Application Support/Sublime Text/Packages/User/ - Vim/Neovim:
~/.vim/,~/.config/nvim/ - Emacs:
~/.emacs.d/
This command creates project-specific IDE configuration files:
.cursor/rules/memory-mesh.mdc- Cursor IDE rules for Memory Mesh MCP integration
The configuration includes:
- Repository context and workspace mapping
- Fragment type definitions (knowledge, recipe, solution, template, code-snippet, styling)
- Available Memory Mesh MCP tools and usage guidelines
- Pre-task and post-task workflows for AI assistants
Install MCP Server Connection
Configure MCP server connection to Memory Mesh:
npx @memory-mesh/mcp-server install --api-token <token>Options:
--api-token <token>- Memory Mesh API access token (required)--memory-mesh-url <url>- Memory Mesh API URL (default: "https://memory-mesh.com")--db-path <path>- Custom database file path (default: "~/.memory-mesh-mcp/cache.db")
This command:
- Validates your Memory Mesh API connection and authentication
- Configures the MCP server connection in your IDE's configuration
- Sets up the remote HTTP transport to Memory Mesh MCP endpoint
- Creates the database directory structure for local caching
Usage Workflow
Get your API token from the Memory Mesh web interface
Initialize your project (with workspace selection):
npx @memory-mesh/mcp-server init --api-token <token>
Or let the CLI prompt you for the token:
npx @memory-mesh/mcp-server init
Install MCP server connection:
npx @memory-mesh/mcp-server install --api-token <token>
Restart your IDE to load the MCP server configuration
Memory Mesh MCP Tools
Once configured, AI assistants in your IDE will have access to these Memory Mesh tools:
Core Fragment Management
create_memory_fragment- Create new memory fragments (knowledge, recipe, solution, template, etc.)search_memory_fragments- AI-powered semantic search with similarity scores and filtersget_memory_fragment_content- Retrieve full content of specific fragments by ID
Knowledge Discovery & Navigation
find_related_fragments- Discover fragments connected through shared tags and relationshipsexplore_workspace_graph- Get knowledge graph visualization with nodes and relationshipsexplore_tag_connections- Navigate fragments through specific tag relationshipslist_workspaces- List accessible workspaces with permissions
AI Assistant Workflow
The tools are designed for a comprehensive knowledge management workflow:
- Search existing knowledge first (
search_memory_fragments) - Explore relationships if you need more context:
explore_workspace_graph- Overall knowledge structureexplore_tag_connections- Tag-based relationshipsfind_related_fragments- Fragment connections
- Create new fragments when discovering novel solutions (
create_memory_fragment) - Iterate until you have complete context for your task
Configuration
The CLI updates your IDE's MCP configuration file (e.g., ~/.cursor/mcp.json) with:
{
"mcpServers": {
"memory-mesh": {
"url": "https://memory-mesh.com/api/mcp",
"transport": "http",
"headers": {
"Authorization": "Bearer your-api-token"
}
}
}
}Project Configuration Files
The init command creates project-specific configuration:
.cursor/rules/memory-mesh.mdc - Contains:
- Repository and workspace context mapping
- Fragment type definitions and IDs
- Complete Memory Mesh MCP tool documentation
- Usage guidelines and workflow instructions
- Pre-task and post-task workflows for AI assistants
Database & Caching
The install command sets up local database structure:
- Default location:
~/.memory-mesh-mcp/cache.db - Purpose: Local caching and sync state management
- Customizable: Use
--db-pathto specify custom location
Package Architecture
This package is CLI-only and provides configuration tooling for Memory Mesh MCP integration:
- What it is: A CLI tool with
initandinstallcommands for configuring MCP connections - What it's NOT: This package does not run as an MCP server itself
- Purpose: Configures IDE integration with the Memory Mesh MCP service
- Package name:
@memory-mesh/mcp-server(maintained for backward compatibility)
Integration Flow
- CLI Configuration (
init+install) → - IDE MCP Client →
- Memory Mesh MCP Service (hosted at memory-mesh.com)
Troubleshooting
Common Issues
"API token is required" - The init command requires an API token to fetch workspace information and fragment types. Provide it via:
- Command line:
--api-token <token> - Environment variable:
MEMORY_MESH_API_TOKEN - Interactive prompt (CLI will ask if not provided)
"Failed to connect to Memory Mesh service" - Check:
- Network connectivity to memory-mesh.com
- API token validity and permissions
- Workspace access permissions
"MCP server not found in IDE" - After installation:
- Restart your IDE completely
- Check MCP configuration file exists (e.g.,
~/.cursor/mcp.json) - Verify the configuration JSON syntax is valid
Requirements
- Node.js >= 18.0.0
- Valid Memory Mesh workspace and API credentials
- Compatible IDE with MCP support (Cursor, Claude Desktop, VS Code, etc.)
License
MIT