Senior Ruby Engineer — Port Our Open-Source MCP Analytics SDK (TypeScript → Ruby)

Posted 6 days ago

Worldwide

Summary

AgentCat is an analytics and observability platform for MCP (Model Context Protocol) servers. Our TypeScript SDK is open source under MIT: one line of code gives server owners agent session replay, user-intent capture, and telemetry forwarding to OpenTelemetry, Datadog, Sentry and PostHog. We now need the Ruby equivalent, built by someone who will still be maintaining it a year from now. == THE WORK == Port our TypeScript SDK to Ruby at full feature parity. The reference is public — github.com/agentcathq/agentcat-typescript-sdk — roughly 7,300 lines across 40 files plus 77 test files. Read it, understand WHY each piece behaves as it does, and rebuild it idiomatically in Ruby. This is not a line-by-line transliteration. Target: the official MCP Ruby SDK (modelcontextprotocol/ruby-sdk, the "mcp" gem), framework-agnostic, Ruby 2.7+ to match that gem's floor. It must serve plain Ruby, Rails, Sinatra and Hanami consumers, including the SDK's Rack and Rails paths, without imposing a framework dependency. == SCOPE (full parity) == - track() entry point that attaches to a server instance and wraps registered tool handlers - JSON Schema injection of session_id, agent_id and context parameters into existing tool input schemas, stripped from arguments before the customer's own handler runs - Explicit handles per MCP SEP-2567: KSUID-based session IDs, deterministic derivation, rejection of any ID we did not issue, and "mint-back" of issued IDs via structuredContent._mcp_instructions and a trailing text block - get_more_tools, a tool that captures functionality agents looked for but could not find - Hooks: identify, resolve_session_id, redact_sensitive_information, redact_event, event_tags, event_properties - Redaction, sanitization and truncation: depth 10, breadth 100, 32KB strings, 100KB events, shrinking progressively rather than dropping - Background event queue: bounded, max 5 concurrent requests, exponential backoff, graceful drain on shutdown - Exporters: OpenTelemetry (OTLP), Datadog, Sentry, PostHog, with trace-context propagation - Opt-out SDK diagnostics and local file logging == THE RUBY-SPECIFIC PART == The background queue is the hardest piece here, and we weigh proposals on how you discuss it: - Forking servers. Puma cluster mode, Unicorn and Passenger fork workers, and threads do not survive a fork. The queue must notice and recover, not silently stop delivering. - The GVL. Publishing must never contend with a request thread doing real work. - Shutdown. Buffered events drain within a bounded timeout, never hanging the host process. - The 2.7 floor. Disciplined keyword-argument handling, no modern syntax, proven by CI rather than assumed. == THE ONE NON-NEGOTIABLE PROPERTY == The SDK must never break or slow the host server. Hooks run concurrently with the tool handler and add no latency. A slow hook, a raised exception, an unreachable API — each may cost us analytics data, never the customer's tool call. Customers put this gem in production on one line of trust. Fault containment is the feature. == ACCEPTANCE CRITERIA (definition of done) == 1. track() attaches cleanly to a server instance from the official mcp gem and returns the tracked instance. 2. Injected parameters appear in tools/list and are stripped before the customer handler runs; a handler seeing an unexpected session_id is a failing test. 3. Session lifecycle end to end: minted on first call, echoed on later calls, and an ID we never issued is rejected with a re-issue instruction, never adopted. 4. Fault-injection tests prove containment: API unreachable, hooks raising, queue saturated — tool calls still return correct results with no added latency. 5. A fork-safety test proves events published from a forked Puma cluster worker still arrive. 6. Truncation and redaction match documented limits, verified by tests derived from the TS suite. 7. All four exporters verified against a local collector or vendor sandbox, not just unit-mocked. 8. CI green across Ruby 2.7 through current, proving the stated floor. 9. Ships as a gem on RubyGems.org under our organization, MIT licensed in a repo we own, with no runtime dependency on Rails. 10. README and API docs sufficient to integrate without reading the source. == AFTER THIS CONTRACT == This posting is scoped as the port, but we intend to transition the right person into a long-term engagement: maintaining the Ruby SDK, tracking MCP spec changes, and keeping parity as the TypeScript SDK evolves. The spec moves fast — the stateless 2026-07-28 update rewrote how sessions work and forced a major version of our TS SDK. There is durable ownership here for the right person. == APPLY IF == You have designed public Ruby gems that others consume, and think carefully about API surface, backward compatibility and dependency footprint. Experience with MCP, JSON-RPC internals, Rack middleware or OpenTelemetry instrumentation is a plus. Open-source maintainership is the strongest signal for us.

  • More than 30 hrs/week
    Hourly
  • 3-6 months
    Duration
  • Expert
    Experience Level
  • $60.00

    -

    $90.00

    Hourly
  • Remote Job
Skills and Expertise
Mandatory skills
Ruby
Ruby on Rails
JSON
Activity on this job
  • Proposals:20 to 50
  • Last viewed by client:yesterday
  • Interviewing:
    1
  • Invites sent:
    3
  • Unanswered invites:
    1
About the client
Member since Feb 23, 2025
  • United States
    Berkeley10:47 PM
  • $287 total spent
    3 hires, 0 active
  • 7 hours

Explore similar jobs on Upwork

JavaScript
Node.js
PHP
Web Application
AI App Development
DevOps
API
Git
MySQL
Cs2 Gambling SiteFixed-price‐ Posted 4 weeks ago
Gambling
Unity
Counter Strike
AR & VR
Online Gambling Website
Card Game
Board Game
Unreal Engine
MetaMask
Mystery Box
iGaming
WebGL
Game Development
Gaming
Multiplayer
Game UI/UX Design
UI/UX Prototyping
Steam API
AI Development
PixiJS

How it works

  • Post a job icon
    Create your free profile
    Highlight your skills and experience, show your portfolio, and set your ideal pay rate.
  • Talent comes to you icon
    Work the way you want
    Apply for jobs, create easy-to-by projects, or access exclusive opportunities that come to you.
  • Payment simplified icon
    Get paid securely
    From contract to payment, we help you work safely and get paid securely.
Want to get started? Create a profile

About Upwork

  • Rating is 4.9 out of 5.
    4.9/5
    (Average rating of clients by professionals)
  • G2 2021
    #1 freelance platform
  • 49,000+
    Signed contract every week
  • $2.3B
    Freelancers earned on Upwork in 2020

Find the best freelance jobs

Growing your career is as easy as creating a free profile and finding work like this that fits your skills.

Trusted by

  • Microsoft Logo
  • Airbnb Logo
  • Bissell Logo
  • GoDaddy Logo