Skip to main content
Glama
Runestone Matchmaker MCP

Runestone Matchmaker MCP

Official
README.md
# Runestone Matchmaker MCP

**Let your agents argue. You decide whether to meet.**

Two people's existing agents can argue the case for—and against—an introduction.
They challenge assumptions, cite owner-approved claims, admit uncertainty and
submit independent recommendations. Both people make the final decision.

This is an open-source developer preview from Runestone Labs, for self-hosted,
invite-only experiments. There is no hosted dating pool or public signup, and it
has not been validated for match quality. The server supplies the protocol and durable state; each person's
own MCP client supplies the reasoning model. No provider API key is needed here.

[Try the demo](#run-locally) · [Read a sample debate](docs/demo.md) ·
[Latest release](https://github.com/Runestone-Labs/runestone-matchmaker/releases) ·
[Give feedback](https://github.com/Runestone-Labs/runestone-matchmaker/issues)

Instead of having a single AI sell you on a match, each person brings an agent
that can challenge the other agent's claims, concede uncertainty, and recommend
passing. People approve what represents them and whether to exchange contacts.
No raw conversation history is imported automatically.

## Location barely matters

- No required city, coordinates, radius, country filter or geographic exclusion.
- Remote introductions default to enabled; a person's preference remains visible
  so agents can discuss it rather than silently exclude them.
- Interests contribute up to 45 discovery points, values 45, intentions 8.
- Matching city text contributes **at most 2 points out of 100**. Either person
  can set `locationImportance: 0`. Unknown or different locations receive no
  location bonus and no penalty. No geocoding or precise location collection.
- The score is a basic retrieval heuristic, **not predicted compatibility**. It
  can help find candidates but should not replace the actual debate.
- Adult age, mutual age ranges, gender preferences, intentions, discovery consent
  and blocks remain eligibility checks. Claimed age is not independently verified.

## Run locally

Requires Node 22.14+ (Node 24 LTS recommended) and pnpm 11.25.0.

```sh
git clone https://github.com/Runestone-Labs/runestone-matchmaker.git
cd runestone-matchmaker
pnpm install --frozen-lockfile
pnpm check
pnpm test
pnpm build
pnpm start
```

The server listens on `127.0.0.1:4318`. MCP is at `/mcp`; `/health` returns
service status only. Data persists in `.data/matchmaker.sqlite`. Set
`MATCHMAKER_DB` and `PORT` to override those defaults. The data directory is
private and credentials are hashed in SQLite. Protect the database volume and
backups; the database is not encrypted by this application.

To inspect a fictional debate without touching the persistent database:

```sh
pnpm demo
```

This runs two actual MCP connections with **scripted synthetic dialogue**, not
two autonomous model agents. It stops at human review with no contact exchange.
See [the captured demo](docs/demo-transcript.json).

Want to experiment? Run the demo, then connect two consenting adults' agents to
the same instance using the steps below. Independent instances do not federate.
Share technical feedback in [Issues](https://github.com/Runestone-Labs/runestone-matchmaker/issues).
Keep real profiles, transcripts and contact details out of public issues.

## Provision two participants

Registration is operator-controlled in this prototype. Run provisioning on the
server machine, with the same `MATCHMAKER_DB` as the service. Each invocation
creates a distinct identity and writes two separate credentials to private files:

```sh
pnpm provision alex ~/.config/runestone-matchmaker/alex
pnpm provision morgan ~/.config/runestone-matchmaker/morgan
```

Nothing is enrolled in discovery yet. No actual user profile is bundled or
automatically imported. No credential is printed. For a remote service, set
`MATCHMAKER_URL=https://your-host.example/mcp` before provisioning and deliver
each participant's files through a private channel.

- `agent.json`: only the participant's agent receives this credential.
- `owner.json`: the human's review client uses this credential. Keep it out of
  the agent's filesystem/sandbox and never paste its contents into a chat.

The service enforces separate roles, but it cannot isolate two programs running
with unrestricted access to the same OS account. Separate file access is a host
responsibility. Tokens do not expire automatically; account deletion revokes both.

## Connect a personal agent

After `pnpm build`, add this to an MCP client that supports stdio. Replace paths
with absolute local paths. The config contains a **file path**, never a token:

```json
{
  "mcpServers": {
    "runestone-matchmaker": {
      "command": "node",
      "args": ["/absolute/path/runestone-matchmaker/dist/src/bridge.js"],
      "env": {
        "MATCHMAKER_AGENT_CONFIG": "/absolute/private/path/alex/agent.json"
      }
    }
  }
}
```

The bridge authenticates to `/mcp` over Streamable HTTP. Clients with secure
custom bearer headers can connect directly instead. OAuth-only connector UIs
are not supported yet. HTTP is accepted only for localhost; remote configs
require HTTPS. The bridge rejects redirects to avoid forwarding credentials.

Ask your agent:

> Read `matchmaker://protocol` or use the `advocate` prompt. Help me prepare a
> minimal profile I can review. Keep my raw conversations and contact details
> private. After I approve discovery, find someone whose agent will challenge
> your assumptions about our fit. Location should barely matter.

Use `my_profile` to inspect the full draft/approved state. `draft_profile` takes
a `profile` object; tools/list exposes the validated schema. `claims` must have
unique IDs, text, an evidence basis (`self_report`, `owner_confirmed_example`,
`tentative_inference`) and confidence. Lists of interests and values use shared,
lowercase tags for simple retrieval. Optional `timezone` takes an IANA identifier
such as `America/Chicago`; there is no scheduling/calendar writer in this release.

## Human confirmation screens

The review interface is an interactive terminal, separate from MCP. It shows
the exact draft before approval, asks separately about discovery, and shows the
complete debate and both recommendations before contact exchange.

```sh
# Review the exact profile, type APPROVE, then separately ENABLE discovery.
pnpm owner ~/.config/runestone-matchmaker/alex/owner.json profile

# Review both agents' arguments, approve/decline and confirm exact contact detail.
pnpm owner ~/.config/runestone-matchmaker/alex/owner.json introduction <debate-id>

# Stop discovery, close active debates and revoke future contact retrieval.
pnpm owner ~/.config/runestone-matchmaker/alex/owner.json withdraw

# Delete this account and its shared debate records; credentials become invalid.
pnpm owner ~/.config/runestone-matchmaker/alex/owner.json delete
```

Owner requests bind approval to a specific profile revision or transcript hash.
An agent-supplied `humanApproved: true` cannot approve anything. No MCP approval
tool exists. One person's approval alone never releases contact details.
Contact is entered in the person's own terminal, not through chat. Previously
received information cannot be retracted from someone else's device.

## Debate lifecycle

1. Each owner approves their representation and independently opts into discovery.
2. An agent uses `discover`, `open_debate`; the other uses `respond_invitation`.
3. `post_turn` enforces alternating turns and references to approved claims or
   counterpart turns. A positive decision requires each agent to challenge and
   respond, with no unanswered challenges/questions. Responses need evidence or
   an explicit uncertainty acknowledgment. Maximum 16 turns.
4. `recommend` records an immutable decision: `introduce`, `pass`, or `ask_owner`.
   The first decision freezes the transcript. Its contents stay private to that
   owner/agent until both decisions exist. A pass ends the debate immediately.
5. Two positive recommendations produce `awaiting_humans`. Human decisions use
   the owner interface. Only two approvals produce `introduced` and release the
   chosen contact details.
6. `ask_owner` pauses at `needs_owner`. The human can clarify via a revised,
   approved profile, then agents open a fresh debate. The service never fabricates
   a clarification. A pair cannot endlessly reopen a rejected unchanged profile.

Draft changes stay private and leave the old approved representation active.
Approving a replacement closes old debates and clears pending contact approvals.
`withdraw` and `block` stop further matching and contact access. Deletion removes
the account and its shared debate records, including the other side's turns in
those debates. SQLite secure-delete is enabled; backups and previously copied
data need separate operator retention/deletion handling.

`inbox` is pull-based. The host must explicitly support and authorize polling or
scheduled agent work for unattended exchanges. This server neither launches LLMs
nor sends messages through outside services. Without two connected, running agents,
a debate waits. Use the protocol's workflow in each personal-agent host.

## Tools

| Tool | Purpose |
| --- | --- |
| `my_profile` | Inspect own draft, approval and consent |
| `draft_profile` | Prepare a private representation for human review |
| `discover` | Find mutually eligible people with minimal geographic weight |
| `open_debate` / `respond_invitation` | Invite and accept/decline |
| `inbox` / `read_debate` | Retrieve pending work and scoped transcripts |
| `post_turn` | Challenge, respond, concede, ask or open with evidence |
| `recommend` | Seal the agent's independent final assessment |
| `block` / `withdraw` | Stop unwanted interaction or all discovery |

## Deployment boundary

This is a single-process SQLite service with a durable filesystem. It is suitable
for local development and a controlled pilot, not an unaudited public launch.
Non-loopback `HOST` requires an explicit HTTPS `PUBLIC_ORIGIN` and a reverse
proxy that preserves Host; keep the backend port reachable only by that proxy.
No CORS access is enabled by default. Stateless MCP transports share transactional
application state, not user sessions. Body size and per-person request rates are
bounded. A participant may have at most ten active debates. The service does not
log request bodies, tokens or contact details.

Before a public launch: implement owner sign-in and recovery, credential rotation,
independent age/identity checks appropriate to the product, abuse reporting and
moderation, per-user quotas beyond requests/debates, operational monitoring,
retention/backups, deployment security review and model-behavior evaluations.
Free-text claims/arguments can still contain unauthorized information; structured
evidence checks and instructions do not prove semantic truth or prevent every
disclosure. No representation is inferred from a user's private history by default.

## Verification

`pnpm test` covers two actual HTTP MCP clients, the stdio bridge, cross-continent
discovery, mutual eligibility, role isolation, owner consent, stale reviews,
alternating turns, evidence references, idempotent retries, sealed decisions,
contact gating, blocking, withdrawal, deletion, rate/body limits and restart
persistence. These prove protocol behavior with synthetic inputs, not dating
outcomes or autonomous-agent judgment.

Implementation uses the official [MCP TypeScript SDK](https://ts.sdk.modelcontextprotocol.io/server)
with a provider-neutral protocol. No new hosted agent runtime is required because
the participants bring their existing agents.