Labsco
merge-api logo

Merge MCP Server

โ˜… 18

from merge-api

Integrates the Merge Unified API with any LLM provider using the MCP protocol.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

Merge MCP Server

This MCP (Model Context Protocol) server provides integration between Merge API and any LLM provider supporting the MCP protocol (e.g., Claude for Desktop), allowing you to interact with your Merge data using natural language.

โœจ Features

  • Query Merge API entities using natural language
  • Get information about your Merge data models and their fields
  • Create and update entities through conversational interfaces
  • Support for multiple Merge API categories (HRIS, ATS, etc.)

๐Ÿ” Scopes

Scopes determine which tools are enabled on the MCP server and are used to control access to different parts of the Merge API. If no scopes are specified, all available scopes will be enabled.

When starting the server, you can specify which scopes to enable. This is done by passing the --scopes flag with a list of scopes.

{
    "mcpServers": {
        "merge-mcp-server": {
            "command": "uvx",
            "args": [
                "merge-mcp",
                "--scopes",
                "ats.Job:read",
                "ats.Candidate",
                "ats.Application:write"
            ],
            "env": {
                "MERGE_API_KEY": "your_api_key",
                "MERGE_ACCOUNT_TOKEN": "your_account_token"
            }
        }
    }
}

Scope Format

Scopes in the Merge MCP server follow a specific format based on the Merge API category and common model names. Each scope is formatted as:

<category>.<CommonModel>:<permission>

Where:

  • <category> is the Merge API category (e.g., hris, ats, accounting)
  • <CommonModel> is the name of the Merge Common Model (e.g., Employee, Candidate, Account)
  • <permission> is either read or write (optional - if not specified, all permissions are granted)

Examples of valid scopes:

  • hris.Employee:read - Allows reading employee data from HRIS category
  • ats.Candidate:write - Allows creating or updating candidate data in ATS category
  • accounting.Account - Allows all operations on account data in Accounting category

You can combine multiple scopes to grant different permissions.

Important Notes on Scope Availability

The available scopes depend on your Merge API account configuration and the models the Linked Account has access to. Scopes must be cross-referenced with enabled scopes on your Linked Account:

  • Category Mismatch: If you specify a scope for a category that doesn't match your Linked Account (e.g., using ats.Job with an HRIS Linked Account), no tools for that scope will be returned.

  • Permission Mismatch: If you request a permission that isn't enabled for your Linked Account (e.g., using hris.Employee:write when only read access is enabled), tools requiring that permission won't be returned.

  • Validation: The server will automatically validate your requested scopes against what's available in your Linked Account and will only enable tools for valid, authorized scopes.

Scopes typically correspond to different models or entity types in the Merge API, and they control both read and write access to these entities.

๐Ÿš€ Available Tools

The Merge MCP server provides access to various Merge API endpoints as tools. The available tools depend on your Merge API category (HRIS, ATS, etc.) and the scopes you have enabled.

Tools are dynamically generated based on your Merge API schema and include operations for:

  • Retrieving entity details
  • Listing entities
  • Creating new entities
  • Updating existing entities
  • And more, based on your specific Merge API configuration

Note: Download tools are not currently supported. This is a known limitation and will be addressed in a future release.

๐Ÿ”‘ Environment Variables

The following environment variables are used by the Merge MCP server:

  • MERGE_API_KEY: Your Merge API key
  • MERGE_ACCOUNT_TOKEN: Your Merge Linked Account token
  • MERGE_TENANT (Optional): The Merge API tenant. Valid values are US, EU, and APAC. Defaults to US.