AI4Scholar MCP And OpenClaw Setup
Use this skill to deploy AI4Scholar as a scholarly tool provider for an Agent. It covers the two access modes from the source guide: lightweight MCP and full OpenClaw plugin.
Source guide: https://lifu-coze.feishu.cn/wiki/WOaewK33Ei2g1nkt44kcRXiBnze
Security Rules
- Never print or store the real API key in shared notes, manuals, or chat output.
- Use
${AI4SCHOLAR_API_KEY}as a placeholder. - Prefer environment variables or a local private config file.
- Do not commit
openclaw.jsonif it contains a real key.
Choose The Mode
| Mode | Use when | Includes |
|---|---|---|
| MCP | User wants fast setup and core AI4Scholar tools | search, PDF/full-text, citation support, scientific drawing depending on server exposure |
| OpenClaw plugin | User wants full AI4Scholar experience | 36 tools, Scholar Mode, slash commands, project/library workflow |
MCP Setup
Add this to the client's MCP server configuration:
{
"mcpServers": {
"ai4scholar": {
"url": "https://mcp.ai4scholar.net/sse",
"headers": {
"Authorization": "Bearer ${AI4SCHOLAR_API_KEY}"
}
}
}
}
Then restart the gateway or AI client.
OpenClaw Plugin Setup
Requirements:
- OpenClaw installed.
- Node.js 18 or newer.
- AI4Scholar account and API key from
https://ai4scholar.net.
Install:
openclaw plugins install ai4scholar
Configure openclaw.json:
"ai4scholar": {
"enabled": true,
"config": {
"apiKey": "${AI4SCHOLAR_API_KEY}"
}
}
Restart:
openclaw gateway stop
openclaw gateway start
Verify:
openclaw plugins list
The startup log should indicate that the API key is configured. Do not paste the log if it prints secrets.
Windows Plugin Install Failure
If OpenClaw plugin install fails with a Windows spawn error, use one of these routes:
- Prefer MCP mode to avoid plugin installation.
- Confirm
npm --versionworks and npm is inPATH. - Manual plugin install:
npm pack ai4scholar
mkdir %USERPROFILE%\.openclaw\extensions\ai4scholar
tar -xzf ai4scholar-0.6.3.tgz -C %USERPROFILE%\.openclaw\extensions\ai4scholar --strip-components=1
openclaw gateway stop
openclaw gateway start
Check the actual package version after npm pack; do not assume 0.6.3 if a newer tarball is downloaded.
Verification Prompt
Check whether AI4Scholar is available.
Do not display the API key.
Verify whether MCP or the OpenClaw plugin is configured, then run a small low-cost paper-search test.
Troubleshooting
| Problem | Check |
|---|---|
| API key invalid | Recreate key on ai4scholar.net and update local config |
| Search result empty | Broaden query, try another source, check network |
| Plugin not found | Use npm package route; do not search only in a plugin marketplace |
| DOI download fails | Check institutional access; use open-access tools first |
| PDF extraction poor | Use local pdf or markitdown fallback |