Download Markdown

Use from AI Applications (MCP)

By the end of this page you’ll have MarsYoo connected to an MCP-capable AI application, so it can search and read data directly.

The AI uses your API key, with the same access as calling the API, and normal billing and rate limits apply. It never starts collecting new data on its own.

Before you start

  • An API key; see Get an API key.
  • An MCP client that supports Streamable HTTP and custom request headers. For clients without header support, use the SDKs or call the API directly.

Connect

Add a remote MCP server in your client:

SettingValue
URLhttps://www.marsyoo.com/mcp
TransportStreamable HTTP
HeaderAuthorization: Bearer <your API key>

For clients that use the mcpServers format:

JSON
{
  "mcpServers": {
    "whale": {
      "url": "https://www.marsyoo.com/mcp",
      "headers": { "Authorization": "Bearer ${WHALE_API_KEY}" }
    }
  }
}

Note: Supply the key through the client’s credential settings or environment variables. Never write the full key into a shared config file or paste it into a conversation.

If your client doesn’t expand ${...} variables, enter the header in its credential settings.

If you’ve installed the whale-mcp program on your PATH, you can also run it locally:

JSON
{
  "mcpServers": {
    "whale": {
      "command": "whale-mcp",
      "env": { "WHALE_API_KEY": "${WHALE_API_KEY}", "MCP_TRANSPORT": "stdio" }
    }
  }
}

This configuration doesn’t install the program.

Verify

  1. Refresh the tool list and look for whale_search.
  2. Ask the AI to call it with {"query": "artificial intelligence", "mode": "keyword", "limit": 10}.
  3. If there are results, take a document_id and call whale_get_document_content.

If you can read a body, you’re connected. An empty search doesn’t mean the connection failed; try another keyword or check your access.

Test the connection in the console

Open console MCP:

  1. Choose an application and enter its API key. Organization owners and admins can also generate a new key here; save it immediately.
  2. Click test. The console connects to the MCP server for real, sending initialize, notifications/initialized and tools/list, and shows the available tools.
  • The test checks only the connection and the tool list. It doesn’t search or collect. Passing doesn’t prove data access or credits.
  • The key stays in page memory only and is cleared when you switch applications. Copied configuration templates contain no real key.

Available tools

ToolUseMain parameters
whale_searchSearch stored documentsquery, mode, platforms, languages, published_from, published_to, limit
whale_get_documentDocument metadata and current versiondocument_id
whale_get_document_contentFull bodydocument_id, version_id
whale_docs_searchSearch these customer docs and return matching pages, sections and linksquery, locale (zh or en), limit
whale_docs_readRead one customer docs page as Markdownpath, such as /en/docs/search

Before writing integration code, an AI can look up endpoints and error codes with whale_docs_search, then read the whole page with whale_docs_read. These two tools read only the public customer docs and use no credits.

  • whale_search supports only mode=keyword, which is also the default.
  • limit defaults to 20, up to 100.
  • Parameters mean the same as in keyword search.

When something fails

  • 401: the client isn’t sending a valid key.
  • 403: outside the application’s access.
  • 429: wait for Retry-After.

Full list: Error codes.