Overview
Morphik provides native support for the Model Context Protocol (MCP) - an open standard that allows AI models like Claude to directly access structured data and knowledge bases. With Morphik’s MCP integration, you can:- Let Claude, or other MCP supported models to search through your documents based on natural language queries
- Retrieve knowledge from your Morphik database without writing complex code
- Give AI models direct access to your organization’s information
- Enable more accurate, context-aware responses using your own data
Setup
Morphik’s MCP support is provided through the@morphik/mcp package, which acts as a bridge between Morphik and MCP-compatible AI assistants.
Transport Modes
You can run the MCP server in either transport mode:-
StdIO (default):
npx @morphik/mcp --uri=<your-uri>- Best for Claude Desktop and other local MCP clients that speak StdIO.
- Supports optional
--allowed-dir=dir1,dir2to sandbox file ingestion.
-
Streamable HTTP:
npm install && npm run build:streamable(once)node build/index_http.js --uri=<your-uri> --allowed-dir=~/Documents
- Exposes
/mcpfor JSON RPC requests and/healthfor monitoring. - Ideal for web environments or remote deployments where StdIO isn’t available.
Prerequisites
- A running Morphik server (local or cloud)
- Node.js 16.0.0 or higher
Configuration with Claude Desktop
To integrate Morphik with Claude Desktop:-
Open your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- Add the Morphik MCP configuration:
--uri parameter or use --uri=local:
Using with Claude
Once configured:- Close and restart Claude Desktop (or reconnect your MCP client).
- Claude can now invoke Morphik’s MCP tools (the same set is available whether you connect via StdIO or Streamable HTTP):
Tip: Only expose the tools you actually need in your MCP client configuration. Disabling unused tools keeps LLMs focused and reduces the chance they pick a less relevant action.
Ingestion
ingest-text: Push raw text with optional metadata/folder scopes.ingest-file-from-path: Upload a file from disk (uses the MCP server’s--allowed-dirsandbox).ingest-file-from-base64: Upload bytes provided by the client (handy when running in Streamable mode).ingest-files-from-paths: Batch upload multiple files with shared or per-file metadata.
Retrieval & Navigation
retrieve-chunks: Identical to Morphik App’s “find relevant pages” flow. Returns the most relevant text/image pages with optional padding, folder scopes, and metadata filters.retrieve-docs: Returns whole documents instead of individual chunks.get-pages-in-range: Fetch up to 10 consecutive pages from a document for deep dives.
Document Management & Metadata
list-documents: Calls/documents/list_docs, so Claude can paginate large libraries, fetch counts, or only specific fields while respecting folder/end-user scopes.get-document: Retrieves metadata for a specific document ID.check-ingestion-status: Polls ingestion/processing state for a document.delete-document: Removes a document and its derived data.morphik-filters: View, set, or clear typed metadata filters (eq/regex/number_range/date_range). Any active filter automatically applies toretrieve-*andlist-documents.
File Navigation (for ingestion workflows)
list-allowed-directories,list-directory,search-files,get-file-info: Help Claude browse only the directories you explicitly allow when starting the MCP server.

