# From HTTP MCP to stdio: Lessons Connecting an AI Agent to a Desktop IDE

DevFeed: [From HTTP MCP to stdio: Lessons Connecting an AI Agent to a Desktop IDE](<https://devfeed.tech/articles/from-http-mcp-to-stdio-lessons-connecting-an-ai-agent-to-a-desktop-ide-25420.md>)

Original publisher: [Read original article](<https://jonnyzzz.com/blog/2026/05/20/http-mcp-to-stdio-lessons/>)

Author: Eugene Petrenko

Published: 2026-05-20T00:00:00Z

Content type: article

Language: en

Sources: [Eugene Petrenko](<https://devfeed.tech/sources/eugene-petrenko.md>)

Topics: [Model Context Protocol](<https://devfeed.tech/topics/model-context-protocol.md>), [IntelliJ IDEA](<https://devfeed.tech/topics/intellij-idea.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Cross-origin resource sharing (CORS)](<https://devfeed.tech/topics/cors.md>)

Tags: [agentic-coding](<https://devfeed.tech/tags/agentic-coding.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [ai-coding](<https://devfeed.tech/tags/ai-coding.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [claude](<https://devfeed.tech/tags/claude.md>), [cli](<https://devfeed.tech/tags/cli.md>), [codex](<https://devfeed.tech/tags/codex.md>), [devrig](<https://devfeed.tech/tags/devrig.md>), [docker-image](<https://devfeed.tech/tags/docker-image.md>), [eugene-petrenko](<https://devfeed.tech/tags/eugene-petrenko.md>), [integration-test](<https://devfeed.tech/tags/integration-test.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [jonnyzzz](<https://devfeed.tech/tags/jonnyzzz.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [mcp](<https://devfeed.tech/tags/mcp.md>), [mcp-steroid](<https://devfeed.tech/tags/mcp-steroid.md>), [report](<https://devfeed.tech/tags/report.md>), [tag-41199d53f463](<https://devfeed.tech/tags/tag-41199d53f463.md>)

## AI overview

This article explains why an HTTP MCP server embedded in a desktop IntelliJ application proved unreliable on real workstations. It describes moving to stdio with a CLI coordinator called devrig, and emphasizes integration tests for the MCP layer, including issues involving dynamic ports, startup ordering, multiple IDEs, and mismatched transport support.

## Source excerpt

The obvious way to connect an AI Agent to a running IntelliJ is an HTTP MCP server inside the IDE. I built it, shipped it, and used it daily -- and it kept breaking on real workstations: dynamic ports, start-order lottery, multiple IDEs, and the agent-up/IDE-down dead end. Here is why I moved the whole thing to stdio and a CLI coordinator called devrig, and what the journey taught me.