Content
cncp
An MCP server forKI.
## Initial Setup
Run the following command for the first time:
uv run cnki-mcp init
```
The command will prompt for a Profile name. Press Enter to use `default`. Alternatively, specify a name directly:
```bash
uv run cnki-mcp init --profile school
```
Please complete the school or institution authentication in the opened browser. After successful initialization, the specified Profile will become the default Profile, and subsequent launches and searches will not require repeating the profile specification.
## Recommended Launch Method
It is recommended to use HTTP. The following two commands have the same effect and listen on `127.0.0.1:7788` by default:
```bash
uv run cnki-mcp
uv run cnki-mcp serve --transport http --host 127.0.0.1 --port 7788
```
A persistent browser will be opened when the service starts and will close when the service process exits. The project only provides CNKI search and article information reading, not full-text downloads.
To retrieve metadata for all articles in a specific issue using ISSN:
```bash
uv run cnki-mcp tool journal --issn 1002-9621 --year 2026 --vol 1
```
Here, `--vol` represents the issue number on the CNKI page. The actual volume and issue numbers will be provided separately in the results. If a year or issue number has not been published, `IssueNotAvailable` will be returned.
Search for ISSN by journal name:
```bash
uv run cnki-mcp tool issn --journal "World Economy"
```
The search will ignore spaces and punctuation in the journal name and return all candidate journals found by CNKI. The journal catalog comes from the CNKI journal navigation page. Each time the tool is used, it will reposition the journal by ISSN and obtain the current valid page address, without saving the `p` parameter which may become invalid.
## Documentation
- [Python API and Professional Search Terms](docs/api.md)