all-in-mcp 0.1.4__tar.gz → 0.2.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: all-in-mcp
3
- Version: 0.1.4
3
+ Version: 0.2.3
4
4
  Summary: An MCP (Model Context Protocol) server providing daily-use utility functions and academic paper search capabilities
5
5
  Project-URL: Homepage, https://github.com/jiahaoxiang2000/all-in-mcp
6
6
  Project-URL: Repository, https://github.com/jiahaoxiang2000/all-in-mcp
@@ -52,14 +52,25 @@ An MCP (Model Context Protocol) server that provides daily-use utility functions
52
52
  ### Daily Utilities
53
53
 
54
54
  - **Academic Research**: IACR ePrint Archive paper search, download, and reading
55
+ - **Bibliography Search**: CryptoBib database search for cryptography papers
56
+ - **PDF Reading**: Read and extract text from local and online PDF files
55
57
 
56
58
  ### Paper Search Capabilities
57
59
 
60
+ #### IACR ePrint Archive
61
+
58
62
  - Search academic papers from IACR ePrint Archive
59
63
  - Download PDF files
60
64
  - Extract and read text content from papers
61
65
  - Metadata extraction (authors, publication dates, abstracts)
62
66
 
67
+ #### CryptoBib Database
68
+
69
+ - Search comprehensive cryptography bibliography database
70
+ - Access to thousands of cryptographic research papers
71
+ - Retrieve structured paper metadata or raw BibTeX entries
72
+ - Support for all major cryptography venues and conferences
73
+
63
74
  ## Quick Start
64
75
 
65
76
  ### Prerequisites
@@ -75,7 +86,7 @@ An MCP (Model Context Protocol) server that provides daily-use utility functions
75
86
  pip install all-in-mcp
76
87
  ```
77
88
 
78
- ### Installation
89
+ ### Option 2: Install from Source
79
90
 
80
91
  1. Clone this repository:
81
92
 
@@ -201,6 +212,7 @@ Complete documentation is available in the [`docs/`](docs/) directory:
201
212
  - **[API Reference](docs/api.md)** - Complete API documentation
202
213
  - **[Installation Guide](docs/installation.md)** - Setup instructions
203
214
  - **[IACR Integration](docs/iacr.md)** - Academic paper search details
215
+ - **[CryptoBib Integration](docs/cryptobib.md)** - Bibliography database search
204
216
  - **[Development Guide](docs/development.md)** - Contributing guidelines
205
217
  - **[PyPI Setup Guide](docs/pypi-setup.md)** - Publishing configuration
206
218
  - **[Examples](docs/examples.md)** - Usage examples
@@ -7,14 +7,25 @@ An MCP (Model Context Protocol) server that provides daily-use utility functions
7
7
  ### Daily Utilities
8
8
 
9
9
  - **Academic Research**: IACR ePrint Archive paper search, download, and reading
10
+ - **Bibliography Search**: CryptoBib database search for cryptography papers
11
+ - **PDF Reading**: Read and extract text from local and online PDF files
10
12
 
11
13
  ### Paper Search Capabilities
12
14
 
15
+ #### IACR ePrint Archive
16
+
13
17
  - Search academic papers from IACR ePrint Archive
14
18
  - Download PDF files
15
19
  - Extract and read text content from papers
16
20
  - Metadata extraction (authors, publication dates, abstracts)
17
21
 
22
+ #### CryptoBib Database
23
+
24
+ - Search comprehensive cryptography bibliography database
25
+ - Access to thousands of cryptographic research papers
26
+ - Retrieve structured paper metadata or raw BibTeX entries
27
+ - Support for all major cryptography venues and conferences
28
+
18
29
  ## Quick Start
19
30
 
20
31
  ### Prerequisites
@@ -30,7 +41,7 @@ An MCP (Model Context Protocol) server that provides daily-use utility functions
30
41
  pip install all-in-mcp
31
42
  ```
32
43
 
33
- ### Installation
44
+ ### Option 2: Install from Source
34
45
 
35
46
  1. Clone this repository:
36
47
 
@@ -156,6 +167,7 @@ Complete documentation is available in the [`docs/`](docs/) directory:
156
167
  - **[API Reference](docs/api.md)** - Complete API documentation
157
168
  - **[Installation Guide](docs/installation.md)** - Setup instructions
158
169
  - **[IACR Integration](docs/iacr.md)** - Academic paper search details
170
+ - **[CryptoBib Integration](docs/cryptobib.md)** - Bibliography database search
159
171
  - **[Development Guide](docs/development.md)** - Contributing guidelines
160
172
  - **[PyPI Setup Guide](docs/pypi-setup.md)** - Publishing configuration
