@cyanheads/cern-inspire-mcp-server 0.1.1
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/AGENTS.md +504 -0
- package/CLAUDE.md +504 -0
- package/Dockerfile +177 -0
- package/LICENSE +201 -0
- package/README.md +311 -0
- package/changelog/0.1.x/0.1.0.md +9 -0
- package/changelog/0.1.x/0.1.1.md +22 -0
- package/changelog/template.md +151 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/resources/definitions/index.d.ts +106 -0
- package/dist/mcp-server/resources/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/index.js +7 -0
- package/dist/mcp-server/resources/definitions/index.js.map +1 -0
- package/dist/mcp-server/resources/definitions/inspire-literature.resource.d.ts +110 -0
- package/dist/mcp-server/resources/definitions/inspire-literature.resource.d.ts.map +1 -0
- package/dist/mcp-server/resources/definitions/inspire-literature.resource.js +69 -0
- package/dist/mcp-server/resources/definitions/inspire-literature.resource.js.map +1 -0
- package/dist/mcp-server/tools/definitions/export-citations.tool.d.ts +65 -0
- package/dist/mcp-server/tools/definitions/export-citations.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/export-citations.tool.js +120 -0
- package/dist/mcp-server/tools/definitions/export-citations.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-citation-summary.tool.d.ts +159 -0
- package/dist/mcp-server/tools/definitions/get-citation-summary.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-citation-summary.tool.js +262 -0
- package/dist/mcp-server/tools/definitions/get-citation-summary.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-paper.tool.d.ts +195 -0
- package/dist/mcp-server/tools/definitions/get-paper.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-paper.tool.js +356 -0
- package/dist/mcp-server/tools/definitions/get-paper.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/index.d.ts +675 -0
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/index.js +23 -0
- package/dist/mcp-server/tools/definitions/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts +33 -0
- package/dist/mcp-server/tools/definitions/list-reference.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/list-reference.tool.js +312 -0
- package/dist/mcp-server/tools/definitions/list-reference.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-authors.tool.d.ts +92 -0
- package/dist/mcp-server/tools/definitions/search-authors.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-authors.tool.js +298 -0
- package/dist/mcp-server/tools/definitions/search-authors.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-experiments.tool.d.ts +80 -0
- package/dist/mcp-server/tools/definitions/search-experiments.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-experiments.tool.js +223 -0
- package/dist/mcp-server/tools/definitions/search-experiments.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-hepdata.tool.d.ts +81 -0
- package/dist/mcp-server/tools/definitions/search-hepdata.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-hepdata.tool.js +225 -0
- package/dist/mcp-server/tools/definitions/search-hepdata.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-literature.tool.d.ts +127 -0
- package/dist/mcp-server/tools/definitions/search-literature.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-literature.tool.js +331 -0
- package/dist/mcp-server/tools/definitions/search-literature.tool.js.map +1 -0
- package/dist/mcp-server/tools/inputs.d.ts +80 -0
- package/dist/mcp-server/tools/inputs.d.ts.map +1 -0
- package/dist/mcp-server/tools/inputs.js +100 -0
- package/dist/mcp-server/tools/inputs.js.map +1 -0
- package/dist/services/http/fetch-bounded.d.ts +45 -0
- package/dist/services/http/fetch-bounded.d.ts.map +1 -0
- package/dist/services/http/fetch-bounded.js +79 -0
- package/dist/services/http/fetch-bounded.js.map +1 -0
- package/dist/services/inspire/identifiers.d.ts +55 -0
- package/dist/services/inspire/identifiers.d.ts.map +1 -0
- package/dist/services/inspire/identifiers.js +98 -0
- package/dist/services/inspire/identifiers.js.map +1 -0
- package/dist/services/inspire/inspire-service.d.ts +104 -0
- package/dist/services/inspire/inspire-service.d.ts.map +1 -0
- package/dist/services/inspire/inspire-service.js +525 -0
- package/dist/services/inspire/inspire-service.js.map +1 -0
- package/dist/services/inspire/normalize.d.ts +30 -0
- package/dist/services/inspire/normalize.d.ts.map +1 -0
- package/dist/services/inspire/normalize.js +438 -0
- package/dist/services/inspire/normalize.js.map +1 -0
- package/dist/services/inspire/types.d.ts +505 -0
- package/dist/services/inspire/types.d.ts.map +1 -0
- package/dist/services/inspire/types.js +8 -0
- package/dist/services/inspire/types.js.map +1 -0
- package/dist/services/inspire/vocabulary.d.ts +22 -0
- package/dist/services/inspire/vocabulary.d.ts.map +1 -0
- package/dist/services/inspire/vocabulary.js +68 -0
- package/dist/services/inspire/vocabulary.js.map +1 -0
- package/dist/utils/render.d.ts +40 -0
- package/dist/utils/render.d.ts.map +1 -0
- package/dist/utils/render.js +112 -0
- package/dist/utils/render.js.map +1 -0
- package/package.json +112 -0
- package/server.json +100 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Markdown rendering for upstream-authored and caller-supplied text
|
|
3
|
+
* in every tool's `format()`. INSPIRE and HEPData strings are data, never
|
|
4
|
+
* markup: inline slots are flattened to one line with link, HTML, control, and
|
|
5
|
+
* invisible format characters neutralized; text that opens a line or list item
|
|
6
|
+
* cannot open a block; free text is blockquoted; citation entries are fenced.
|
|
7
|
+
* `structuredContent` never passes through here and keeps strings as decoded.
|
|
8
|
+
* The service also uses `inline()` for upstream text it puts in an error message.
|
|
9
|
+
* @module utils/render
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A regex character class from inclusive code-point ranges. Built numerically so
|
|
13
|
+
* no invisible or line-separator character has to appear in this source file.
|
|
14
|
+
*/
|
|
15
|
+
const charClass = (ranges) => `[${ranges.map(([from, to]) => `${String.fromCharCode(from)}-${String.fromCharCode(to)}`).join('')}]`;
|
|
16
|
+
/**
|
|
17
|
+
* Stripped everywhere: C0 controls except tab, LF, and CR; DEL; C1 controls
|
|
18
|
+
* except NEL; and every format character (`\p{Cf}`: bidi marks, embeddings,
|
|
19
|
+
* overrides, and isolates, zero-width spaces, the word joiner and invisible
|
|
20
|
+
* operators, the byte-order mark, soft hyphens, tag characters) except ZWNJ and
|
|
21
|
+
* ZWJ (U+200C–200D), which Persian, Arabic, and Indic names need.
|
|
22
|
+
*/
|
|
23
|
+
const STRIPPED = new RegExp(`${charClass([
|
|
24
|
+
[0x00, 0x08],
|
|
25
|
+
[0x0b, 0x0c],
|
|
26
|
+
[0x0e, 0x1f],
|
|
27
|
+
[0x7f, 0x84],
|
|
28
|
+
[0x86, 0x9f],
|
|
29
|
+
])}|(?![\\u{200C}\\u{200D}])\\p{Cf}`, 'gu');
|
|
30
|
+
/** Line breaks: CRLF, then CR, LF, NEL (U+0085), LINE SEPARATOR, PARAGRAPH SEPARATOR (U+2028–2029). */
|
|
31
|
+
const LINE_BREAK = new RegExp(`\\r\\n|${charClass([
|
|
32
|
+
[0x0a, 0x0a],
|
|
33
|
+
[0x0d, 0x0d],
|
|
34
|
+
[0x85, 0x85],
|
|
35
|
+
[0x2028, 0x2029],
|
|
36
|
+
])}`, 'g');
|
|
37
|
+
/**
|
|
38
|
+
* Backslash-escapes `chars`, doubling any backslash run directly before one so an
|
|
39
|
+
* upstream backslash cannot cancel the escape (`\]` must not become `\\]`). One
|
|
40
|
+
* pass that consumes each backslash run whole, so a long run costs linear time.
|
|
41
|
+
*/
|
|
42
|
+
function escapeWithBackslash(text, chars) {
|
|
43
|
+
const set = chars.replace(/[\\\]^-]/g, '\\$&');
|
|
44
|
+
return text.replace(new RegExp(`(\\\\+)([${set}])?|[${set}]`, 'g'), (match, run, char) => {
|
|
45
|
+
if (run === undefined)
|
|
46
|
+
return `\\${match}`;
|
|
47
|
+
return char === undefined ? run : `${run}${run}\\${char}`;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
/** Stripping and escaping shared by `inline()` and `quote()`; line breaks untouched. */
|
|
51
|
+
function neutralize(text) {
|
|
52
|
+
return escapeWithBackslash(text.replace(STRIPPED, '').replace(/\t/g, ' '), '[]')
|
|
53
|
+
.replace(/</g, '<')
|
|
54
|
+
.replace(/>/g, '>');
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Text for an inline slot — a heading, bold name, list item, or a value
|
|
58
|
+
* interpolated into a sentence: line breaks become one space, control and format
|
|
59
|
+
* characters are stripped, `[` `]` are escaped, `<` `>` become entities.
|
|
60
|
+
*/
|
|
61
|
+
export function inline(text) {
|
|
62
|
+
return neutralize(text.replace(LINE_BREAK, ' '));
|
|
63
|
+
}
|
|
64
|
+
/** Text for a markdown table cell: `inline()` plus `|` escaped (backslash runs before it doubled). */
|
|
65
|
+
export function cell(text) {
|
|
66
|
+
return escapeWithBackslash(inline(text), '|');
|
|
67
|
+
}
|
|
68
|
+
/** Free text (abstracts, descriptions) as a blockquote: `inline()` rules with line breaks kept. */
|
|
69
|
+
export function quote(text) {
|
|
70
|
+
return neutralize(text.replace(LINE_BREAK, '\n'))
|
|
71
|
+
.split('\n')
|
|
72
|
+
.map((line) => (line.trim() === '' ? '>' : `> ${line}`))
|
|
73
|
+
.join('\n');
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A fenced code block — for verbatim citation entries. Control and format
|
|
77
|
+
* characters are stripped; the fence is one backtick longer than the longest
|
|
78
|
+
* backtick run in the text (minimum three).
|
|
79
|
+
*/
|
|
80
|
+
export function fenced(text, language) {
|
|
81
|
+
const body = text.replace(LINE_BREAK, '\n').replace(STRIPPED, '');
|
|
82
|
+
const longestRun = Math.max(0, ...(body.match(/`+/g) ?? []).map((run) => run.length));
|
|
83
|
+
const fence = '`'.repeat(Math.max(3, longestRun + 1));
|
|
84
|
+
return `${fence}${language}\n${body}\n${fence}`;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* A URL printed as text: control and format characters stripped; `[` `]` `<`
|
|
88
|
+
* `>` `|`, whitespace, and NEL (U+0085, a line break `\s` does not match)
|
|
89
|
+
* percent-encoded.
|
|
90
|
+
*/
|
|
91
|
+
export function printUrl(url) {
|
|
92
|
+
return url.replace(STRIPPED, '').replace(/[[\]<>|\s\u0085]/g, encodeURIComponent);
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* A block marker a markdown line can open with once its indentation is gone: an
|
|
96
|
+
* ATX heading, a bullet, a code fence, or a thematic break or setext underline.
|
|
97
|
+
* A backslash before its first character keeps the line a paragraph.
|
|
98
|
+
*/
|
|
99
|
+
const BLOCK_MARKER = /^(?:#{1,6}(?= |$)|[-+*](?= |$)|`{3}|~{3}|([-*_=])(?: *\1)* *$)/;
|
|
100
|
+
/** An ordered-list marker; its `.` or `)` takes the backslash, since `\1` is no escape. */
|
|
101
|
+
const ORDERED_MARKER = /^(\d{1,9})([.)])(?= |$)/;
|
|
102
|
+
/**
|
|
103
|
+
* Rendered inline text (`inline()` or `printUrl()` output) placed at the start
|
|
104
|
+
* of a line or list item: leading spaces removed, since four would open a code
|
|
105
|
+
* block, and a leading block marker escaped, so upstream text cannot open a
|
|
106
|
+
* heading, list, fence, or rule there. Text inside it is left as it is.
|
|
107
|
+
*/
|
|
108
|
+
export function atLineStart(markdown) {
|
|
109
|
+
const text = markdown.replace(/^ +/, '');
|
|
110
|
+
return BLOCK_MARKER.test(text) ? `\\${text}` : text.replace(ORDERED_MARKER, '$1\\$2');
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"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mcpName": "io.github.cyanheads/cern-inspire-mcp-server",
|
|
5
|
+
"description": "Search INSPIRE-HEP papers, authors, experiments, HEPData records; get citation metrics and BibTeX via MCP. STDIO or Streamable HTTP.",
|
|
6
|
+
"author": "Casey Hand <casey@caseyjhand.com> (https://caseyjhand.com)",
|
|
7
|
+
"funding": [
|
|
8
|
+
{
|
|
9
|
+
"type": "github",
|
|
10
|
+
"url": "https://github.com/sponsors/cyanheads"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"type": "buy_me_a_coffee",
|
|
14
|
+
"url": "https://www.buymeacoffee.com/cyanheads"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"type": "module",
|
|
18
|
+
"main": "dist/index.js",
|
|
19
|
+
"types": "dist/index.d.ts",
|
|
20
|
+
"bin": {
|
|
21
|
+
"cern-inspire-mcp-server": "dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"changelog/",
|
|
25
|
+
"dist/",
|
|
26
|
+
"!dist/*.mcpb",
|
|
27
|
+
"README.md",
|
|
28
|
+
"LICENSE",
|
|
29
|
+
"CLAUDE.md",
|
|
30
|
+
"AGENTS.md",
|
|
31
|
+
"Dockerfile",
|
|
32
|
+
"server.json"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "bun run scripts/build.ts",
|
|
36
|
+
"rebuild": "bun run scripts/clean.ts && bun run scripts/build.ts",
|
|
37
|
+
"clean": "bun run scripts/clean.ts",
|
|
38
|
+
"devcheck": "bun run scripts/devcheck.ts",
|
|
39
|
+
"audit:fix": "bun audit fix",
|
|
40
|
+
"audit:refresh": "rm -f bun.lock && bun install && bun audit",
|
|
41
|
+
"tree": "bun run scripts/tree.ts",
|
|
42
|
+
"list-skills": "bun run scripts/list-skills.ts",
|
|
43
|
+
"format": "biome check --write .",
|
|
44
|
+
"format:unsafe": "biome check --write --unsafe .",
|
|
45
|
+
"lint:mcp": "bun run scripts/lint-mcp.ts",
|
|
46
|
+
"lint:packaging": "bun run scripts/lint-packaging.ts",
|
|
47
|
+
"bundle": "bun run build && npx -y @anthropic-ai/mcpb pack . dist/cern-inspire-mcp-server.mcpb && bun run scripts/clean-mcpb.ts dist/cern-inspire-mcp-server.mcpb",
|
|
48
|
+
"changelog:build": "bun run scripts/build-changelog.ts",
|
|
49
|
+
"changelog:check": "bun run scripts/build-changelog.ts --check",
|
|
50
|
+
"release:github": "bun run scripts/release-github.ts",
|
|
51
|
+
"publish-mcp": "mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish",
|
|
52
|
+
"test": "vitest run",
|
|
53
|
+
"test:coverage": "vitest run --coverage",
|
|
54
|
+
"start": "node dist/index.js",
|
|
55
|
+
"start:stdio": "MCP_TRANSPORT_TYPE=stdio node dist/index.js",
|
|
56
|
+
"start:http": "MCP_TRANSPORT_TYPE=http node dist/index.js"
|
|
57
|
+
},
|
|
58
|
+
"keywords": [
|
|
59
|
+
"mcp",
|
|
60
|
+
"mcp-server",
|
|
61
|
+
"model-context-protocol",
|
|
62
|
+
"typescript",
|
|
63
|
+
"bun",
|
|
64
|
+
"stdio",
|
|
65
|
+
"streamable-http",
|
|
66
|
+
"cern",
|
|
67
|
+
"inspire",
|
|
68
|
+
"inspirehep",
|
|
69
|
+
"hepdata",
|
|
70
|
+
"high-energy-physics",
|
|
71
|
+
"particle-physics",
|
|
72
|
+
"scholarly-literature",
|
|
73
|
+
"citations",
|
|
74
|
+
"bibtex",
|
|
75
|
+
"h-index",
|
|
76
|
+
"arxiv"
|
|
77
|
+
],
|
|
78
|
+
"repository": {
|
|
79
|
+
"type": "git",
|
|
80
|
+
"url": "git+https://github.com/cyanheads/cern-inspire-mcp-server.git"
|
|
81
|
+
},
|
|
82
|
+
"homepage": "https://github.com/cyanheads/cern-inspire-mcp-server#readme",
|
|
83
|
+
"bugs": {
|
|
84
|
+
"url": "https://github.com/cyanheads/cern-inspire-mcp-server/issues"
|
|
85
|
+
},
|
|
86
|
+
"license": "Apache-2.0",
|
|
87
|
+
"packageManager": "bun@1.4.2",
|
|
88
|
+
"engines": {
|
|
89
|
+
"bun": ">=1.4.0",
|
|
90
|
+
"node": ">=24.0.0"
|
|
91
|
+
},
|
|
92
|
+
"publishConfig": {
|
|
93
|
+
"access": "public"
|
|
94
|
+
},
|
|
95
|
+
"dependencies": {
|
|
96
|
+
"@cyanheads/mcp-ts-core": "^0.13.10",
|
|
97
|
+
"pino-pretty": "^13.1.3",
|
|
98
|
+
"zod": "^4.6.5"
|
|
99
|
+
},
|
|
100
|
+
"devDependencies": {
|
|
101
|
+
"@biomejs/biome": "2.5.14",
|
|
102
|
+
"@socketsecurity/bun-security-scanner": "^1.1.3",
|
|
103
|
+
"@types/node": "26.6.3",
|
|
104
|
+
"@vitest/coverage-istanbul": "5.0.2",
|
|
105
|
+
"depcheck": "^1.4.7",
|
|
106
|
+
"fast-check": "^4.10.2",
|
|
107
|
+
"ignore": "^7.0.10",
|
|
108
|
+
"tsc-alias": "^1.9.5",
|
|
109
|
+
"typescript": "^7.0.2",
|
|
110
|
+
"vitest": "^5.0.2"
|
|
111
|
+
}
|
|
112
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.cyanheads/cern-inspire-mcp-server",
|
|
4
|
+
"title": "cern-inspire-mcp-server",
|
|
5
|
+
"description": "Search INSPIRE-HEP papers, authors, experiments, HEPData records; get citation metrics and BibTeX.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"url": "https://github.com/cyanheads/cern-inspire-mcp-server",
|
|
8
|
+
"source": "github"
|
|
9
|
+
},
|
|
10
|
+
"version": "0.1.1",
|
|
11
|
+
"packages": [
|
|
12
|
+
{
|
|
13
|
+
"registryType": "npm",
|
|
14
|
+
"registryBaseUrl": "https://registry.npmjs.org",
|
|
15
|
+
"identifier": "@cyanheads/cern-inspire-mcp-server",
|
|
16
|
+
"runtimeHint": "node",
|
|
17
|
+
"version": "0.1.1",
|
|
18
|
+
"packageArguments": [
|
|
19
|
+
{
|
|
20
|
+
"type": "positional",
|
|
21
|
+
"value": "run"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "positional",
|
|
25
|
+
"value": "start:stdio"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"environmentVariables": [
|
|
29
|
+
{
|
|
30
|
+
"name": "MCP_LOG_LEVEL",
|
|
31
|
+
"description": "Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').",
|
|
32
|
+
"format": "string",
|
|
33
|
+
"isRequired": false,
|
|
34
|
+
"default": "info"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"transport": {
|
|
38
|
+
"type": "stdio"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"registryType": "npm",
|
|
43
|
+
"registryBaseUrl": "https://registry.npmjs.org",
|
|
44
|
+
"identifier": "@cyanheads/cern-inspire-mcp-server",
|
|
45
|
+
"runtimeHint": "node",
|
|
46
|
+
"version": "0.1.1",
|
|
47
|
+
"packageArguments": [
|
|
48
|
+
{
|
|
49
|
+
"type": "positional",
|
|
50
|
+
"value": "run"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "positional",
|
|
54
|
+
"value": "start:http"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"environmentVariables": [
|
|
58
|
+
{
|
|
59
|
+
"name": "MCP_HTTP_HOST",
|
|
60
|
+
"description": "The hostname for the HTTP server.",
|
|
61
|
+
"format": "string",
|
|
62
|
+
"isRequired": false,
|
|
63
|
+
"default": "127.0.0.1"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "MCP_HTTP_PORT",
|
|
67
|
+
"description": "The port to run the HTTP server on.",
|
|
68
|
+
"format": "string",
|
|
69
|
+
"isRequired": false,
|
|
70
|
+
"default": "3010"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"name": "MCP_HTTP_ENDPOINT_PATH",
|
|
74
|
+
"description": "The endpoint path for the MCP server.",
|
|
75
|
+
"format": "string",
|
|
76
|
+
"isRequired": false,
|
|
77
|
+
"default": "/mcp"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "MCP_AUTH_MODE",
|
|
81
|
+
"description": "Authentication mode to use: 'none', 'jwt', or 'oauth'.",
|
|
82
|
+
"format": "string",
|
|
83
|
+
"isRequired": false,
|
|
84
|
+
"default": "none"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "MCP_LOG_LEVEL",
|
|
88
|
+
"description": "Sets the minimum log level for output (e.g., 'debug', 'info', 'warn').",
|
|
89
|
+
"format": "string",
|
|
90
|
+
"isRequired": false,
|
|
91
|
+
"default": "info"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"transport": {
|
|
95
|
+
"type": "streamable-http",
|
|
96
|
+
"url": "http://localhost:3010/mcp"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
}
|