Skip to content

Commit 501b28e

Browse files
committed
Finalize MCP Server Config Refactoring #7598
1 parent d2978e7 commit 501b28e

22 files changed

Lines changed: 340 additions & 287 deletions
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: "Finalize MCP Server Config Refactoring"
3+
labels: enhancement, refactoring, AI
4+
---
5+
6+
GH ticket id: #7598
7+
8+
**Epic:** #7590
9+
**Assignee:** tobiu
10+
**Status:** Done
11+
12+
## Description
13+
14+
This ticket tracks the final steps of the MCP server configuration refactoring. The monolithic `ai/mcp/server/config.mjs` has been split into three new, server-specific configuration files:
15+
16+
- `ai/mcp/server/github-workflow/config.mjs`
17+
- `ai/mcp/server/knowledge-base/config.mjs`
18+
- `ai/mcp/server/memory-core/config.mjs`
19+
20+
This task is to update all server-side modules to import from their respective new config files and then to remove the old, monolithic config.
21+
22+
## Acceptance Criteria
23+
24+
1. All modules within `ai/mcp/server/github-workflow/` that previously imported `../../config.mjs` are updated to import `./config.mjs`.
25+
2. All modules within `ai/mcp/server/knowledge-base/` that previously imported `../../config.mjs` are updated to import `./config.mjs`.
26+
3. All modules within `ai/mcp/server/memory-core/` that previously imported `../../config.mjs` are updated to import `./config.mjs`.
27+
4. The old `ai/mcp/server/config.mjs` file is deleted.

ai/mcp/server/config.mjs

Lines changed: 0 additions & 232 deletions
This file was deleted.
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
import path from 'path';
2+
3+
const config = {
4+
/**
5+
* Global debug flag for all MCP servers.
6+
* @type {boolean}
7+
*/
8+
debug: false,
9+
/**
10+
* A dummy embedding function to satisfy the ChromaDB API when embeddings are provided manually.
11+
* @returns {null}
12+
*/
13+
dummyEmbeddingFunction: {
14+
generate: () => null
15+
},
16+
/**
17+
* Cache duration for healthy health checks (in milliseconds).
18+
* Unhealthy results are never cached.
19+
* @type {number}
20+
*/
21+
healthCheckCacheDuration: 5 * 60 * 1000, // 5 minutes
22+
/**
23+
* The minimum required version of the GitHub CLI (`gh`).
24+
* @type {string}
25+
*/
26+
minGhVersion: '2.0.0',
27+
/**
28+
* The owner of the GitHub repository.
29+
* @type {string}
30+
*/
31+
owner: 'neomjs',
32+
/**
33+
* The name of the GitHub repository.
34+
* @type {string}
35+
*/
36+
repo: 'neo',
37+
/**
38+
* Configuration for the issue synchronization service.
39+
*/
40+
issueSync: {
41+
/**
42+
* The path to the directory for active issues.
43+
* @type {string}
44+
*/
45+
issuesDir: path.resolve(process.cwd(), '.github', 'ISSUES'),
46+
/**
47+
* The path to the directory for archived issues.
48+
* @type {string}
49+
*/
50+
archiveDir: path.resolve(process.cwd(), '.github', 'ISSUE_ARCHIVE'),
51+
/**
52+
* The path to the synchronization metadata file.
53+
* @type {string}
54+
*/
55+
metadataFile: path.resolve(process.cwd(), '.github', '.sync-metadata.json'),
56+
/**
57+
* Labels that, when present on an issue, will cause it to be ignored and deleted locally.
58+
* @type {string[]}
59+
*/
60+
droppedLabels: ['dropped', 'wontfix', 'duplicate'],
61+
/**
62+
* The date from which to start synchronizing issues and releases.
63+
* @type {string}
64+
*/
65+
syncStartDate: '2025-06-15T00:00:00Z',
66+
/**
67+
* The path to the directory for release notes.
68+
* @type {string}
69+
*/
70+
releaseNotesDir: path.resolve(process.cwd(), '.github', 'RELEASE_NOTES'),
71+
/**
72+
* The default version directory to use for archiving issues when no release is found.
73+
* @type {string}
74+
*/
75+
defaultArchiveVersion: 'unversioned',
76+
/**
77+
* A prefix for issue filenames to prevent them from starting with a number (e.g., 'issue-').
78+
* @type {string}
79+
*/
80+
issueFilenamePrefix: 'issue-',
81+
/**
82+
* The maximum number of issues to fetch from the GitHub API in a single sync.
83+
* @type {number}
84+
*/
85+
maxIssues: 10000,
86+
/**
87+
* The maximum number of releases to fetch from the GitHub API.
88+
* @type {number}
89+
*/
90+
maxReleases: 1000,
91+
/**
92+
* The maximum buffer size for the `gh` CLI command output.
93+
* @type {number}
94+
*/
95+
maxGhOutputBuffer: 10 * 1024 * 1024, // 10 MB
96+
/**
97+
* The markdown delimiter used to separate the issue body from the comments section.
98+
* @type {string}
99+
*/
100+
commentSectionDelimiter: '## Comments',
101+
/**
102+
* Maximum number of labels to fetch per issue in GraphQL queries.
103+
* @type {number}
104+
*/
105+
maxLabelsPerIssue: 20,
106+
107+
/**
108+
* Maximum number of assignees to fetch per issue in GraphQL queries.
109+
* @type {number}
110+
*/
111+
maxAssigneesPerIssue: 10,
112+
113+
/**
114+
* Maximum number of comments to fetch per issue in GraphQL queries.
115+
* @type {number}
116+
*/
117+
maxCommentsPerIssue: 100,
118+
119+
/**
120+
* Maximum number of sub-issues to fetch per issue in GraphQL queries.
121+
* @type {number}
122+
*/
123+
maxSubIssuesPerIssue: 50
124+
}
125+
};
126+
127+
export default config;

0 commit comments

Comments
 (0)