MCP Server
Give your AI agent direct access to elephant.md via the Model Context Protocol.
Get Started
- 1Quick setup
npx elephant-md install --mcpThis auto-detects your agent and writes the config for you. Or add the JSON manually (see below).
- 2Verify
Restart your agent and ask it to search elephant.md — it should use the
searchtool automatically. - 3Authenticate (optional)
To access private documents and the
proposetool, set your token via theELEPHANT_TOKENenvironment variable in the MCP config.
Claude Code
Add to .mcp.json in your project root:
{
"mcpServers": {
"elephant": {
"type": "url",
"url": "https://elephant.md/mcp"
}
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"elephant": {
"type": "url",
"url": "https://elephant.md/mcp"
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"elephant": {
"url": "https://elephant.md/mcp"
}
}
}Windsurf
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"elephant": {
"serverUrl": "https://elephant.md/mcp"
}
}
}Hosted connectors (Grok, ChatGPT, Claude)
Chat assistants that support custom MCP connectors can connect to elephant.md directly — no local config file.
Read-only (no sign-in): add the connector with the URL https://elephant.md/mcp. The assistant can search, discover, fetch, and browse trending docs immediately.
Full access (sign in once): add https://elephant.md/mcp/connect instead. The assistant will walk you through an OAuth sign-in; afterwards search defaults to your library and the authenticated tools (propose, save_document, create_collection, my_documents) act as you.
In Grok, go to grok.com/connectors → New Connector → Custom, paste the URL, and complete sign-in if prompted. The OAuth flow (discovery, dynamic client registration, PKCE) is handled automatically.
See AI Connectors for step-by-step setup in each assistant.
Public Tools
search— Full-text search across public documents (filters: category, tag, limit)fetch— Get full document content by username and slugtrending— Get trending documents (filters: category, limit)list_user_docs— List a user's public documents with paginationdiscover— 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 unlistedpropose— Propose a document draft for review (stored for 7 days)save_document— Bookmark a document and optionally add it to a collectionlist_collections— List your collectionsget_collection— Get a collection's details and items by username and slugcreate_collection— Create a new collection
Resources
elephant://documents/{user}/{slug}— Full document markdown and metadataelephant://users/{user}/documents— List of a user's public documents