- Home
- MCP servers
- Morphik
Morphik
- javascript
22
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"morphik-org-morphik-mcp": {
"command": "npx",
"args": [
"morphik-mcp"
]
}
}
}You can run and connect to a Morphik MCP server to ingest, query, and manage documents, as well as navigate and ingest files from your system. This MCP server supports local stdio operation for clients like Claude Desktop and can connect to Morphik’s cloud platform for remote usage.
How to use
You use an MCP client to interact with the Morphik MCP server. Start the local server with a simple command and connect to Morphik cloud when you need remote access. Ingestion tools let you add documents and files, retrieval tools bring back relevant content, and file navigation tools help you manage what the server can access.
Practical usage patterns you can follow:
How to install
Prerequisites: ensure you have Node.js and npm installed on your machine.
Option 1: Run directly with npx (recommended)
# 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
Option 2: Global installation
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
Option 3: Local development
# 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
Additional notes on usage and configuration
The server runs on standard input/output streams by default for local MCP clients and can be used with a cloud-backed configuration via a URI. When starting with file system access, you can restrict which directories are accessible using the --allowed-dir option as shown above.
Configuration and security
Security is enforced by limiting file system access to directories you explicitly allow at startup. The server validates paths to ensure they stay within permitted directories and checks symlinks to prevent access to sensitive areas.
Troubleshooting and tips
If you encounter connectivity issues when using the cloud URI, verify that the URI is correct and that your network allows outbound connections to Morphik’s services. For file access problems, double-check the --allowed-dir list for typos and ensure those folders exist on your system.
What you can do with the MCP server
-
Ingest documents by text or file from paths and from base64 data in HTTP transports.
-
Retrieve relevant content and documents through chunk and document searching.
-
Manage documents and metadata, including listing, getting, and deleting documents.
-
Navigate and ingest files directly from configured directories.
Summary of run methods
Use npx morphik-mcp for quick local usage or morphik-mcp with --uri for cloud access. Add --allowed-dir to restrict file operations to specific folders.
Next steps
Choose your preferred method (local npx, global npm, or local development), configure any required directories, and start ingesting and retrieving content as needed. If you want remote access, point the client to the cloud URI and keep your allowed directories in check.
Available tools
ingest-text
Ingest a text document into Morphik. Requires parameters: content, filename (optional), metadata (optional), apiKey.
ingest-file-from-path
Ingest a file from the server filesystem into Morphik. Requires: path, metadata (optional), rules (optional), folderName (optional), endUserId (optional), useColpali (optional).
ingest-file-from-base64
Upload a file by providing its filename and base64-encoded bytes. Useful in HTTP transports where disk access isn’t possible. Requires: filename, base64Content, metadata (optional), rules (optional), folderName (optional), endUserId (optional), useColpali (optional).
ingest-files-from-paths
Batch ingest multiple files from the server filesystem. Requires: paths, metadata (optional), rules (optional), folderName (optional), endUserId (optional), useColpali (optional).
retrieve-chunks
Retrieve the most relevant text or image chunks for a query. Supports optional filters, k, minScore, folderName, endUserId, and context padding.
retrieve-docs
Retrieve relevant documents from Morphik based on a query. Supports filters, k, minScore, and folderName/endUserId.
search-documents
Search for documents by filename or title using full-text search. Parameters include query, limit, folderName, and endUserId.
get-pages-in-range
Fetch an inclusive range of pages from a document, up to ten pages. Requires documentId, startPage, endPage, and optional folderName/endUserId.
get-document
Retrieve a specific document by its ID. Requires documentId and apiKey.
delete-document
Delete a document by its ID. Requires documentId and apiKey.
check-ingestion-status
Check the processing status for an ingested document. Requires documentId and apiKey.
morphik-filters
View, set, or clear typed metadata filters that affect retrieval and listing. Supports eq, regex, number_range, and date_range.
list-documents
List documents with options for skip, limit, filters, get_count, and scoping by folderName/endUserId, plus sort and fields selection.