Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ As of version `0.48.0`, Cursor supports unauthed SSE servers directly. If your M

[Official Docs](https://docs.codeium.com/windsurf/mcp). The configuration file is located at `~/.codeium/windsurf/mcp_config.json`.

### JetBrains IntelliJ

IntelliJ supports MCP servers however, you must disable logging (which this package does by default to STDERR). Do this
by adding the `--no-log` argument.


## Building Remote MCP Servers

For instructions on building & deploying remote MCP servers, including acting as a valid OAuth client, see the following resources:
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ async function runClient(
}

// Parse command-line arguments and run the client
parseCommandLineArgs(process.argv.slice(2), 'Usage: npx tsx client.ts <https://server-url> [callback-port] [--debug]')
parseCommandLineArgs(process.argv.slice(2), 'Usage: npx tsx client.ts <https://server-url> [callback-port] [--debug] [--no-log]')
.then(({ serverUrl, callbackPort, headers, transportStrategy, host, staticOAuthClientMetadata, staticOAuthClientInfo }) => {
return runClient(serverUrl, callbackPort, headers, transportStrategy, host, staticOAuthClientMetadata, staticOAuthClientInfo)
})
Expand Down
7 changes: 7 additions & 0 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ const pid = process.pid
// Global debug flag
export let DEBUG = false

// Global no-log flag
export let NO_LOG = false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be better to rename this to NO_STDERR_LOG (and the corresponding cli arg to --no-stderr-log) to be more explicit and clear.


// Helper function for timestamp formatting
function getTimestamp(): string {
const now = new Date()
Expand Down Expand Up @@ -71,6 +74,10 @@ export function debugLog(message: string, ...args: any[]) {
}

export function log(str: string, ...rest: unknown[]) {
if(NO_LOG) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this control just the console.error below so that the DEBUG log functionality is preserved?
Actually nm, I notice that debugLog has some console.error as well ..

Suggested change
if(NO_LOG) {
if(!NO_LOG) {
console.error

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benconda But this also brings in a bigger question - wouldn't this result in valid error logs from server being lost? How would the remote server communicate error msgs as per the protocol and how does mcp-remote handle it currently?

return
}

// Using stderr so that it doesn't interfere with stdout
console.error(`[${pid}] ${str}`, ...rest)

Expand Down
Loading