Skip to content

Commit 3153d15

Browse files
committed
fix: Remove console logging
Removed leftover console logging (server wouldn't work in some MCP clients)
1 parent 6111cdc commit 3153d15

3 files changed

Lines changed: 0 additions & 11 deletions

File tree

src/cache.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ export async function updateDocs(repoOwner: string = "MCDxAI", repoName: string
4040
const url = `https://github.com/${repoOwner}/${repoName}/archive/refs/heads/${branch}.zip`;
4141
const zipPath = path.join(cacheDir, 'docs.zip');
4242

43-
console.error(`Downloading docs from ${url} to ${zipPath}...`);
44-
4543
try {
4644
const response = await axios({
4745
method: 'get',
@@ -50,9 +48,6 @@ export async function updateDocs(repoOwner: string = "MCDxAI", repoName: string
5048
});
5149

5250
fs.writeFileSync(zipPath, response.data);
53-
console.error('Download complete.');
54-
55-
console.error('Extracting...');
5651
const zip = new AdmZip(zipPath);
5752
// The zip will contain a root folder like "baritone-docs-mcp-docs", we want to extract that
5853

@@ -108,10 +103,8 @@ export async function updateDocs(repoOwner: string = "MCDxAI", repoName: string
108103

109104
// Cleanup zip
110105
fs.unlinkSync(zipPath);
111-
console.error('Docs updated successfully.');
112106

113107
} catch (error: any) {
114-
console.error(`Failed to update docs: ${error.message}`);
115108
throw new DownloadError(`Failed to download or extract docs: ${error.message}`);
116109
}
117110
}
@@ -127,7 +120,6 @@ export function initLocalDocs(localDocsPath: string): void {
127120
return; // Already exists
128121
}
129122

130-
console.error(`Initializing docs from local path: ${localDocsPath}`);
131123
// Simple recursive copy
132124
fs.cpSync(localDocsPath, targetDir, { recursive: true });
133125
}

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ export async function main() {
138138

139139
const transport = new StdioServerTransport();
140140
await server.connect(transport);
141-
console.error("Baritone Docs MCP Server running on stdio");
142141
}
143142

144143
// Only run main if executed directly (ESM entry point check)
@@ -147,7 +146,6 @@ const isMainModule = import.meta.url === `file://${process.argv[1]}` ||
147146

148147
if (isMainModule) {
149148
main().catch((error) => {
150-
console.error("Fatal error in main():", error);
151149
process.exit(1);
152150
});
153151
}

tests/integration.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ describe('Baritone Docs MCP Integration', () => {
1919
});
2020

2121
it('should download and cache documentation correctly', async () => {
22-
console.log('Downloading docs from GitHub...');
2322
await updateDocs("MCDxAI", "baritone-docs-mcp", "docs");
2423
expect(ensureDocs()).toBe(true);
2524
const docsDir = getDocsDir();

0 commit comments

Comments
 (0)