CiNii MCP Server
# CiNii MCP Server
## Setup
```shell
uv sync --no-dev
```
Please set the directory path and the `CINII_APP_ID`.
```json
{
"mcpServers": {
"cinii-mcp-server": {
"command": "uv",
"args": [
"--directory",
"<YOUR_MCP_SERVER_DIRECTORY>",
"run",
"server.py"
],
"env": {
"CINII_APP_ID": "<YOUR_CINII_APP_ID>"
},
}
}
}
```
## API Key Registration
1. Access [CiNii API Registration](https://support.nii.ac.jp/ja/cinii/api/developer)
2. Find and access the link for "CiNii Web API Developer Registration".
3. Upon accessing, a registration form will appear. Fill in the necessary information and submit your application.
4. After submission, your Application ID will be sent to you via email.
## Usage
### Python API
```python
from lib.cinii import CiNiiClient, SortOrder, SearchRange
client = CiNiiClient(appid="your_app_id")
# Basic search
results = client.advanced_search({
"query": "機械学習",
"max_results": 10
})
# Advanced search with filters
results = client.advanced_search({
"query": "Deep Learning",
"max_results": 20,
"sortorder": SortOrder.PUBLICATION_YEAR_DESC, # Publication year, descending
"range": SearchRange.HAS_BODY_IN_CINII, # The full text is available on CiNii.
"year_from": 2020,
"year_to": 2024
})
# Or you can also use numeric values for the search Options
results = client.advanced_search({
"query": "Deep Learning",
"max_results": 20,
"sortorder": 1, # Publication year, descending
"range": 1, # The full text is available on CiNii.
"year_from": 2020,
"year_to": 2024
})
```
### Sort Order Options
- `SortOrder.PUBLICATION_YEAR_DESC` (1): Publication year descending
- `SortOrder.PUBLICATION_YEAR_ASC` (2): Publication year ascending
- `SortOrder.TITLE_DESC` (3): Title descending
- `SortOrder.TITLE_ASC` (4): Title ascending
- `SortOrder.JOURNAL_DESC` (5): Journal descending
- `SortOrder.JOURNAL_ASC` (6): Journal ascending
- `SortOrder.CITATION_DESC` (7): Citation count descending
### Search Range Options
- `SearchRange.ALL` (0): All
- `SearchRange.HAS_BODY_IN_CINII` (1): Body exists in CiNii
- `SearchRange.HAS_BODY_OR_LINK` (2): Body exists in CiNii, or link exists in linked services
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion between tools. The tool's purpose is clear from its name and description.
The single tool uses a descriptive snake_case name that aligns with common MCP naming conventions. With only one tool, there are no inconsistencies to evaluate.
One tool is on the low end and feels thin for a server named CiNii, which typically implies a richer API surface. However, the tool itself is comprehensive enough to perform advanced searches, so it's borderline.
The server only offers a single search tool. It lacks dedicated operations for fetching paper details by ID, managing result pagination, or accessing related resources like authors or references, leaving significant gaps for a full CiNii integration.