fix(mcp): Remove logs interfering with the stdio transport (#429)

This commit is contained in:
Brendan Kellam 2025-08-04 16:12:10 -07:00 committed by GitHub
parent b46fb53954
commit 821c6ba895
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 4 deletions

View file

@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Fixed
- Fixed issue where console logs were resulting in "unexpected token" errors on the MCP client. [#429](https://github.com/sourcebot-dev/sourcebot/pull/429)
## [1.0.3] - 2025-06-18
### Changed

View file

@ -4,7 +4,6 @@ import { FileSourceRequest, FileSourceResponse, ListRepositoriesResponse, Search
import { isServiceError } from './utils.js';
export const search = async (request: SearchRequest): Promise<SearchResponse | ServiceError> => {
console.debug(`Executing search request: ${JSON.stringify(request, null, 2)}`);
const result = await fetch(`${env.SOURCEBOT_HOST}/api/search`, {
method: 'POST',
headers: {

View file

@ -75,8 +75,6 @@ server.tool(
query += ` case:no`;
}
console.debug(`Executing search request: ${query}`);
const response = await search({
query,
matches: env.DEFAULT_MATCHES,
@ -214,7 +212,6 @@ server.tool(
const runServer = async () => {
const transport = new StdioServerTransport();
await server.connect(transport);
console.info('Sourcebot MCP server ready');
}
runServer().catch((error) => {