Meridian MCP

Complete documentation for integrating Meridian with AI assistants via the Model Context Protocol

v1.0.0
MCP Server URL:https://mcp.trymeridian.dev

What is MCP?

Model Context Protocol (MCP) is an open protocol that enables AI assistants like Claude Desktop, Cursor, and other AI tools to securely access external data sources and tools.

Meridian provides MCP-compatible endpoints that allow AI assistants to:

  • Search across all your connected data sources
  • Query your knowledge graph
  • Retrieve full document context
  • Access usage statistics

Overview

Meridian's MCP implementation provides three core tools optimized for AI agent consumption:

1. Unified Context Search

Intelligent search with automatic entity extraction

2. RAG Search

Pure semantic search without knowledge graph filtering

3. Knowledge Graph Query

Discover entities and relationships

All MCP endpoints return structured responses with natural language answer summaries, structured data arrays, and rich metadata for context.

Authentication

MCP endpoints use API key authentication. You can provide the API key via:

Option 1: Authorization Header (Recommended)

Authorization: Bearer kt_xxxxxxxxxxxxx

Option 2: X-API-Key Header (MCP Compatibility)

X-API-Key: kt_xxxxxxxxxxxxx

Getting Your API Key

  1. 1.Log in to Meridian Dashboard
  2. 2.Navigate to Resources → API Keys
  3. 3.Click "Generate API Key"
  4. 4.Copy the key (starts with kt_)
  5. 5.Save it immediately - it's only shown once!

Unified Context Search

Intelligent search with automatic knowledge graph extraction. Best for natural language queries where entities aren't known upfront.

Endpoint

POST /api/v1/mcp/search-unified-context

Request Parameters

querystring (required)

Natural language search query

deterministicboolean (optional)

false (default): Returns top N most relevant results | true: Returns ALL matching chunks (no ranking)

limitinteger (optional)

Maximum results (default: 10, max: 100) - Use 10-20 for ranked mode, 50-100 for deterministic mode

include_contextboolean (optional)

Include 2 chunks before/after each result (default: false)

Note: MCP tools are accessed through the MCP protocol via your MCP client (Claude Desktop, Cursor, etc.), not via direct HTTP calls. See the Configuration Examples section for setup instructions.

When to Use

  • Natural language questions from users
  • Exploratory searches where entities aren't known
  • Questions like "What did [person] say about [topic]?"
  • General information discovery

Knowledge Graph Query

Discover entities and relationships in your knowledge graph. Returns structured graph data, not document chunks.

Endpoint

POST /api/v1/mcp/query-kg

Request Parameters

querystring (required)

Natural language query about relationships

depthinteger (optional)

Relationship traversal depth: 1 (default - direct relationships) | 2 (friends of friends) | 3 (extended relationships)

relationship_typesarray (optional)

Filter by specific relationship types: ["PARTICIPATES_IN", "WORKS_WITH", "LEADS", "REPORTS_TO"]

limitinteger (optional)

Maximum relationships to return (default: 50, max: 500)

Note: MCP tools are accessed through the MCP protocol via your MCP client, not via direct HTTP calls.

When to Use

  • Discovering connections between entities
  • Understanding organizational structure
  • Finding who works with whom
  • Exploring entity relationships before searching documents
  • Questions like "Who is related to [entity]?"

Integration Guide

For MCP server developers building a wrapper around Meridian:

MCP Server URL

https://mcp.trymeridian.dev

API Base URL

https://webhooks.trymeridian.dev

For direct REST API calls (see API Documentation)

Authentication

Include API key in Authorization: Bearer <key> or X-API-Key: <key> header

Response Format

All endpoints return JSON with answer (natural language summary), structured data arrays, and metadata

Configuration Examples

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "meridian-search": {
      "url": "https://mcp.trymeridian.dev",
      "transport": "http",
      "headers": {
        "X-API-Key": "kt_your_api_key_here"
      }
    }
  }
}

Cursor IDE

Add to Cursor settings (.cursor/config.json):

{
  "mcpServers": {
    "meridian-search": {
      "url": "https://mcp.trymeridian.dev",
      "transport": "http",
      "headers": {
        "X-API-Key": "kt_your_api_key_here"
      }
    }
  }
}

Custom MCP Client

For custom MCP clients, configure the server to call Meridian's MCP endpoints:

{
  "mcpServers": {
    "meridian-search": {
      "url": "https://mcp.trymeridian.dev",
      "transport": "http",
      "headers": {
        "X-API-Key": "kt_your_api_key_here"
      }
    }
  }
}

Usage Examples

Example 1: Finding Information About a Client

Query: "What did Nike say about our API?"

Endpoint: Unified Context Search

Returns document chunks from meetings, emails, and other sources where Nike mentioned the API, with entity extraction identifying "Nike" as an ACCOUNT entity.

Example 2: Technical Code Search

Query: "JWT authentication implementation"

Endpoint: RAG Search with sources: ["github"]

Returns code snippets and discussions about JWT authentication from GitHub repositories.

Example 3: Discovering Team Relationships

Query: "Who works with Nike?"

Endpoint: Knowledge Graph Query

Returns entities (employees, meetings) and relationships showing who participates in meetings with Nike or works on projects involving Nike.

Example 4: Time-Bounded Search

Query: "What features were discussed in Q4?"

Endpoint: Unified Context Search with after: "2024-10-01", before: "2024-12-31"

Returns results only from Q4 2024 timeframe.

Error Handling

400 Bad Request

{
  "detail": "Invalid request parameters"
}

Common causes: Missing required fields, invalid date format, invalid source type, limit exceeds maximum (100)

401 Unauthorized

{
  "detail": "Invalid API key"
}

Solutions: Verify API key is correct, check key hasn't been revoked, ensure key starts with kt_

500 Internal Server Error

{
  "detail": "Unified context search failed: <error message>"
}

Retry logic: Implement exponential backoff for 500 errors.

Rate Limiting

Rate Limits by Tier

Free Tier100 requests/hour
Pro Tier1,000 requests/hour
EnterpriseUnlimited

Rate Limit Headers

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1640000000

Rate Limit Exceeded

{
  "detail": "Rate limit exceeded. Please try again later.",
  "retry_after": 3600
}

Best Practices

1. Choose the Right Tool

  • Unified Context Search: For natural language questions, entity-focused queries
  • RAG Search: For technical queries, code searches, broad information gathering
  • KG Query: For relationship discovery, organizational queries, entity exploration

2. Optimize Query Performance

  • Use limit appropriately (10-20 for ranked, 50-100 for deterministic)
  • Set after/before dates to narrow search scope
  • Use sources filter in RAG search when you know the source type
  • Avoid include_context: true unless you need surrounding chunks

3. Handle Responses Efficiently

  • Parse answer field for quick summaries
  • Use documents array for detailed results
  • Check metadata.total_results to determine if more results exist
  • Use file_url to link users to original documents

4. Error Recovery

  • Implement retry logic with exponential backoff
  • Cache successful responses when appropriate
  • Monitor rate limit headers
  • Log errors for debugging

For MCP integration support, please contact kn@trymeridian.dev

Last Updated: January 2024 • MCP API Version: 1.0.0