161
173
  - **[Examples](docs/examples.md)** - Usage examples
@@ -108,6 +108,61 @@ URL: https://eprint.iacr.org/2023/1234
108
108
  [Full extracted text content]
109
109
  ```
110
110
 
111
+ ## CryptoBib Bibliography Search
112
+
113
+ ### search-cryptobib-papers
114
+
115
+ Search CryptoBib bibliography database for cryptography papers. CryptoBib is a comprehensive BibTeX database of cryptography-related academic papers.
116
+
117
+ **Parameters:**
118
+
119
+ - `query` (string, required): Search query string (e.g., 'cryptography', 'lattice', 'homomorphic')
120
+ - `max_results` (integer, optional): Maximum number of results to return (default: 10)
121
+ - `return_bibtex` (boolean, optional): Whether to return raw BibTeX entries (default: false)
122
+ - `force_download` (boolean, optional): Force download the newest crypto.bib file (default: false)
123
+
124
+ **Returns:**
125
+
126
+ - List of papers with metadata or raw BibTeX entries
127
+
128
+ **Example:**
129
+
130
+ ```json
131
+ {
132
+ "name": "search-cryptobib-papers",
133
+ "arguments": {
134
+ "query": "lattice cryptography",
135
+ "max_results": 5,
136
+ "return_bibtex": true,
137
+ "force_download": false
138
+ }
139
+ }
140
+ ```
141
+
142
+ **Response:**
143
+
144
+ ````text
145
+ Found 5 BibTeX entries for query 'lattice cryptography':
146
+
147
+ Entry 1:
148
+ ```bibtex
149
+ @InProceedings{CRYPTO:RegLyr05,
150
+ author = "Oded Regev and Ricky Steinfeld",
151
+ title = "Learning With Errors over Rings",
152
+ booktitle = "CRYPTO 2005",
153
+ year = 2005,
154
+ ...
155
+ }
156
+ ````
157
+
158
+ **Important Notes:**
159
+
160
+ - **First Use**: On first use, the tool will download the crypto.bib file (~50MB) and cache it locally in the `./downloads` directory
161
+ - **Caching**: Subsequent searches use the cached file unless `force_download` is set to true
162
+ - **BibTeX Retrieval**: To get specific BibTeX entries, use the `search-cryptobib-papers` tool with `return_bibtex=true` and a specific search query
163
+ - **Content**: The crypto.bib file contains thousands of cryptography-related papers from major conferences and journals
164
+ - **Performance**: Local file searching is much faster than streaming searches
165
+
111
166
  ## Error Handling
112
167
 
113
168
  All tools return error messages in case of failures:
