
Morphik
STDIOMCP server for Morphik multi-modal database interaction and document management
MCP server for Morphik multi-modal database interaction and document management
A Model Context Protocol (MCP) server implementation for Morphik multi-modal database.
This MCP server allows Claude and other MCP-compatible AI assistants to interact with the Morphik database system, enabling:
You need access to either:
# Connect to local Morphik server npx morphik-mcp # Connect to Morphik cloud platform (replace with your actual URI) npx morphik-mcp --uri=https://api.morphik.ai # Specify allowed directories for file operations (comma-separated) npx morphik-mcp --allowed-dir=~/Documents,~/Downloads
npm install -g morphik-mcp # Connect to local Morphik server morphik-mcp # Connect to Morphik cloud platform morphik-mcp --uri=https://api.morphik.ai # Specify allowed directories for file operations morphik-mcp --allowed-dir=~/Documents,~/Downloads
# Clone the repository git clone https://github.com/morphik-org/morphik-npm-mcp.git cd morphik-npm-mcp # Install dependencies npm install # Build the project npm run build # Start the server (local Morphik) npm start # Start the server with file operations enabled node build/index.js --allowed-dir=~/Documents,~/Downloads
The server runs on standard input/output streams and can be used with MCP clients like Claude.
Add this to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "morphik-local": { "command": "npx", "args": ["-y", "morphik-mcp"] }, "morphik-cloud": { "command": "npx", "args": ["-y", "morphik-mcp", "--uri=https://api.morphik.ai"] }, "morphik-with-files": { "command": "npx", "args": ["-y", "morphik-mcp", "--allowed-dir=~/Documents,~/Downloads"] } } }
The server provides the following tools:
ingest-text
: Ingest a text document into Morphik
ingest-file-from-path
: Ingest a file from the server's filesystem into Morphik
ingest-files-from-paths
: Batch ingest multiple files from the server's filesystem
retrieve-chunks
: Retrieve relevant chunks from Morphik based on a query
retrieve-docs
: Retrieve relevant documents from Morphik based on a query
query
: Generate a completion using relevant chunks as context
list-documents
: List documents in Morphik
get-document
: Get a specific document from Morphik by ID
delete-document
: Delete a document from Morphik by ID
list-allowed-directories
: List directories that the server is allowed to access
list-directory
: List files and subdirectories in a specific directory
search-files
: Search for files matching a pattern in a directory and its subdirectories
get-file-info
: Get detailed information about a file or directory
For security reasons, file operations are restricted to directories explicitly allowed when starting the server using the --allowed-dir
parameter. If no directories are specified, only the user's home directory will be accessible.
The server validates all file paths to ensure they're within allowed directories, preventing access to sensitive system files. Symlinks are also checked to ensure they don't point outside allowed directories.
Build the project:
npm run build
Run tests:
npm test
Run manual tests:
npm run test:manual
ISC