Skip to main content
Glama
README.md
# sidecar

An MCP server that plugs real tools into any AI agent: your flight log, your job board, and your launch watch, served over the Model Context Protocol on stdio. Zero dependencies, zero API keys, protocol implemented from scratch.

## What it does

Most MCP servers in the wild are thin wrappers around one SaaS API. This one is the opposite: a small server that gives a model tools over the user's own real data, using the actual MCP wire protocol, implemented by hand in about 400 lines of Node.

- **3 tools** a model can call:
  - `karman_flights`: query the karman.day daily flight log (miles, legs hit, summary stats). Filter by minimum miles, by flights above the 62 mi Karman line, or sort best-first.
  - `job_board_search`: search the FDE and product/strategy job board by status (submitted, active, rejected, closed, blocked), lane, or company name, with salary ranges and notes.
  - `launch_watch`: next SpaceX launches. Tries the public SpaceX API first (no key needed) and falls back to a dated fixture snapshot when the network is unavailable. `source=live` fails loudly instead of falling back.
- **3 resources** a model can read in one call: `karman://flights/log`, `jobs://board/summary`, `launches://spacex/next`.
- **1 prompt template**: `daily-briefing` bundles the latest flight, the active job loops, and the next launch into one short morning briefing, with an optional focus on one surface.

## Why it matters

Forward deployed engineering is, in practice, this job: take a system a customer already runs, give a model safe, typed access to its real data, and make the behavior observable and testable. That is exactly what this project is. The protocol layer is implemented from the spec, not from an SDK, so the handshake, the JSON-RPC error codes, the notification rules, and the tool-error convention (an `isError` result, not a crash) are all visible in the code and covered by tests. The demo client is a second implementation of the same protocol from the other side, which is how you know the server is correct: two independent implementations agreeing on the wire.

## How it works

- **Transport**: newline-delimited JSON over stdio. One JSON object per line on stdin, one per line on stdout. Nothing else is ever written to stdout, so a client can parse every line. Diagnostics go to stderr.
- **Handshake** (MCP 2025-03-26): `initialize` returns the protocol version, capabilities, and server info; the client answers with `notifications/initialized`. Then `ping`, `tools/list`, `tools/call`, `resources/list`, `resources/read`, `prompts/list`, `prompts/get`.
- **Errors**: malformed JSON gets -32700, a bad request shape gets -32600, an unknown method gets -32601, an unknown tool, resource, or prompt (or a bad argument) gets -32602. A tool that fails at runtime returns a normal result with `isError: true`, per the MCP spec, so one bad call never kills the session.
- **Validation**: each tool has a JSON Schema `inputSchema` (what MCP clients show the model) and a strict hand-rolled validator: unknown keys, wrong types, out-of-range numbers, and values outside an enum all fail with a message naming the argument.
- **Data**: JSON snapshots in `src/data/`, all dated. Flights and jobs are real snapshots from 2026-11-12; launches were checked against public schedules the same day and are labeled as a snapshot, because launch times move.

## Run it

Requires Node 18 or newer. Zero dependencies, nothing to install.

```bash
./demo.sh        # runs the tests, then drives the server over stdio
npm test         # tests only
node bin/demo.mjs  # demo only: handshake, every tool, one resource, the prompt
node src/server.mjs  # run the server directly (speaks JSON-RPC on stdio)
```

The demo prints the full protocol transcript as it goes and ends with a PASS/FAIL summary. It exits non-zero if any check fails.

## Connect from Claude Desktop

Add this to `claude_desktop_config.json`, replacing `<path>` with the absolute path to this folder:

```json
{
  "mcpServers": {
    "sidecar": {
      "command": "node",
      "args": ["<path>/src/server.mjs"]
    }
  }
}
```

Any MCP client works the same way: spawn `node src/server.mjs` and speak JSON-RPC on its stdin. `web/index.html` is a visual catalog of the tools with a sample exchange.

## Project layout

```text
src/server.mjs        entry point: wires the dispatcher to stdio
src/protocol.mjs      JSON-RPC 2.0 framing, MCP handshake and routing
src/tools.mjs         the three tools, argument validation, live/fixture launches
src/resources.mjs     the three readable resources
src/prompts.mjs       the daily-briefing prompt template
src/data/             dated JSON snapshots (flights, jobs, launches)
bin/demo.mjs          a minimal MCP client that tests the real server
tests/                protocol tests (framing, handshake, errors, stdio spawn)
                      and tool tests (filtering, validation, briefing)
web/index.html        tool catalog and sample exchange
```

## What a recruiter should notice

This is a protocol implementation, not a wrapper: the MCP handshake and JSON-RPC error handling are written from the spec and proven by a second, independent client implementation in the demo. The tools are typed, validated, and honest about their data: live sources are tried first, fixtures are dated and labeled, and failures surface as structured `isError` results instead of crashes. It is the shape of real deployment work, a model given safe access to a user's own systems, with the seams (validation, fallbacks, error codes) built in rather than bolted on.

TDQS

A3.6/5.0

Scored across 3 tools

Disambiguation5/5

The three tools cover entirely separate domains—a flight log, SpaceX launches, and a job board—with no overlap in resource or action. An agent can pick the right tool from the name alone, and the descriptions reinforce the boundaries with distinct filters and parameters.

Naming Consistency3/5

All names use snake_case, so the character-level style is consistent, but the semantic patterns differ: karman_flights is a noun phrase, launch_watch is noun+verb, and job_board_search ends in a verb. This is a mixed convention that remains readable but is not predictable.

Tool Count3/5

Three tools is thin for an aggregator-style server, though each is well-scoped and clearly earns its place. The count feels minimal bordering on under-provisioned rather than excessive.

Completeness3/5

The surface is read-only: there is no way to log a flight to the karman log, nor to submit or update an application status on the job board, despite status being a first-class filter. If the server is intended purely as a read-side query layer these gaps are acceptable, but as a standalone toolset there are notable missing write operations.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues