Cover image
Try Now
2025-04-14

3 years

Works with Finder

5

Github Watches

0

Github Forks

5

Github Stars

Morphik MCP

A Model Context Protocol (MCP) server implementation for Morphik multi-modal database.

Overview

This MCP server allows Claude and other MCP-compatible AI assistants to interact with the Morphik database system, enabling:

  • Document ingestion (text and files)
  • Document retrieval (by relevance to queries)
  • Document querying with LLM-powered completions
  • Document management (listing, getting, deleting)
  • File system navigation and file ingestion from paths

Prerequisites

You need access to either:

  • A local Morphik server running on localhost:8000, or
  • The Morphik cloud platform

Installation & Usage

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

The server runs on standard input/output streams and can be used with MCP clients like Claude.

Usage with Claude Desktop

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"]
    }
  }
}

MCP Tools

The server provides the following tools:

1. Document Ingestion

  • ingest-text: Ingest a text document into Morphik

    • Parameters: content, filename (optional), metadata (optional), apiKey
  • ingest-file-from-path: Ingest a file from the server's filesystem into Morphik

    • Parameters: path, metadata (optional), rules (optional), folderName (optional), endUserId (optional), useColpali (optional)
  • ingest-files-from-paths: Batch ingest multiple files from the server's filesystem

    • Parameters: paths, metadata (optional), rules (optional), folderName (optional), endUserId (optional), useColpali (optional)

2. Document Retrieval

  • retrieve-chunks: Retrieve relevant chunks from Morphik based on a query

    • Parameters: query, filters (optional), k (optional), minScore (optional), apiKey
  • retrieve-docs: Retrieve relevant documents from Morphik based on a query

    • Parameters: query, filters (optional), k (optional), minScore (optional), apiKey

3. Document Querying

  • query: Generate a completion using relevant chunks as context
    • Parameters: query, filters (optional), k (optional), maxTokens (optional), temperature (optional), apiKey

4. Document Management

  • list-documents: List documents in Morphik

    • Parameters: skip (optional), limit (optional), filters (optional), apiKey
  • get-document: Get a specific document from Morphik by ID

    • Parameters: documentId, apiKey
  • delete-document: Delete a document from Morphik by ID

    • Parameters: documentId, apiKey

5. File System Navigation

  • list-allowed-directories: List directories that the server is allowed to access

    • Parameters: none
  • list-directory: List files and subdirectories in a specific directory

    • Parameters: path
  • search-files: Search for files matching a pattern in a directory and its subdirectories

    • Parameters: path, pattern, excludePatterns (optional)
  • get-file-info: Get detailed information about a file or directory

    • Parameters: path

File Operations Security

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.

Development

Build the project:

npm run build

Run tests:

npm test

Run manual tests:

npm run test:manual

License

ISC

相关推荐

  • 1Panel-dev
  • 🔥 1Panel provides an intuitive web interface and MCP Server to manage websites, files, containers, databases, and LLMs on a Linux server.

  • Byaidu
  • PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero

  • sigoden
  • Easily create LLM tools and agents using plain Bash/JavaScript/Python functions.

  • hkr04
  • Lightweight C++ MCP (Model Context Protocol) SDK

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 QQ / 微信(企业微信、个人微信)/ 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 ChatGPT、DeepSeek、Dify、Claude、Gemini、xAI、PPIO、Ollama、LM Studio、阿里云百炼、火山方舟、SiliconFlow、Qwen、Moonshot、ChatGLM、SillyTraven、MCP 等 LLM 的机器人 / Agent | LLM-based instant messaging bots platform, supports Discord, Telegram, WeChat, Lark, DingTalk, QQ, Slack

  • tawago
  • Artifact2MCP Generator allows generation of MCP server automatically & dynamically given smart contract's compiled artifact (chain‑agnostic)

  • paulwing
  • A test repository created using MCP service

  • WangRongsheng
  • 🧑‍🚀 全世界最好的LLM资料总结(数据处理、模型训练、模型部署、o1 模型、MCP、小语言模型、视觉语言模型) | Summary of the world's best LLM resources.

  • ragu6963
  • Reviews

    3.2 (9)
    Avatar
    user_6Xnu6e9O
    2025-04-24

    As a devoted user of morphik-mcp, I must say that this tool has revolutionized my workflow. The seamless integration and user-friendly interface make it a breeze to navigate and utilize. Morphik-org has truly outdone themselves with this product, offering robust features and exceptional performance. It's clear that a lot of thought and effort went into its development, and I highly recommend it to anyone looking to streamline their processes.

    Avatar
    user_4UvC9YlV
    2025-04-24

    morphik-mcp is an exceptional tool developed by morphik-org that has significantly improved my productivity. Its user-friendly interface and powerful features make managing applications a breeze. I highly recommend it to anyone looking for a reliable and efficient application management solution.

    Avatar
    user_lY42mlse
    2025-04-24

    As a dedicated user of morphik-mcp, I must say this product has exceeded my expectations. Developed by morphik-org, it is user-friendly and seamlessly integrates into my workflow. The intuitive interface and robust functionalities have significantly improved my productivity. Highly recommended for anyone looking to optimize their processes.

    Avatar
    user_vLtq5Ndy
    2025-04-24

    As a dedicated user of morphik-mcp by morphik-org, I must say this tool has significantly streamlined my workflow. Its intuitive design and robust functionality cater perfectly to my needs. Morphik-mcp is a game-changer in its category, offering seamless integration with my existing processes. The user-friendly interface and comprehensive support make it an indispensable asset. I highly recommend it to professionals seeking efficiency and reliability.

    Avatar
    user_DqUyHrGd
    2025-04-24

    As a dedicated user of the morphik-mcp application by morphik-org, I am thoroughly impressed with its functionality and ease of use. The product seamlessly integrates with my daily workflow, providing efficient and reliable performance. Its user-friendly interface and comprehensive features make it an indispensable tool for both personal and professional use. I highly recommend morphik-mcp to anyone looking to enhance their productivity with a robust and intuitive application.

    Avatar
    user_GRVrPCEr
    2025-04-24

    I've been using morphik-mcp from morphik-org and it has truly revolutionized my workflow. The interface is user-friendly and the functionality covers all my needs perfectly. I appreciate the attention to detail and the seamless integration with various tools. Highly recommended for anyone looking to optimize their productivity!

    Avatar
    user_fQenrFgx
    2025-04-24

    The morphik-mcp is an exceptional tool crafted by morphik-org that has significantly enhanced my workflow. Its user-friendly interface and robust features provide a seamless experience, making complex tasks simpler and more efficient. It's evident that a great deal of thought and expertise has gone into its development. Highly recommend for anyone looking to optimize their productivity!

    Avatar
    user_kqdBKmKv
    2025-04-24

    Morphik-MCP is an outstanding tool by morphik-org. As an avid user, I have found it incredibly reliable and user-friendly. It seamlessly integrates into my workflow and offers efficient performance. Highly recommended for anyone in need of a solid MCP application!

    Avatar
    user_KvNt4EtR
    2025-04-24

    As a dedicated user of morphik-mcp, I can confidently say that it is an outstanding application! The user interface is intuitive and easy to navigate, making it accessible for both beginners and advanced users. The features are robust and have significantly improved my workflow. Morphik-org has done a fantastic job developing this product. Highly recommend it to anyone looking for efficiency and productivity in their daily tasks!