Skip to main content
Glama
iwaokimura

mcp-cinii

by iwaokimura
README.md
# mcp-cinii
MCP for CINII API

An [MCP](https://modelcontextprotocol.io) server that exposes [CiNii Research](https://cir.nii.ac.jp/) search capabilities to LLM clients such as [Claude Code](https://docs.claude.com/en/docs/claude-code/mcp).

## Tools

### `search_cinii`
Search CiNii Research for academic articles, books, grants, and research data.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `query` | string | — | Search keywords (e.g. `"機械学習"` or `"machine learning"`) |
| `count` | int | 20 | Number of results (1–200) |
| `start` | int | 1 | 1-based offset for pagination |
| `lang` | string | `"ja"` | Response language: `"ja"` or `"en"` |
| `resource_type` | string | `""` | Filter: `"Article"`, `"Book"`, `"Dissertation"`, `"Data"`, `"Research Project"`, or `""` (all) |

Returns CiNii Research JSON-LD response.

### `get_cinii_item`
Retrieve metadata for a single CiNii Research item by its ID.

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `item_id` | string | — | CiNii Research CRID from the item URL (e.g. `"1971993809790115224"`) |
| `lang` | string | `"ja"` | Response language: `"ja"` or `"en"` |

Returns JSON-LD metadata for the item.

## Installation

```bash
pip install mcp-cinii
```

## Configuration

CiNii Research's OpenSearch API requires an application ID (`appid`). Register as a
developer and obtain one at
[CiNii - API User Registration](https://support.nii.ac.jp/ja/cinii/api/developer),
then set it via the `CINII_APP_ID` environment variable. If unset, requests are sent
without `appid` (may be subject to stricter rate limits).

## Usage with Claude Code

```bash
claude mcp add --transport stdio cinii -e CINII_APP_ID=<your-appid> -- mcp-cinii
```

## Development

```bash
uv sync --group dev
uv run pytest
```

TDQS

A4.4/5.0

Scored across 2 tools

Disambiguation5/5

get_cinii_item retrieves a single item by ID, while search_cinii performs keyword-based searches with filters. These are clearly distinct operations with no overlap.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern (get_cinii_item, search_cinii) using snake_case, with 'cinii' as the common domain prefix.

Tool Count5/5

Two tools is appropriate for a focused academic search and retrieval server. It covers the essential operations without being too few or too many.

Completeness4/5

The tool set covers search with filtering and per-item retrieval. Minor gaps include lack of browse or citation export, but core functionality for accessing CiNii Research is well-covered.

Maintenance

ActivityStale
ResponsivenessNo issues