@@ -0,0 +1,166 @@
1
+ # CryptoBib Integration
2
+
3
+ This document describes the CryptoBib integration in the all-in-mcp server.
4
+
5
+ ## Overview
6
+
7
+ CryptoBib (https://cryptobib.di.ens.fr/) is a comprehensive bibliography database for cryptography research papers. This integration allows searching through the CryptoBib database and retrieving BibTeX entries.
8
+
9
+ ## Features
10
+
11
+ ### Search Functionality
12
+
13
+ - Search through the entire CryptoBib database
14
+ - Case-insensitive search across all BibTeX fields
15
+ - Returns both parsed Paper objects and raw BibTeX entries
16
+ - Configurable result limits
17
+
18
+ ### BibTeX Support
19
+
20
+ - Parse BibTeX entries into structured Paper objects
21
+ - Retrieve raw BibTeX entries for direct use
22
+ - Support for all standard BibTeX fields (author, title, booktitle, journal, year, etc.)
23
+ - Clean LaTeX formatting from titles and authors
24
+
25
+ ## Available Tools
26
+
27
+ ### search-cryptobib-papers
28
+
29
+ Search CryptoBib bibliography database for cryptography papers.
30
+
31
+ **Parameters:**
32
+
33
+ - `query` (required): Search query string (e.g., 'lattice', 'homomorphic encryption')
34
+ - `max_results` (optional, default: 10): Maximum number of results to return
35
+ - `return_bibtex` (optional, default: false): Whether to return raw BibTeX entries
36
+ - `force_download` (optional, default: false): Force download the newest crypto.bib file
37
+
38
+ **Examples:**
39
+
40
+ ```json
41
+ {
42
+ "query": "lattice cryptography",
43
+ "max_results": 5,
44
+ "return_bibtex": false
45
+ }
46
+ ```
47
+
48
+ To get specific BibTeX entries, you can use targeted search queries with `return_bibtex=true`.
49
+
50
+ ## Usage Examples
51
+
52
+ ### Basic Search
53
+
54
+ ```python
55
+ from all_in_mcp.academic_platforms.cryptobib import CryptoBibSearcher
56
+
57
+ searcher = CryptoBibSearcher()
58
+
59
+ # Search for papers
60
+ papers = searcher.search("homomorphic encryption", max_results=5)
61
+ for paper in papers:
62
+ print(f"Title: {paper.title}")
63
+ print(f"Authors: {', '.join(paper.authors)}")
64
+ print(f"BibTeX Key: {paper.paper_id}")
65
+ ```
66
+
67
+ ### Get Raw BibTeX
68
+
69
+ ```python
70
+ # Get raw BibTeX entries
71
+ bibtex_entries = searcher.search_bibtex("zero knowledge", max_results=3)
72
+ for entry in bibtex_entries:
73
+ print(entry)
74
+ ```
75
+
76
+ ### Get Specific BibTeX Entry
77
+
78
+ ```python
79
+ # Search for specific entries using targeted queries
80
+ papers = searcher.search("ACISP:LZXSW24", max_results=1)
81
+ if papers:
82
+ # Access the BibTeX from the paper's extra field
83
+ bibtex = papers[0].extra.get('bibtex', '')
84
+ print(bibtex)
85
+
86
+ # Or get raw BibTeX entries directly
87
+ bibtex_entries = searcher.search_bibtex("ACISP:LZXSW24", max_results=1)
88
+ if bibtex_entries:
89
+ print(bibtex_entries[0])
90
+ ```
91
+
92
+ ## BibTeX Entry Format
93
+
94
+ CryptoBib uses standard BibTeX format. Example entry:
95
+
96
+ ```bibtex
97
+ @InProceedings{ACISP:LZXSW24,
98
+ author = "Fangzhou Liu and
99
+ Xueqi Zhu and
100
+ Ruozhou Xu and
101
+ Danping Shi and
102
+ Peng Wang",
103
+ title = "The Offline Quantum Attack Against Modular Addition Variant of {Even}-{Mansour} Cipher",
104
+ pages = "3--19",
105
+ editor = acisp24ed,
106
+ booktitle = acisp24name1,
107
+ volume = acisp24vol1,
108
+ address = acisp24addr,
109
+ month = acisp24month,
110
+ publisher = acisp24pub,
111
+ series = mylncs,
112
+ year = 2024,
113
+ doi = "10.1007/978-981-97-5025-2_1",
114
+ }
115
+ ```
116
+
117
+ ## Implementation Details
118
+
119
+ ### Search Strategy
120
+
121
+ The implementation uses streaming HTTP requests to search through the large crypto.bib file without downloading it entirely. It:
122
+
123
+ 1. Makes a streaming request to the crypto.bib file
124
+ 2. Parses BibTeX entries on-the-fly
125
+ 3. Performs case-insensitive matching against the search query
126
+ 4. Returns results as they are found up to the specified limit
127
+
128
+ ### Performance Considerations
129
+
130
+ - Uses streaming to avoid memory issues with the large bibliography file
131
+ - Processes entries incrementally
132
+ - Stops searching once the maximum number of results is reached
133
+ - Implements proper brace counting for correct BibTeX entry parsing
134
+
135
+ ### Limitations
136
+
137
+ - No PDF download capability (CryptoBib is a bibliography database only)
138
+ - No full-text search of paper content
139
+ - Search is limited to BibTeX field content
140
+ - Dependent on CryptoBib server availability
141
+
142
+ ## Testing
143
+
144
+ Run the CryptoBib tests:
145
+
146
+ ```bash
147
+ # Run all tests
148
+ pytest tests/test_cryptobib.py
149
+
150
+ # Run with verbose output
151
+ pytest tests/test_cryptobib.py -v
152
+
153
+ # Test specific functionality
154
+ python test_cryptobib.py
155
+ ```
156
+
157
+ ## Error Handling
158
+
159
+ The implementation includes comprehensive error handling for:
160
+
161
+ - Network connectivity issues
162
+ - Malformed BibTeX entries
163
+ - Server response errors
164
+ - Parsing failures
165
+
166
+ All errors are logged and gracefully handled, returning empty results or error messages as appropriate.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "all-in-mcp"
3
- version = "0.1.4"
3
+ version = "0.2.3"
4
4
  description = "An MCP (Model Context Protocol) server providing daily-use utility functions and academic paper search capabilities"
5
5
  readme = "README.md"
6
6
  license = { text = "MIT" }
@@ -0,0 +1,6 @@
1
+ # all_in_mcp/academic_platforms/__init__.py
2
+ from .base import PaperSource
3
+ from .cryptobib import CryptoBibSearcher
4
+ from .iacr import IACRSearcher
5
+
6
+ __all__ = ["CryptoBibSearcher", "IACRSearcher", "PaperSource"]