Jina AI Remote MCP Server

repository·main·Indexed 20 days ago

https://github.com/jina-ai/mcp

A Model Context Protocol (MCP) server providing LLMs with web-access, content retrieval, and semantic processing tools. It integrates Jina Reader, Embeddings, and Reranker APIs to enable capabilities such as web searching, arXiv and SSRN academic paper retrieval, URL content extraction as markdown, text/image reranking, and deduplication. Supports remote connection via Streamable HTTP transport or local proxy via mcp-remote, with built-in tool filtering and token guardrails for clients like Claude and Cursor.

Tokens
12.8K
Snippets
41
Records
51
Agent score
73%

What's inside jina-mcp

  1. Overview of Jina AI Remote MCP Server tools

    main

    The Jina AI Remote MCP Server provides access to Jina Reader, Embeddings, and Reranker APIs through a suite of tools. Tools are categorized by their requirement for a Jina API key and their functional purpose.

    Tool Categories

    ToolDescriptionAPI Key Required?
    primerGet current contextual information for localized, time-aware responsesNo
    read_urlExtract clean, structured content from web pages as markdown via Reader APIOptional*
    capture_screenshot_urlCapture high-quality screenshots of web pages via Reader APIOptional*
    guess_datetime_urlAnalyze web pages for last update/publish datetime with confidence scoresNo
    search_webSearch the entire web for current information and news via Reader APIYes
    search_arxivSearch academic papers and preprints on arXiv repository via Reader APIYes
    search_ssrnSearch academic papers on SSRN via Reader APIYes
    search_imagesSearch for images across the web via Reader APIYes
    search_jina_blogSearch Jina AI news and blog posts at jina.ai/newsNo
    search_bibtexSearch for academic papers and return BibTeX citationsNo
    expand_queryExpand and rewrite search queries via Reader APIYes
    parallel_read_urlRead multiple web pages in parallel via Reader APIOptional*
    parallel_search_webRun multiple web searches in parallel via Reader APIYes
    parallel_search_arxivRun multiple arXiv searches in parallel via Reader APIYes
    parallel_search_ssrnRun multiple SSRN searches in parallel via Reader APIYes
    sort_by_relevanceRerank documents by relevance to a query via Reranker APIYes
    classify_textClassify texts into user-defined labels via Embeddings APIYes
    deduplicate_stringsGet top-k semantically unique strings via Embeddings APIYes
    deduplicate_imagesGet top-k semantically unique images via Embeddings APIYes
    extract_pdfExtract figures, tables, and equations from PDF documentsYes

    Note: Optional tools work without an API key but are subject to rate limits. Use a Jina API key for higher limits and better performance.

  2. Use singleton tools with arrays for parallelism

    main

    While some clients (like Claude Code) prefer explicit parallel_* tools (e.g., parallel_search_web), other models (like Qwen3-Next) may prefer calling singleton tools with an array of queries.

    Both approaches are supported. The singleton versions of the following tools accept either a single string or an array of strings:

    • search_web
    • search_arxiv
    • search_ssrn
    • read_url

    When an array is provided to a singleton tool, the server automatically executes all queries in parallel internally.

  3. Understand content truncation in Claude and Cursor

    main

    Claude Code, Claude Desktop, and Cursor enforce a fixed 25k token limit on MCP tool responses.

    To prevent these clients from rejecting large responses entirely, the Jina MCP server applies a token guardrail for read_url and parallel_read_url tools:

    • Single large item: Text is truncated proportionally to fit the budget.
    • Multiple items: The server includes items in order until the next item would exceed the limit, then stops.

    Note: Other clients like OpenAI Codex use a configurable tool_output_token_limit and do not trigger this server-side truncation.

  4. Filter MCP tools using query parameters

    main

    To save context window space in LLMs, you can filter which tools are registered by appending query parameters to the endpoint URL (/v1?...). This prevents the client and LLM from ever seeing the excluded tools.

    Query Parameters

    ParameterDescriptionExample
    exclude_toolsComma-separated tool names to excludeexclude_tools=search_web,search_arxiv
    include_toolsComma-separated tool names to includeinclude_tools=read_url,search_web
    exclude_tagsComma-separated tags to excludeexclude_tags=parallel,rerank
    include_tagsComma-separated tags to includeinclude_tags=search,read

    Precedence (Highest to Lowest)

    1. exclude_tools - Always excludes specified tools
    2. exclude_tags - Excludes tools in specified tags
    3. include_tools - Includes specified tools
    4. include_tags - Starts with only tools in specified tags

    Available Tags

    TagTools
    searchsearch_web, search_arxiv, search_ssrn, search_images, search_jina_blog, search_bibtex
    parallelparallel_search_web, parallel_search_arxiv, parallel_search_ssrn, parallel_read_url
    readread_url, parallel_read_url, capture_screenshot_url
    utilityprimer, show_api_key, expand_query, guess_datetime_url, extract_pdf
    reranksort_by_relevance, deduplicate_strings, deduplicate_images

    Usage Examples

    Exclude parallel tools:

    {
      "mcpServers": {
        "jina-mcp-server": {
          "url": "https://mcp.jina.ai/v1?exclude_tags=parallel",
          "headers": {
            "Authorization": "Bearer ${JINA_API_KEY}"
          }
        }
      }
    }

    Only include search and read tools:

    {
      "mcpServers": {
        "jina-mcp-server": {
          "url": "https://mcp.jina.ai/v1?include_tags=search,read",
          "headers": {
            "Authorization": "Bearer ${JINA_API_KEY}"
          }
        }
      }
    }

    Exclude specific tools:

    {
      "mcpServers": {
        "jina-mcp-server": {
          "url": "https://mcp.jina.ai/v1?exclude_tools=search_images,deduplicate_images",
          "headers": {
            "Authorization": "Bearer ${JINA_API_KEY}"
          }
        }
      }
    }
  5. Add Jina MCP Server to Claude Code

    main

    To add the Jina MCP server to Claude Code, use the claude mcp add command.

    Important: If you previously added the server using --transport sse, you must first remove it using claude mcp remove -s user jina before re-adding it with the http transport.

    claude mcp add -s user --transport http jina https://mcp.jina.ai/v1 \
      --header "Authorization: Bearer ${JINA_API_KEY}"
  6. Connect to Jina MCP Server (Remote Support)

    main

    If your MCP client supports remote servers directly, use the following configuration. The server uses Streamable HTTP transport.

    Note: Some clients do not support environment variables. You may need to replace ${JINA_API_KEY} with your actual hardcoded API key (e.g., jina_xxx).

    {
      "mcpServers": {
        "jina-mcp-server": {
          "url": "https://mcp.jina.ai/v1",
          "headers": {
            "Authorization": "Bearer ${JINA_API_KEY}" // optional
          }
        }
      }
    }
  7. Add Jina MCP Server to OpenAI Codex

    main

    To add the Jina MCP server to OpenAI Codex, edit your ~/.codex/config.toml file and add the following configuration:

    [mcp_servers.jina-mcp-server]
    command = "npx"
    args = [
        "-y",
        "mcp-remote",
        "https://mcp.jina.ai/v1",
        "--header",
        "Authorization: Bearer ${JINA_API_KEY}"]
  8. Connect to Jina MCP Server via mcp-remote (Proxy)

    main

    For clients that do not yet support remote MCP servers, use mcp-remote as a local proxy to connect to the remote endpoint.

    {
      "mcpServers": {
        "jina-mcp-server": {
          "command": "npx",
          "args": [
            "mcp-remote",
            "https://mcp.jina.ai/v1",
            "--header",
            "Authorization: Bearer ${JINA_API_KEY}"
          ]
        }
      }
    }
  9. Improve LLM tool usage via Cursor .mdc rules

    main

    If your LLM is not using specific Jina MCP tools (like parallel_* tools) or is ignoring certain search types, you can explicitly instruct it using a Cursor .mdc rule.

    Recommended instruction pattern:

    • Explicitly tell the model to use search_arxiv and read_url together for theoretical topics.
    • Instruct it to use search_ssrn for social sciences, economics, law, and finance.
    • Mandate that every search must be complemented with read_url to read the source content.
    • Suggest using parallel_* versions for maximum efficiency.
    ---
    alwaysApply: true
    ---
    
    When you are uncertain about knowledge, or the user doubts your answer, always use Jina MCP tools to search and read best practices and latest information. Use search_arxiv and read_url together when questions relate to theoretical deep learning or algorithm details. Use search_ssrn for social sciences, economics, law, and finance research. search_web, search_arxiv, and search_ssrn cannot be used alone - always combine with read_url or parallel_read_url to read from multiple sources. Remember: every search must be complemented with read_url to read the source URL content. For maximum efficiency, use parallel_* versions of search and read when necessary.
  10. Set up local development environment

    main

    To develop locally, clone the repository, install dependencies, and start the development server.

    # Clone the repository
    git clone https://github.com/jina-ai/MCP.git
    cd MCP
    
    # Install dependencies
    npm install
    
    # Start development server
    npm run start
    git clone https://github.com/jina-ai/MCP.git
    cd MCP
    npm install
    npm run start
  11. Configure the Jina AI MCP Server in Claude Desktop

    main

    To use the Jina AI Remote MCP Server, add it to your MCP client configuration (e.g., claude_desktop_config.json). The server is hosted at https://mcp.jina.ai/v1. You can optionally provide a Jina API key via the Authorization header to access advanced features.

    {
      "mcpServers": {
        "jina-mcp-server": {
          "url": "https://mcp.jina.ai/v1",
          "headers": {
            "Authorization": "Bearer ${JINA_API_KEY}"
          }
        }
      }
    }
    {
    	"mcpServers": {
    	"jina-mcp-server": {
    		"url": "https://mcp.jina.ai/v1",
    		"headers": {
    		"Authorization": "Bearer ${JINA_API_KEY}" // optional
    		}
    	}
    	}