Jina Reader MCP server

Convert web content to readable Markdown format.
Back to servers
Setup instructions
Provider
wong2
Release date
Dec 03, 2024
Language
TypeScript
Stats
42 stars

This server implements the Model Context Protocol (MCP) and fetches remote URL content as Markdown using Jina Reader. It allows you to easily transform web content into clean, formatted Markdown for further processing or display.

Installation

You can install the Jina Reader MCP Server using pip:

pip install jina-reader-mcp-server

Usage

Starting the Server

To start the server, run the following command:

python -m jina_reader_mcp_server

By default, the server runs on port 8080. You can specify a different port using the --port option:

python -m jina_reader_mcp_server --port 9000

Using the API

The server exposes an MCP-compatible API endpoint at /generate. You can make POST requests to this endpoint to fetch and convert web content to Markdown.

Example Request

curl -X POST http://localhost:8080/generate \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": "https://en.wikipedia.org/wiki/Artificial_intelligence",
    "stream": false
  }'

Request Parameters

  • inputs: The URL you want to fetch and convert to Markdown (required)
  • stream: Whether to stream the response (boolean, default: false)

Example Response

The server will return the converted Markdown content:

{
  "text": "# Artificial Intelligence\n\nArtificial intelligence (AI) is intelligence demonstrated by machines...",
  "error": null
}

Configuration Options

When starting the server, you can configure various options:

python -m jina_reader_mcp_server --host 0.0.0.0 --port 8080 --workers 4

Available options:

  • --host: The host address to bind to (default: 0.0.0.0)
  • --port: The port to listen on (default: 8080)
  • --workers: Number of worker processes (default: 1)
  • --timeout: Request timeout in seconds (default: 60)

Troubleshooting

Common Issues

  • Connection Errors: Ensure the URL is accessible and properly formatted
  • Timeout Errors: For large web pages, consider increasing the timeout value
  • Parsing Failures: Some websites with complex layouts may not convert perfectly

If you encounter issues with specific URLs, try using a different URL or checking if the website blocks web scrapers.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "jina-reader" '{"command":"npx","args":["-y","mcp-jina-reader"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "jina-reader": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-jina-reader"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "jina-reader": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-jina-reader"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later