Jina AI MCP Server
This project provides a Model Context Protocol (MCP) server that exposes the Jina AI Search Foundation APIs as a suite of tools for Large Language Models (LLMs). It allows AI agents and applications to easily leverage Jina's powerful search, reranking, and content-reading capabilities.
This server is built using mcp.py (specifically the FastMCP framework) and is designed to be lightweight, fast, and easy to deploy.
Features
The server exposes the following Jina AI APIs as MCP tools:
- Embeddings:
jina_embeddings- Convert text/images to vectors. - Reranker:
jina_rerank- Refine search results for relevance. - Reader:
jina_reader- Extract LLM-friendly content from URLs. - Search:
jina_search- Perform web searches optimized for LLMs. - DeepSearch:
jina_deepsearch- Combine search, reading, and reasoning. - Segmenter:
jina_segmenter- Tokenize and chunk text. - Text Classifier:
jina_classify_text- Classify text with zero-shot models. - Image Classifier:
jina_classify_image- Classify images with zero-shot models.
⚙️ Configuration
Before running the server, you must obtain a Jina AI API key and set it as an environment variable.
- Get your API Key: You can get a free API key from jina.ai.
- Set the Environment Variable:
export JINA_API_KEY="your_api_key_here"
The server will fail to start if this variable is not set.
🚀 Running the Server
There are multiple ways to run the Jina AI MCP server, depending on your environment and preferences.
Using uvx (Recommended)
If you have uv installed, you can run the server directly from PyPI without cloning the repository using uvx. This is the quickest way to get started.
# Ensure JINA_API_KEY is set first
uvx jina-ai-mcp-server
This command will download the package into a temporary virtual environment and execute its entry point (main.py).
Using Docker
A Dockerfile is provided for containerized deployments. This is the recommended approach for production or isolated environments.
-
Build the Docker Image: From the root of the project directory, run:
docker build -t jina-ai-mcp-server .
-
Run the Docker Container: You must pass the
JINA_API_KEYenvironment variable to the container.docker run -e JINA_API_KEY="your_api_key_here" --rm -it jina-ai-mcp-server
The server will start inside the container.
From Source
If you have cloned the repository, you can run it locally.
-
Install Dependencies: It's recommended to use a virtual environment.
# Using uv uv venv source .venv/bin/activate uv pip install -r requirements.txt # Or install from pyproject.toml # Using standard pip/venv python -m venv .venv source .venv/bin/activate pip install -e .
-
Run the Server:
# Ensure JINA_API_KEY is set first python main.py
🔌 Connecting with MCP Clients
To use this server with an MCP client (like the Claude extension), you need to add its configuration to your mcpServers.json file. You can choose the execution method that best suits your setup.
With uvx (Recommended)
This method runs the server directly from PyPI without needing Docker or a local checkout.
{
"mcpServers": {
"jina-ai": {
"command": "uvx",
"args": [
"jina-ai-mcp-server"
],
"env": {
"JINA_API_KEY": "your_api_key_here"
}
}
}
}
With Docker
This method requires you to have built the Docker image first (docker build -t jina-ai-mcp-server .).
{
"mcpServers": {
"jina-ai": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"jina-ai-mcp-server"
],
"env": {
"JINA_API_KEY": "your_api_key_here"
}
}
}
}
📦 Publishing (For Developers)
To publish a new version to PyPI:
- Install build tools:
pip install build twine
- Build the package:
python -m build
- Upload to PyPI:
twine upload dist/*
Metadata
Release files for jina-ai-mcp-server 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jina_ai_mcp_server-0.2.0.tar.gz | 11.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jina_ai_mcp_server-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.1 kB
Release files / jina_ai_mcp_server-0.2.0.tar.gz
| Download URL | jina_ai_mcp_server-0.2.0.tar.gz |
|---|---|
| Size | 11.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bee00333e29759e21184df5638ecb6fc6423282410f60853dc07bb7f0eccd4a
|
|
BLAKE2b-256 checksum How to use checksums |
f8d08870405cc21d649b1f6de5a2167f896927e48b8bfad5a38b930e1527357a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|
Release files / jina_ai_mcp_server-0.2.0-py3-none-any.whl
| Download URL | jina_ai_mcp_server-0.2.0-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c17a227554876a4a40f0f848722c546899953353284e325c88c2ee3601843c5
|
|
BLAKE2b-256 checksum How to use checksums |
7e3adf5675038cb587ee527a131bdc245d8564d08ef8b7d5594154208aaf7ec1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.13
|