Skip to content

Commit 821c6ba

Browse files
fix(mcp): Remove logs interfering with the stdio transport (#429)
1 parent b46fb53 commit 821c6ba

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

packages/mcp/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Fixed issue where console logs were resulting in "unexpected token" errors on the MCP client. [#429](https://github.com/sourcebot-dev/sourcebot/pull/429)
12+
1013
## [1.0.3] - 2025-06-18
1114

1215
### Changed

packages/mcp/src/client.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { FileSourceRequest, FileSourceResponse, ListRepositoriesResponse, Search
44
import { isServiceError } from './utils.js';
55

66
export const search = async (request: SearchRequest): Promise<SearchResponse | ServiceError> => {
7-
console.debug(`Executing search request: ${JSON.stringify(request, null, 2)}`);
87
const result = await fetch(`${env.SOURCEBOT_HOST}/api/search`, {
98
method: 'POST',
109
headers: {

packages/mcp/src/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ server.tool(
7575
query += ` case:no`;
7676
}
7777

78-
console.debug(`Executing search request: ${query}`);
79-
8078
const response = await search({
8179
query,
8280
matches: env.DEFAULT_MATCHES,
@@ -214,7 +212,6 @@ server.tool(
214212
const runServer = async () => {
215213
const transport = new StdioServerTransport();
216214
await server.connect(transport);
217-
console.info('Sourcebot MCP server ready');
218215
}
219216

220217
runServer().catch((error) => {

0 commit comments

Comments
 (0)