@nulib/dc-api-mcp 2.10.2

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Northwestern University Libraries
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.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # dc-api-mcp
2
+
3
+ A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that exposes Northwestern University Library's [Digital Collections API](https://api.dc.library.northwestern.edu/api/v2) as tools for AI assistants.
4
+
5
+ ## Requirements
6
+
7
+ - Node.js 24+ (see [.tool-versions](.tool-versions))
8
+ - [mise](https://mise.jdx.dev/) (used by `bin/run.sh` to activate the correct runtime)
9
+
10
+ ## Setup
11
+
12
+ ```bash
13
+ npm install
14
+ ```
15
+
16
+ ## Configuration
17
+
18
+ The server reads the following environment variables:
19
+
20
+ | Variable | Default | Description |
21
+ | -------------- | ------------------------------------------------- | -------------------------------------------------------------------- |
22
+ | `DC_API_BASE` | `https://api.dc.library.northwestern.edu/api/v2` | Base URL for the Digital Collections API |
23
+ | `DC_IIIF_BASE` | `https://iiif.dc.library.northwestern.edu/iiif/3` | Base URL for the Digital Collections API |
24
+ | `SECRETS_PATH` | _(none)_ | The base secrets path to load configuration from AWS Secrets Manager |
25
+
26
+ ## Running locally
27
+
28
+ ### stdio (for Claude Desktop / Claude Code)
29
+
30
+ ```bash
31
+ cd src
32
+ npm run stdio
33
+ ```
34
+
35
+ Or via the wrapper script:
36
+
37
+ ```bash
38
+ bin/run.sh
39
+ ```
40
+
41
+ ### HTTP (Streamable HTTP transport, port 3000)
42
+
43
+ ```bash
44
+ cd src
45
+ npm run http
46
+ ```
47
+
48
+ ## Configuring Claude Desktop
49
+
50
+ Add the following entry to your Claude Desktop configuration file.
51
+
52
+ **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
53
+ **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
54
+
55
+ ```json
56
+ {
57
+ "mcpServers": {
58
+ "dc-api": {
59
+ "command": "/path/to/dc-api/mcp/bin/run.sh"
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ Replace `/path/to/dc-api/mcp` with the absolute path to this directory on your machine.
66
+
67
+ If you need to override the API base URL or supply a semantic search model ID, pass them as environment variables:
68
+
69
+ ```json
70
+ {
71
+ "mcpServers": {
72
+ "dc-api": {
73
+ "command": "/path/to/dc-api/mcp/bin/run.sh",
74
+ "env": {
75
+ "DC_API_BASE": "https://api.dc.library.northwestern.edu/api/v2",
76
+ "DC_IIIF_BASE": "https://iiif.dc.library.northwestern.edu/iiif/3"
77
+ }
78
+ }
79
+ }
80
+ }
81
+ ```
82
+
83
+ After editing the file, restart Claude Desktop for the changes to take effect. You should see the `dc-api` server listed under the MCP tools panel.
84
+
85
+ ## Tests
86
+
87
+ There are several ways to invoke the test suite:
88
+
89
+ | Command | Result |
90
+ | ------------------- | ------------------------------------------------------------ |
91
+ | `npm run test` | Run the test suite |
92
+ | `npm test:watch` | Run the test suite, watching for changes |
93
+ | `npm test:coverage` | Run the test suite and calculate coverage |
94
+ | `npm test:record` | Run the test suite against live data and record new fixtures |
95
+
96
+ - By default, the test suite uses pre-recorded HTTP fixtures. You can set `MSW_MODE=live` to run against live data.
97
+ - `npm test:record` will record new test fixtures (requires `mitmproxy`, which can be installed with `pip install mitmproxy`).