Claude Bridge

v1.3.0
io.github.constripacity/claude-code-bridge Checked 17 hours ago Published 3 months ago

Durable local-first MCP relay for independent coding agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

bridge_send

Publish a durable message. Use content for legacy text/JSON, or message for the versioned structured envelope. Supply idempotency_key when a retry must not create a duplicate.

ParameterTypeDescription
channel *string
sender *string
contentstringLegacy text or JSON
idempotency_keystring
messageobjectStructured protocol-v1 envelope

bridge_receive

Read durable messages. Pass since_id for an explicit cursor or consumer_id to resume from that consumer's last acknowledged message.

ParameterTypeDescription
channel *string
consumer_idstring
limitinteger
since_idstring

bridge_wait

Wait efficiently for new messages after since_id or a durable consumer cursor. Use this instead of repeated polling; timeout is capped at 55 seconds.

ParameterTypeDescription
channel *string
consumer_idstring
limitinteger
since_idstring
timeout_secondsnumber

bridge_ack

Acknowledge a message for a named consumer. The durable cursor advances monotonically and is scoped to this channel.

ParameterTypeDescription
channel *string
consumer_id *string
message_id *string
metadataobject

bridge_channels

List all active channels and their message counts.

bridge_ping

Check if the bridge server is alive and get a status summary.

bridge_clear

Clear all messages from a specific channel. Useful for resetting state.

ParameterTypeDescription
channel *string

bridge_status

Get the last N messages from ALL channels at once. Useful for getting a full picture of what's happening across agents.

ParameterTypeDescription
per_channelintegerHow many recent messages to show per channel (default: 5)

bridge_enqueue

Add a task to a channel's work queue for a worker to claim. Give payload (structured JSON) or content (a string). Pass idempotency_key so a retried enqueue does not create a duplicate.

ParameterTypeDescription
channel *string
contentstringString task payload
delay_secondsintegerDelay before the task becomes claimable
enqueued_bystring
idempotency_keystring
max_attemptsinteger
payloadStructured JSON task payload
priorityintegerHigher priority is claimed sooner

bridge_claim

Atomically claim the next task from a channel's queue — no two workers ever get the same task. The claim holds a lease for lease_seconds; complete or fail it before the lease expires or it is requeued to another worker. Set wait_seconds to long-poll.

ParameterTypeDescription
channel *string
consumer *string
lease_secondsinteger
wait_secondsnumber

bridge_complete

Mark a claimed task completed. Requires the lease_token returned by bridge_claim; a task whose lease expired and was reclaimed cannot be completed by the previous holder.

ParameterTypeDescription
channel *string
lease_token *string
task_id *string
resultOptional structured JSON result

bridge_fail

Mark a claimed task failed. By default it is requeued (after retry_delay_seconds) until max_attempts is exhausted, then dead-lettered; set requeue=false to dead-letter immediately. Requires the lease_token from bridge_claim.

ParameterTypeDescription
channel *string
lease_token *string
task_id *string
errorstringOptional failure detail
requeueboolean
retry_delay_secondsinteger

bridge_tasks

Inspect a channel's task queue: per-status counts plus a recent task list. Read-only.

ParameterTypeDescription
channel *string
limitinteger
statusstring