Skip to content
🔌

MCP Server

Give your AI agent direct access to elephant.md via the Model Context Protocol.

Get Started

  1. 1
    Quick setup
    npx elephant-md install --mcp

    This auto-detects your agent and writes the config for you. Or add the JSON manually (see below).

  2. 2
    Verify

    Restart your agent and ask it to search elephant.md — it should use the search tool automatically.

  3. 3
    Authenticate (optional)

    To access private documents and the propose tool, set your token via the ELEPHANT_TOKEN environment variable in the MCP config.

Claude Code

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "elephant": {
      "type": "url",
      "url": "https://elephant.md/mcp/mcp"
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "elephant": {
      "type": "url",
      "url": "https://elephant.md/mcp/mcp"
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "elephant": {
      "url": "https://elephant.md/mcp/mcp"
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "elephant": {
      "serverUrl": "https://elephant.md/mcp/mcp"
    }
  }
}

Public Tools

  • search — Full-text search across public documents (filters: category, tag, limit)
  • fetch — Get full document content by username and slug
  • trending — Get trending documents (filters: category, limit)
  • list_user_docs — List a user's public documents with pagination
  • discover — Semantic search using natural language (filters: category, limit)

Authenticated Tools

These require a bearer token via ELEPHANT_TOKEN:

  • my_documents — List your own documents including private and unlisted
  • propose — Propose a document draft for review (stored for 7 days)
  • save_document — Bookmark a document and optionally add it to a collection
  • list_collections — List your collections
  • get_collection — Get a collection's details and items by username and slug
  • create_collection — Create a new collection

Resources

  • elephant://documents/{user}/{slug} — Full document markdown and metadata
  • elephant://users/{user}/documents — List of a user's public documents