Conversation
Claude Code MCP Limitations (as of April 2026)While testing the bleep MCP server with Claude Code, we hit several gaps in Claude Code's MCP client implementation. Documenting here for context on the 1. No MCP Task-Augmented Execution (SEP-1686)Claude Code calls MCP tools synchronously only. The task protocol (async task IDs, background execution, progress streaming) is not supported — even though the MCP TypeScript SDK bundled inside Claude Code already has the implementation ( Tools marked Tracking: anthropics/claude-code#18617 (open, no assignee, marked stale) 2. No Progress or Log Notifications
3. No MCP Resource SubscriptionsClaude Code can read resources via Tracking: anthropics/claude-code#7252 (closed/stale, still requested by users) 4. No
|
Replace ch.linkyard.mcp (mcp-server + jsonrpc2-stdio) with com.github.ingarabr.mcp::server:0.2.0 (scala-mcp-sdk). Key changes: - Restructure from class inheritance to factory pattern (McpServer.apply) - Use InputDef.raw with case classes for tool input schemas - Add TaskMode.AsyncOnly for long-running tools (compile, test, etc.) - Replace watch/sync/watchStop tools with subscribable resources: - bleep://build/bleep.yaml (notifies on build config changes) - bleep://watch (notifies on source file changes) - File watchers bridged to fs2 streams via Queue - Add instructions parameter for server-level LLM guidance - Add tasksEnabled=true for async task support - All tool annotations preserved (descriptions, hints, openWorldHint) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Clients like Claude Code don't support MCP task-augmented execution yet, so AsyncOnly tools fail with an error. AsyncAllowed lets sync clients call them directly while preserving async task support for capable clients. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrate MCP server from ch.linkyard.mcp to scala-mcp-sdk
Replaces the MCP protocol library with scala-mcp-sdk (
com.github.ingarabr.mcp::server:0.2.0), adopting its async task model and resource subscription features.Dependency change
Architecture changes
Server structure: Replaced class inheritance (
class BleepMcpServer extends McpServer[IO]withinitialize()returning aSession) with a factory pattern (object BleepMcpServer.create(): Resource[IO, McpServer[IO]]). Shared state extracted into aToolStatecase class.Async tasks: Long-running tools (compile, test, sourcegen, fmt, clean, run) use
TaskMode.AsyncOnly. The client receives a task ID immediately and gets progress updates viactx.reportProgress()andctx.log(). The SDK manages the fiber — no manual fiber spawning.Watch → resource: The
bleep.watchtool (infinite compile/test loop) is replaced with two subscribable MCP resources:bleep://build/bleep.yaml— notifies subscribers when the build config changes and is reloadedbleep://watch— notifies subscribers when source files changeThe client orchestrates: subscribe to
bleep://watch, receive notification, callbleep.compileorbleep.test. This separates observation from action and gives the client control.File watcher bridging: Callback-based
BleepFileWatchingwatchers are bridged to fs2 streams viaQueue[IO, Unit]. Watchers run on daemon threads, cleaned up viaResource.make.Tool input schemas
Replaced
com.melvinlow.json.schema.JsonSchemaEncoder+ hand-crafted JSON withInputDef.rawfrom the SDK. Case classes with strict circe Decoders are preserved (reject unknown fields, fail on wrong types). Named tuples (InputDef[NamedTuple]) would be ideal but require-source 3.5+and the project uses-source 3.4.Tools
bleep.compilebleep.testbleep.sourcegenbleep.fmtbleep.cleanbleep.runbleep.test.suitesbleep.statusbleep.build.effectivebleep.build.resolvedbleep.projectsbleep.programsbleep.scriptsbleep.restartbleep.watchbleep.watch.stopbleep.syncNew SDK features used
McpServer.apply()withtasksEnabled = trueandinstructionsparameterToolDef.unstructuredwithTaskModefor async executionResourceDefwithupdates: fs2.Stream[F, Unit]for subscribable resourcesToolAnnotationswithreadOnlyHint,destructiveHint,openWorldHintInputDef.rawfor case class input schemasToolContextfor logging (ctx.log) and progress (ctx.reportProgress)Temporary workarounds
InputSchema[Unit]given for no-argument tools (will be provided by SDK in next release)_root_.mcp.protocol/_root_.mcp.serverimports needed becausebleep.mcppackage shadowsmcpWhat's preserved
Test plan
bleep compile bleep-clipassesnpx @anthropic/mcp-inspector).mcp.json🤖 Generated with Claude Code