This is an experimental tool, written mostly with GPT-5.2-Codex, for integrating AI-assisted research workflows with Zotero via dblp-based MCP, only working for bibliographic entries in Computer Science publications. It may cause unexpected behavior in your Zotero library. Use at your own risk.
Warning
This is an experimental tool, written mostly with GPT-5.2-Codex, for integrating AI-assisted research workflows with Zotero via dblp-based MCP, only working for bibliographic entries in Computer Science publications. It may cause unexpected behavior in your Zotero library. Use at your own risk.
Why this tool exists
This MCP server solves two common pain points in AI-generated references in a simple, reliable way:
- AI can hallucinate citations. Here, the AI must provide a valid DBLP URL, and the server only imports the BibTeX fetched from DBLP. If the DBLP entry does not exist, nothing is created.
- AI-assisted surveys still require manual Zotero imports. This tool lets the AI add its own cited papers directly into your Zotero library via MCP and support custom collection paths for better organization.
How to Add an MCP to Your AI (general)
The general idea is always the same: run an MCP server, then register it in your AI client so the model can call its tools.
Typical steps:
- Start or point to the MCP server (stdio or HTTP), depending on what your AI client supports.
- Register the server in the AI client’s MCP configuration with the command/args (and any required env or config file).
- Ask the AI to call a tool by name and pass the parameters you want.
- Verify the tool call with a simple test (e.g., list tools, then call one).
The following section details how to set this up in Codex.
Codex MCP Interaction (stdio)
Core idea: register a stdio server in Codex’s MCP configuration, pointing to this project’s server.py.
Example configuration (JSON form; exact location depends on your Codex setup):
{
"mcpServers": {
"zotero-connector": {
"command": "/Users/ldc123/PycharmProjects/pythonProject/.venv/bin/python",
"args": [
"/Users/ldc123/PycharmProjects/pythonProject/my_packages/zotero_connector/server.py"
],
"env": {
"ZOTERO_API_KEY": "${ZOTERO_API_KEY}",
"ZOTERO_USER_ID": "${ZOTERO_USER_ID}",
"ZOTERO_LIBRARY_TYPE": "user"
}
}
}
}
Call the tool in Codex:
- Tool name:
add_dblp_entry - Parameter examples:
dblp_url:https://dblp.org/rec/journals/talg/AntoniadisCEPS23.htmlcollection_path:test/Matching/Online/Distributional
If your Codex config isn’t JSON, the principle is the same: set the stdio command/args/env on the MCP server.
Dependencies
You need pyzotero configured before using this tool:
- Follow the official tutorial to create an API key and find your user ID: https://pyzotero.readthedocs.io/en/latest/
- Put your credentials into
my_packages/zotero_connector/config.json:
{
"user_id": "your_user_id",
"api_key": "your_api_key",
"library_type": "user"
}
- Run the file
test_pyzotero.pyto verify access.
Research usage example
Example workflow for a survey project:
- Ask the AI to draft a short survey and list citations as DBLP URLs as well as suggested collection paths. You can chat several rounds to refine the structure.
- For each URL, the AI calls
add_dblp_entrywith a collection path likeSurvey/Topic/Section. - Zotero ends up with a clean, structured collection that mirrors your survey outline.
MCP Server Testing
Minimal test: Replace ... to your local path, then run:
python3 .../zotero_connector/server.py <<'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"demo","version":"0.1"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"add_dblp_entry","arguments":{"dblp_url":"https://dblp.org/rec/journals/bspc/DingLCDSL26.html","collection_path":"test/Matching"}}}
EOF
and seek your zotero library for the new entry. Ideally, the new entry appears in the test/Matching collection (if not existing, it will be created).