academic-research-tools 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- academic_research_tools-0.1.0/.env.example +15 -0
- academic_research_tools-0.1.0/CHANGELOG.md +30 -0
- academic_research_tools-0.1.0/CONTRIBUTING.md +78 -0
- academic_research_tools-0.1.0/LICENSE +21 -0
- academic_research_tools-0.1.0/MANIFEST.in +18 -0
- academic_research_tools-0.1.0/PKG-INFO +218 -0
- academic_research_tools-0.1.0/README.md +190 -0
- academic_research_tools-0.1.0/SECURITY.md +48 -0
- academic_research_tools-0.1.0/__init__.py +14 -0
- academic_research_tools-0.1.0/docs/architecture.md +48 -0
- academic_research_tools-0.1.0/docs/credentials.md +75 -0
- academic_research_tools-0.1.0/docs/getting-started.md +91 -0
- academic_research_tools-0.1.0/docs/integrations/claude-desktop.md +38 -0
- academic_research_tools-0.1.0/docs/integrations/cursor.md +38 -0
- academic_research_tools-0.1.0/docs/integrations/generic-mcp.md +69 -0
- academic_research_tools-0.1.0/docs/integrations/hermes.md +54 -0
- academic_research_tools-0.1.0/docs/internal/baseline.md +13 -0
- academic_research_tools-0.1.0/docs/providers/arxiv.md +41 -0
- academic_research_tools-0.1.0/docs/providers/google-scholar-serpapi.md +35 -0
- academic_research_tools-0.1.0/docs/providers/scopus.md +57 -0
- academic_research_tools-0.1.0/docs/providers/semantic-scholar.md +35 -0
- academic_research_tools-0.1.0/integrations/hermes/README.md +16 -0
- academic_research_tools-0.1.0/plugin.yaml +14 -0
- academic_research_tools-0.1.0/pyproject.toml +67 -0
- academic_research_tools-0.1.0/setup.cfg +4 -0
- academic_research_tools-0.1.0/src/academic_research/__init__.py +29 -0
- academic_research_tools-0.1.0/src/academic_research/cli.py +104 -0
- academic_research_tools-0.1.0/src/academic_research/hermes_plugin.py +104 -0
- academic_research_tools-0.1.0/src/academic_research/hermes_schemas.py +151 -0
- academic_research_tools-0.1.0/src/academic_research/mcp_server.py +316 -0
- academic_research_tools-0.1.0/src/academic_research/models.py +117 -0
- academic_research_tools-0.1.0/src/academic_research/providers/__init__.py +17 -0
- academic_research_tools-0.1.0/src/academic_research/providers/arxiv.py +218 -0
- academic_research_tools-0.1.0/src/academic_research/providers/scopus.py +527 -0
- academic_research_tools-0.1.0/src/academic_research/providers/semantic_scholar.py +250 -0
- academic_research_tools-0.1.0/src/academic_research/providers/serpapi_scholar.py +198 -0
- academic_research_tools-0.1.0/src/academic_research/service.py +221 -0
- academic_research_tools-0.1.0/src/academic_research/skills/academic-research-workflow/SKILL.md +29 -0
- academic_research_tools-0.1.0/src/academic_research/status.py +58 -0
- academic_research_tools-0.1.0/src/academic_research_tools.egg-info/PKG-INFO +218 -0
- academic_research_tools-0.1.0/src/academic_research_tools.egg-info/SOURCES.txt +51 -0
- academic_research_tools-0.1.0/src/academic_research_tools.egg-info/dependency_links.txt +1 -0
- academic_research_tools-0.1.0/src/academic_research_tools.egg-info/entry_points.txt +6 -0
- academic_research_tools-0.1.0/src/academic_research_tools.egg-info/requires.txt +7 -0
- academic_research_tools-0.1.0/src/academic_research_tools.egg-info/top_level.txt +1 -0
- academic_research_tools-0.1.0/tests/test_arxiv_mcp.py +121 -0
- academic_research_tools-0.1.0/tests/test_cli.py +89 -0
- academic_research_tools-0.1.0/tests/test_hermes_plugin.py +71 -0
- academic_research_tools-0.1.0/tests/test_mcp_tools.py +104 -0
- academic_research_tools-0.1.0/tests/test_models_status.py +83 -0
- academic_research_tools-0.1.0/tests/test_providers.py +311 -0
- academic_research_tools-0.1.0/tests/test_repository_hygiene.py +54 -0
- academic_research_tools-0.1.0/tests/test_service.py +161 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# All credentials are optional unless you use the corresponding provider.
|
|
2
|
+
# Keep this file empty in version control. Put real values in environment
|
|
3
|
+
# variables or a local `.env` file that is ignored by Git.
|
|
4
|
+
|
|
5
|
+
# Optional: dedicated Semantic Scholar quota.
|
|
6
|
+
SEMANTIC_SCHOLAR_API_KEY=
|
|
7
|
+
|
|
8
|
+
# Required only for Scopus tools. Access may also depend on subscription or IP.
|
|
9
|
+
ELSEVIER_API_KEY=
|
|
10
|
+
|
|
11
|
+
# Optional institutional token for eligible Scopus subscriptions.
|
|
12
|
+
ELSEVIER_INST_TOKEN=
|
|
13
|
+
|
|
14
|
+
# Required only for experimental Google Scholar discovery through SerpAPI.
|
|
15
|
+
SERPAPI_API_KEY=
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and releases follow [Semantic Versioning](https://semver.org/).
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
### Planned
|
|
8
|
+
|
|
9
|
+
- Crossref and OpenAlex providers
|
|
10
|
+
- Citation and reference graph traversal
|
|
11
|
+
- BibTeX and CSV export
|
|
12
|
+
- Structured literature-screening sessions
|
|
13
|
+
|
|
14
|
+
## [0.1.0] - 2026-09-08
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Harness-neutral Python API with normalized paper metadata and provenance
|
|
19
|
+
- Unified multi-provider search with DOI, arXiv ID, and title-year deduplication
|
|
20
|
+
- Official arXiv API provider with no key requirement
|
|
21
|
+
- Official Semantic Scholar Academic Graph provider with optional authentication
|
|
22
|
+
- Official Elsevier Scopus Search, Abstract Retrieval, and Author Search providers
|
|
23
|
+
- Experimental Google Scholar discovery through optional SerpAPI
|
|
24
|
+
- Local stdio MCP server using the official MCP Python SDK v2
|
|
25
|
+
- Command-line status, search, and MCP serve commands
|
|
26
|
+
- Native Hermes Agent adapter with per-provider credential gating
|
|
27
|
+
- Synthetic offline tests, CI, security policy, and provider documentation
|
|
28
|
+
|
|
29
|
+
[Unreleased]: https://github.com/istgrudd/academic-research-tools/compare/v0.1.0...HEAD
|
|
30
|
+
[0.1.0]: https://github.com/istgrudd/academic-research-tools/releases/tag/v0.1.0
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for improving Academic Research Tools. Small, focused pull requests are easier to review and release safely.
|
|
4
|
+
|
|
5
|
+
## Before opening code
|
|
6
|
+
|
|
7
|
+
For new providers, public API changes, credential handling, or large refactors, open an issue first. Describe:
|
|
8
|
+
|
|
9
|
+
- the research workflow being improved
|
|
10
|
+
- the official or third-party API involved
|
|
11
|
+
- authentication and rate-limit requirements
|
|
12
|
+
- expected normalized fields and provenance
|
|
13
|
+
- relevant terms or data-license constraints
|
|
14
|
+
|
|
15
|
+
Bug fixes and documentation corrections can go directly to a pull request.
|
|
16
|
+
|
|
17
|
+
## Development setup
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
git clone https://github.com/istgrudd/academic-research-tools.git
|
|
21
|
+
cd academic-research-tools
|
|
22
|
+
python -m venv .venv
|
|
23
|
+
. .venv/bin/activate
|
|
24
|
+
python -m pip install -e '.[dev]'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Run all local quality gates:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ruff check src tests __init__.py
|
|
31
|
+
pytest
|
|
32
|
+
python -m compileall -q src __init__.py
|
|
33
|
+
python -m build
|
|
34
|
+
python -m twine check dist/*
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Test requirements
|
|
38
|
+
|
|
39
|
+
- Add a failing test before changing behaviour.
|
|
40
|
+
- Use synthetic, minimal fixtures.
|
|
41
|
+
- Do not include copied provider responses, licensed datasets, personal records, or credentials.
|
|
42
|
+
- Unit and CI tests must not make live provider calls.
|
|
43
|
+
- Test error responses, pagination, rate limits, and missing credentials where applicable.
|
|
44
|
+
- Preserve provenance when normalizing or merging records.
|
|
45
|
+
|
|
46
|
+
A manual live smoke test is optional before a release and must use the maintainer's own credential and quota. Never print the credential or commit the output.
|
|
47
|
+
|
|
48
|
+
## Provider implementation checklist
|
|
49
|
+
|
|
50
|
+
A provider should:
|
|
51
|
+
|
|
52
|
+
1. live under `src/academic_research/providers/`
|
|
53
|
+
2. use an official API where available
|
|
54
|
+
3. validate limits before making a request
|
|
55
|
+
4. use a bounded timeout and a descriptive user agent
|
|
56
|
+
5. translate provider errors into actionable exceptions
|
|
57
|
+
6. return normalized models with source IDs and provenance
|
|
58
|
+
7. report whether authentication is required or optional
|
|
59
|
+
8. document terms, coverage, quotas, and access caveats
|
|
60
|
+
9. include synthetic offline tests
|
|
61
|
+
|
|
62
|
+
Direct scraping of websites that prohibit it is out of scope.
|
|
63
|
+
|
|
64
|
+
## Pull requests
|
|
65
|
+
|
|
66
|
+
Keep commits understandable and use descriptive messages such as:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
feat: add Crossref provider
|
|
70
|
+
fix: preserve DOI during Semantic Scholar normalization
|
|
71
|
+
docs: clarify Scopus subscription requirements
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
In the pull request, include the commands run and their real outputs. CI must pass before merge. Maintainers may ask for narrower scope, additional fixtures, or legal/provider clarification.
|
|
75
|
+
|
|
76
|
+
## Releases
|
|
77
|
+
|
|
78
|
+
Only maintainers publish packages and tags. The release process verifies a clean source distribution and wheel, installs the wheel in a fresh environment, smoke-tests the CLI and MCP server, and checks that no credentials or large provider responses are included.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rudi Firdaus
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
include .env.example
|
|
2
|
+
include CHANGELOG.md
|
|
3
|
+
include CONTRIBUTING.md
|
|
4
|
+
include LICENSE
|
|
5
|
+
include README.md
|
|
6
|
+
include SECURITY.md
|
|
7
|
+
include __init__.py
|
|
8
|
+
include plugin.yaml
|
|
9
|
+
|
|
10
|
+
recursive-include docs *.md
|
|
11
|
+
recursive-include integrations *.md
|
|
12
|
+
recursive-include src/academic_research/skills *.md
|
|
13
|
+
recursive-include tests *.py
|
|
14
|
+
|
|
15
|
+
global-exclude __pycache__
|
|
16
|
+
global-exclude *.py[cod]
|
|
17
|
+
global-exclude .env
|
|
18
|
+
global-exclude .DS_Store
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: academic-research-tools
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Evidence-grounded academic literature discovery for AI agents, MCP clients, and Python applications.
|
|
5
|
+
Author-email: Rudi Firdaus <digitalrudi14@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/istgrudd/academic-research-tools
|
|
8
|
+
Project-URL: Documentation, https://github.com/istgrudd/academic-research-tools#readme
|
|
9
|
+
Project-URL: Issues, https://github.com/istgrudd/academic-research-tools/issues
|
|
10
|
+
Keywords: academic-research,arxiv,scopus,semantic-scholar,mcp
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
18
|
+
Requires-Python: >=3.10
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
License-File: LICENSE
|
|
21
|
+
Requires-Dist: mcp<3,>=2.2
|
|
22
|
+
Provides-Extra: dev
|
|
23
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
24
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
25
|
+
Requires-Dist: ruff>=0.9; extra == "dev"
|
|
26
|
+
Requires-Dist: twine>=5; extra == "dev"
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
|
|
29
|
+
# Academic Research Tools
|
|
30
|
+
|
|
31
|
+
Evidence-grounded academic literature discovery for AI agents, MCP clients, command-line workflows, and Python applications.
|
|
32
|
+
|
|
33
|
+
[](https://github.com/istgrudd/academic-research-tools/actions/workflows/ci.yml)
|
|
34
|
+
[](https://www.python.org/)
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
|
|
37
|
+
Academic Research Tools provides one normalized interface over several literature sources while preserving the source and identifiers of every record. Its core is independent of any agent harness; MCP, CLI, Python, and Hermes are adapters over the same implementation.
|
|
38
|
+
|
|
39
|
+
## Providers
|
|
40
|
+
|
|
41
|
+
| Provider | Credential | Availability | Notes |
|
|
42
|
+
|---|---|---|---|
|
|
43
|
+
| arXiv | None | Core | Official public Atom API |
|
|
44
|
+
| Semantic Scholar | Optional `SEMANTIC_SCHOLAR_API_KEY` | Core | Unauthenticated access uses shared public quota |
|
|
45
|
+
| Scopus | `ELSEVIER_API_KEY` | Core, optional at runtime | Metadata and abstracts may require subscription or institutional IP |
|
|
46
|
+
| Google Scholar through SerpAPI | `SERPAPI_API_KEY` | Experimental | Third-party SerpAPI integration; not direct scraping or an official Google Scholar API |
|
|
47
|
+
|
|
48
|
+
The package remains useful without credentials: arXiv is available immediately and Semantic Scholar can be queried without a key, subject to public rate limits.
|
|
49
|
+
|
|
50
|
+
## Features
|
|
51
|
+
|
|
52
|
+
- Normalized `Paper`, `Author`, `SearchResult`, and `UnifiedSearchResult` contracts
|
|
53
|
+
- Concurrent multi-provider search with partial-failure reporting
|
|
54
|
+
- Conservative deduplication by DOI, base arXiv ID, or normalized title plus year
|
|
55
|
+
- Per-record provenance and provider identifiers
|
|
56
|
+
- Local stdio MCP server for compatible clients
|
|
57
|
+
- Automation-friendly CLI and direct Python API
|
|
58
|
+
- Thin native Hermes Agent adapter
|
|
59
|
+
- Local-first credentials with no telemetry
|
|
60
|
+
|
|
61
|
+
## Installation
|
|
62
|
+
|
|
63
|
+
### From GitHub
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
git clone https://github.com/istgrudd/academic-research-tools.git
|
|
67
|
+
cd academic-research-tools
|
|
68
|
+
python -m venv .venv
|
|
69
|
+
. .venv/bin/activate
|
|
70
|
+
python -m pip install .
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### From PyPI
|
|
74
|
+
|
|
75
|
+
After the first package release:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install academic-research-tools
|
|
79
|
+
# or
|
|
80
|
+
pipx install academic-research-tools
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
No credential is required to verify the installation:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
academic-research --version
|
|
87
|
+
academic-research status
|
|
88
|
+
academic-research search "traffic flow estimation low visibility" \
|
|
89
|
+
--sources arxiv semantic_scholar --limit 5
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
See [Getting started](docs/getting-started.md) and [Credential setup](docs/credentials.md).
|
|
93
|
+
|
|
94
|
+
## MCP quick start
|
|
95
|
+
|
|
96
|
+
Run the local stdio server:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
academic-research serve
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
If you use `uvx` without a prior install, configure the MCP client to execute:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
uvx --from academic-research-tools academic-research serve
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Generic MCP configuration:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"mcpServers": {
|
|
113
|
+
"academic-research": {
|
|
114
|
+
"command": "uvx",
|
|
115
|
+
"args": [
|
|
116
|
+
"--from",
|
|
117
|
+
"academic-research-tools",
|
|
118
|
+
"academic-research",
|
|
119
|
+
"serve"
|
|
120
|
+
],
|
|
121
|
+
"env": {
|
|
122
|
+
"SEMANTIC_SCHOLAR_API_KEY": "${SEMANTIC_SCHOLAR_API_KEY}",
|
|
123
|
+
"ELSEVIER_API_KEY": "${ELSEVIER_API_KEY}"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Only include environment variables for providers you intend to use. Details: [generic MCP](docs/integrations/generic-mcp.md), [Claude Desktop](docs/integrations/claude-desktop.md), and [Cursor](docs/integrations/cursor.md).
|
|
131
|
+
|
|
132
|
+
### MCP tools
|
|
133
|
+
|
|
134
|
+
- `research_provider_status`
|
|
135
|
+
- `search_papers`
|
|
136
|
+
- `search_arxiv`
|
|
137
|
+
- `search_semantic_scholar`
|
|
138
|
+
- `search_scopus`
|
|
139
|
+
- `get_scopus_abstract`
|
|
140
|
+
- `search_scopus_authors`
|
|
141
|
+
- `search_google_scholar`
|
|
142
|
+
|
|
143
|
+
## Python API
|
|
144
|
+
|
|
145
|
+
```python
|
|
146
|
+
from academic_research import ResearchService
|
|
147
|
+
|
|
148
|
+
client = ResearchService.from_environment()
|
|
149
|
+
result = client.search(
|
|
150
|
+
"traffic flow estimation under low visibility",
|
|
151
|
+
sources=["arxiv", "semantic_scholar", "scopus"],
|
|
152
|
+
limit_per_source=10,
|
|
153
|
+
year="2020-2026",
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
for paper in result.papers:
|
|
157
|
+
print(paper.title, paper.doi, paper.provenance)
|
|
158
|
+
|
|
159
|
+
if result.errors:
|
|
160
|
+
print("Partial provider failures:", result.errors)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
A provider that is not configured is excluded from `ResearchService.from_environment()`. Explicitly requesting a missing provider returns an actionable error rather than silently changing the requested source list.
|
|
164
|
+
|
|
165
|
+
## Hermes Agent
|
|
166
|
+
|
|
167
|
+
Current Hermes installations can install the repository directly:
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
hermes plugins install istgrudd/academic-research-tools --enable
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Pip-distributed discovery is also declared through the `hermes_agent.plugins` entry-point group. Scopus and SerpAPI use per-tool checks, so missing optional credentials never disable arXiv or Semantic Scholar.
|
|
174
|
+
|
|
175
|
+
See [Hermes integration](docs/integrations/hermes.md).
|
|
176
|
+
|
|
177
|
+
## Credential safety
|
|
178
|
+
|
|
179
|
+
Credentials are read only from environment variables. This project does not:
|
|
180
|
+
|
|
181
|
+
- accept secrets as command-line arguments
|
|
182
|
+
- print credential values in `status`
|
|
183
|
+
- store credentials or API responses automatically
|
|
184
|
+
- send telemetry
|
|
185
|
+
- require all providers to be configured
|
|
186
|
+
|
|
187
|
+
Do not commit `.env`; it is ignored by Git. See [SECURITY.md](SECURITY.md).
|
|
188
|
+
|
|
189
|
+
## Development
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
python -m venv .venv
|
|
193
|
+
. .venv/bin/activate
|
|
194
|
+
python -m pip install -e '.[dev]'
|
|
195
|
+
ruff check src tests __init__.py
|
|
196
|
+
pytest
|
|
197
|
+
python -m build
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Tests use synthetic fixtures and do not spend provider quota. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
201
|
+
|
|
202
|
+
## Scope and limitations
|
|
203
|
+
|
|
204
|
+
- Search ranking and coverage differ by provider.
|
|
205
|
+
- Citation counts from different providers are retained with provenance and should not be treated as directly interchangeable.
|
|
206
|
+
- Deduplication is intentionally conservative; ambiguous records may remain separate.
|
|
207
|
+
- This project does not bypass paywalls or grant access beyond the user's provider entitlement.
|
|
208
|
+
- Remote hosted MCP, long-term credential storage, and automatic literature-review decisions are outside the v0.1 scope.
|
|
209
|
+
|
|
210
|
+
## Legal and data-provider notice
|
|
211
|
+
|
|
212
|
+
This project is an independent, unofficial integration and is not affiliated with or endorsed by Elsevier, Scopus, Semantic Scholar, arXiv, Google, or SerpAPI. Users are responsible for complying with each provider's API terms, acceptable-use policies, subscription conditions, and data licenses. The MIT license covers this project's source code, not provider data or services.
|
|
213
|
+
|
|
214
|
+
Thank you to arXiv for use of its open access interoperability.
|
|
215
|
+
|
|
216
|
+
## License
|
|
217
|
+
|
|
218
|
+
Source code is available under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# Academic Research Tools
|
|
2
|
+
|
|
3
|
+
Evidence-grounded academic literature discovery for AI agents, MCP clients, command-line workflows, and Python applications.
|
|
4
|
+
|
|
5
|
+
[](https://github.com/istgrudd/academic-research-tools/actions/workflows/ci.yml)
|
|
6
|
+
[](https://www.python.org/)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
Academic Research Tools provides one normalized interface over several literature sources while preserving the source and identifiers of every record. Its core is independent of any agent harness; MCP, CLI, Python, and Hermes are adapters over the same implementation.
|
|
10
|
+
|
|
11
|
+
## Providers
|
|
12
|
+
|
|
13
|
+
| Provider | Credential | Availability | Notes |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| arXiv | None | Core | Official public Atom API |
|
|
16
|
+
| Semantic Scholar | Optional `SEMANTIC_SCHOLAR_API_KEY` | Core | Unauthenticated access uses shared public quota |
|
|
17
|
+
| Scopus | `ELSEVIER_API_KEY` | Core, optional at runtime | Metadata and abstracts may require subscription or institutional IP |
|
|
18
|
+
| Google Scholar through SerpAPI | `SERPAPI_API_KEY` | Experimental | Third-party SerpAPI integration; not direct scraping or an official Google Scholar API |
|
|
19
|
+
|
|
20
|
+
The package remains useful without credentials: arXiv is available immediately and Semantic Scholar can be queried without a key, subject to public rate limits.
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
- Normalized `Paper`, `Author`, `SearchResult`, and `UnifiedSearchResult` contracts
|
|
25
|
+
- Concurrent multi-provider search with partial-failure reporting
|
|
26
|
+
- Conservative deduplication by DOI, base arXiv ID, or normalized title plus year
|
|
27
|
+
- Per-record provenance and provider identifiers
|
|
28
|
+
- Local stdio MCP server for compatible clients
|
|
29
|
+
- Automation-friendly CLI and direct Python API
|
|
30
|
+
- Thin native Hermes Agent adapter
|
|
31
|
+
- Local-first credentials with no telemetry
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
### From GitHub
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
git clone https://github.com/istgrudd/academic-research-tools.git
|
|
39
|
+
cd academic-research-tools
|
|
40
|
+
python -m venv .venv
|
|
41
|
+
. .venv/bin/activate
|
|
42
|
+
python -m pip install .
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### From PyPI
|
|
46
|
+
|
|
47
|
+
After the first package release:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
pip install academic-research-tools
|
|
51
|
+
# or
|
|
52
|
+
pipx install academic-research-tools
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
No credential is required to verify the installation:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
academic-research --version
|
|
59
|
+
academic-research status
|
|
60
|
+
academic-research search "traffic flow estimation low visibility" \
|
|
61
|
+
--sources arxiv semantic_scholar --limit 5
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
See [Getting started](docs/getting-started.md) and [Credential setup](docs/credentials.md).
|
|
65
|
+
|
|
66
|
+
## MCP quick start
|
|
67
|
+
|
|
68
|
+
Run the local stdio server:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
academic-research serve
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If you use `uvx` without a prior install, configure the MCP client to execute:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uvx --from academic-research-tools academic-research serve
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Generic MCP configuration:
|
|
81
|
+
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"mcpServers": {
|
|
85
|
+
"academic-research": {
|
|
86
|
+
"command": "uvx",
|
|
87
|
+
"args": [
|
|
88
|
+
"--from",
|
|
89
|
+
"academic-research-tools",
|
|
90
|
+
"academic-research",
|
|
91
|
+
"serve"
|
|
92
|
+
],
|
|
93
|
+
"env": {
|
|
94
|
+
"SEMANTIC_SCHOLAR_API_KEY": "${SEMANTIC_SCHOLAR_API_KEY}",
|
|
95
|
+
"ELSEVIER_API_KEY": "${ELSEVIER_API_KEY}"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Only include environment variables for providers you intend to use. Details: [generic MCP](docs/integrations/generic-mcp.md), [Claude Desktop](docs/integrations/claude-desktop.md), and [Cursor](docs/integrations/cursor.md).
|
|
103
|
+
|
|
104
|
+
### MCP tools
|
|
105
|
+
|
|
106
|
+
- `research_provider_status`
|
|
107
|
+
- `search_papers`
|
|
108
|
+
- `search_arxiv`
|
|
109
|
+
- `search_semantic_scholar`
|
|
110
|
+
- `search_scopus`
|
|
111
|
+
- `get_scopus_abstract`
|
|
112
|
+
- `search_scopus_authors`
|
|
113
|
+
- `search_google_scholar`
|
|
114
|
+
|
|
115
|
+
## Python API
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
from academic_research import ResearchService
|
|
119
|
+
|
|
120
|
+
client = ResearchService.from_environment()
|
|
121
|
+
result = client.search(
|
|
122
|
+
"traffic flow estimation under low visibility",
|
|
123
|
+
sources=["arxiv", "semantic_scholar", "scopus"],
|
|
124
|
+
limit_per_source=10,
|
|
125
|
+
year="2020-2026",
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
for paper in result.papers:
|
|
129
|
+
print(paper.title, paper.doi, paper.provenance)
|
|
130
|
+
|
|
131
|
+
if result.errors:
|
|
132
|
+
print("Partial provider failures:", result.errors)
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
A provider that is not configured is excluded from `ResearchService.from_environment()`. Explicitly requesting a missing provider returns an actionable error rather than silently changing the requested source list.
|
|
136
|
+
|
|
137
|
+
## Hermes Agent
|
|
138
|
+
|
|
139
|
+
Current Hermes installations can install the repository directly:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
hermes plugins install istgrudd/academic-research-tools --enable
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Pip-distributed discovery is also declared through the `hermes_agent.plugins` entry-point group. Scopus and SerpAPI use per-tool checks, so missing optional credentials never disable arXiv or Semantic Scholar.
|
|
146
|
+
|
|
147
|
+
See [Hermes integration](docs/integrations/hermes.md).
|
|
148
|
+
|
|
149
|
+
## Credential safety
|
|
150
|
+
|
|
151
|
+
Credentials are read only from environment variables. This project does not:
|
|
152
|
+
|
|
153
|
+
- accept secrets as command-line arguments
|
|
154
|
+
- print credential values in `status`
|
|
155
|
+
- store credentials or API responses automatically
|
|
156
|
+
- send telemetry
|
|
157
|
+
- require all providers to be configured
|
|
158
|
+
|
|
159
|
+
Do not commit `.env`; it is ignored by Git. See [SECURITY.md](SECURITY.md).
|
|
160
|
+
|
|
161
|
+
## Development
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
python -m venv .venv
|
|
165
|
+
. .venv/bin/activate
|
|
166
|
+
python -m pip install -e '.[dev]'
|
|
167
|
+
ruff check src tests __init__.py
|
|
168
|
+
pytest
|
|
169
|
+
python -m build
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Tests use synthetic fixtures and do not spend provider quota. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
173
|
+
|
|
174
|
+
## Scope and limitations
|
|
175
|
+
|
|
176
|
+
- Search ranking and coverage differ by provider.
|
|
177
|
+
- Citation counts from different providers are retained with provenance and should not be treated as directly interchangeable.
|
|
178
|
+
- Deduplication is intentionally conservative; ambiguous records may remain separate.
|
|
179
|
+
- This project does not bypass paywalls or grant access beyond the user's provider entitlement.
|
|
180
|
+
- Remote hosted MCP, long-term credential storage, and automatic literature-review decisions are outside the v0.1 scope.
|
|
181
|
+
|
|
182
|
+
## Legal and data-provider notice
|
|
183
|
+
|
|
184
|
+
This project is an independent, unofficial integration and is not affiliated with or endorsed by Elsevier, Scopus, Semantic Scholar, arXiv, Google, or SerpAPI. Users are responsible for complying with each provider's API terms, acceptable-use policies, subscription conditions, and data licenses. The MIT license covers this project's source code, not provider data or services.
|
|
185
|
+
|
|
186
|
+
Thank you to arXiv for use of its open access interoperability.
|
|
187
|
+
|
|
188
|
+
## License
|
|
189
|
+
|
|
190
|
+
Source code is available under the [MIT License](LICENSE).
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported versions
|
|
4
|
+
|
|
5
|
+
Until a stable release, only the latest `0.1.x` release receives security fixes.
|
|
6
|
+
|
|
7
|
+
## Reporting a vulnerability
|
|
8
|
+
|
|
9
|
+
Please do not open a public issue for credential exposure, command execution, dependency confusion, path traversal, or another exploitable vulnerability.
|
|
10
|
+
|
|
11
|
+
Prefer a private GitHub Security Advisory:
|
|
12
|
+
|
|
13
|
+
1. open the repository's **Security** tab
|
|
14
|
+
2. select **Report a vulnerability**
|
|
15
|
+
3. include affected version, reproduction steps, impact, and a suggested mitigation if known
|
|
16
|
+
|
|
17
|
+
If private reporting is unavailable, contact `digitalrudi14@gmail.com` with the subject `Academic Research Tools security report`. Do not include real API keys or provider data in the initial message.
|
|
18
|
+
|
|
19
|
+
## Credential model
|
|
20
|
+
|
|
21
|
+
Academic Research Tools is local-first:
|
|
22
|
+
|
|
23
|
+
- provider credentials are read from environment variables
|
|
24
|
+
- credentials are not accepted as CLI arguments
|
|
25
|
+
- `status` reports booleans only and never echoes values
|
|
26
|
+
- no telemetry is implemented
|
|
27
|
+
- provider responses are returned to the caller and are not automatically persisted
|
|
28
|
+
- MCP v0.1 uses local stdio transport rather than a hosted credential-custody service
|
|
29
|
+
|
|
30
|
+
`.env` files are ignored by Git. `.env.example` contains empty values only. Users remain responsible for their shell history, process environment, MCP host configuration, local file permissions, and provider account security.
|
|
31
|
+
|
|
32
|
+
## Safe disclosure and rotation
|
|
33
|
+
|
|
34
|
+
If a credential may have been exposed:
|
|
35
|
+
|
|
36
|
+
1. revoke or rotate it with the provider immediately
|
|
37
|
+
2. remove it from current files and runtime configuration
|
|
38
|
+
3. if committed, rewrite repository history where appropriate
|
|
39
|
+
4. invalidate cached CI artifacts or logs that contained it
|
|
40
|
+
5. notify affected collaborators privately
|
|
41
|
+
|
|
42
|
+
Deleting only the latest Git commit is not sufficient after a secret has been pushed.
|
|
43
|
+
|
|
44
|
+
## Provider and data security boundaries
|
|
45
|
+
|
|
46
|
+
The MIT license covers this source code, not provider data. This project does not grant access beyond a user's API key, subscription, or institutional network entitlement. Vulnerabilities in Elsevier, Semantic Scholar, arXiv, Google, SerpAPI, an MCP host, or another dependency should also be reported to the responsible vendor.
|
|
47
|
+
|
|
48
|
+
Do not submit vulnerability reports containing large copyrighted API responses, unpublished papers, personal data, or third-party credentials.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Directory-plugin shim for installing this repository directly in Hermes."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sys
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
|
|
8
|
+
_SOURCE = Path(__file__).parent / "src"
|
|
9
|
+
if str(_SOURCE) not in sys.path:
|
|
10
|
+
sys.path.insert(0, str(_SOURCE))
|
|
11
|
+
|
|
12
|
+
from academic_research.hermes_plugin import register # noqa: E402
|
|
13
|
+
|
|
14
|
+
__all__ = ["register"]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
Academic Research Tools separates data access from agent integration.
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
Claude · Hermes · Cursor · other MCP hosts · CLI · Python
|
|
7
|
+
│
|
|
8
|
+
adapters / MCP
|
|
9
|
+
│
|
|
10
|
+
validation · normalization · deduplication
|
|
11
|
+
│
|
|
12
|
+
arXiv · Semantic Scholar · Scopus · SerpAPI
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Core
|
|
16
|
+
|
|
17
|
+
`src/academic_research/` contains provider-neutral contracts and orchestration:
|
|
18
|
+
|
|
19
|
+
- `models.py`: JSON-safe normalized records
|
|
20
|
+
- `service.py`: provider selection, concurrent searches, partial failures, and conservative deduplication
|
|
21
|
+
- `status.py`: credential-safe availability booleans
|
|
22
|
+
- `providers/`: official or explicitly documented third-party API clients
|
|
23
|
+
|
|
24
|
+
Core provider code has no dependency on Hermes or another agent harness.
|
|
25
|
+
|
|
26
|
+
## Adapters
|
|
27
|
+
|
|
28
|
+
- `mcp_server.py` exposes local stdio tools through the official MCP SDK.
|
|
29
|
+
- `cli.py` offers status, search, and serve commands.
|
|
30
|
+
- `hermes_plugin.py` registers native Hermes tools and delegates to the same facade.
|
|
31
|
+
|
|
32
|
+
## Failure model
|
|
33
|
+
|
|
34
|
+
Provider failures are isolated. Unified search returns successful records plus an `errors` mapping and warnings. A caller can decide whether partial evidence is acceptable.
|
|
35
|
+
|
|
36
|
+
## Deduplication
|
|
37
|
+
|
|
38
|
+
Records merge in this order:
|
|
39
|
+
|
|
40
|
+
1. normalized DOI
|
|
41
|
+
2. base arXiv ID
|
|
42
|
+
3. normalized title plus publication year
|
|
43
|
+
|
|
44
|
+
The merge retains source IDs, contributing providers, provider-specific metadata, and citation-count provenance. It prefers a non-empty or richer abstract but does not infer missing claims.
|
|
45
|
+
|
|
46
|
+
## Credential boundary
|
|
47
|
+
|
|
48
|
+
Provider keys enter only through process environment variables. Local stdio MCP avoids a hosted credential-custody service. Remote MCP transport and persistent secret storage are intentionally outside v0.1.
|