# Fly in Public MCP server

Fly in Public exposes a Model Context Protocol server so AI assistants can check your flight, list proofs, post new proofs, inspect proof interactions, and look up leaderboard status.

Endpoint: `https://flyinpublic.com/mcp`

Transport: HTTP / Streamable HTTP

Authentication: OAuth sign-in to Fly in Public

## Recommended: install the skill

Start with the skill guide: https://flyinpublic.com/docs/skills.md

The skill tells compatible agents to use the hosted OAuth MCP endpoint and the lightweight docs before falling back to API tokens.

## Hosted OAuth client config

Use this against the deployed Worker once OAuth storage is configured. In production, that is `https://flyinpublic.com/mcp`.

```json
{
  "mcpServers": {
    "flyinpublic": {
      "type": "http",
      "url": "https://flyinpublic.com/mcp"
    }
  }
}
```

Claude Code CLI:

```bash
claude mcp add --transport http flyinpublic https://flyinpublic.com/mcp
```

MCP Inspector:

```bash
npx @modelcontextprotocol/inspector \
  --transport http \
  --url https://flyinpublic.com/mcp
```

Your client should open an OAuth sign-in flow. Sign in to Fly in Public and approve the connection.


## Tools

All tools operate on the connected user. No tool accepts a user-id argument.

### bird_status

Get your bird's current flight state: altitude, status (flying, danger, missed, recovered, grounded), crash deadline, and recent streak.

Inputs:

- none

### list_proofs

List your most recent proofs (most recent first). Returns id, url, platform, proofType, message, publishedAt.

Inputs:

- `limit`: integer; default 10 - How many proofs to return (1 to 50).

### add_proof

Publish a new proof for the authenticated user's flight. Platform is inferred from the URL if omitted; proofType defaults to 'Post'.

Inputs:

- `url`: string; required - Public URL of the proof.
- `message`: string - Short description of the proof.
- `proofType`: string; one of Post, Demo, Landing Page, Video, Changelog, Offer, Blog, Other - Type of proof.
- `publishedAt`: string - ISO-8601 publish timestamp. Defaults to now.

### leaderboard_rank

Get the authenticated user's current leaderboard rank and total entries.

Inputs:

- none

### leaderboard_top

Get the top N leaderboard entries.

Inputs:

- `limit`: integer; default 5 - How many entries to return (1 to 25).

### list_recent_likes

List the most recent likes on the authenticated user's proofs (since the cutoff).

Inputs:

- `sinceHours`: integer; default 168 - Lookback window in hours (default 168 = 7 days).
- `limit`: integer; default 20 - Max number of results.

### list_recent_comments

List the most recent comments on the authenticated user's proofs (since the cutoff).

Inputs:

- `sinceHours`: integer; default 168 - Lookback window in hours (default 168 = 7 days).
- `limit`: integer; default 20 - Max number of results.

## Raw JSON-RPC examples

Advanced bearer-token endpoint:

```bash
curl -X POST https://flyinpublic.com/api/mcp \
  -H "Authorization: Bearer $FIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize"}'
```

List tools:

```bash
curl -X POST https://flyinpublic.com/api/mcp \
  -H "Authorization: Bearer $FIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
```

Call add_proof:

```bash
curl -X POST https://flyinpublic.com/api/mcp \
  -H "Authorization: Bearer $FIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0",
    "id":3,
    "method":"tools/call",
    "params":{
      "name":"add_proof",
      "arguments":{
        "url":"https://example.com/post",
        "message":"Shipped today!"
      }
    }
  }'
```

## Troubleshooting

- OAuth sign-in does not open: confirm the client supports remote HTTP MCP with OAuth. If not, use the advanced endpoint.
- 401 Unauthorized on `https://flyinpublic.com/api/mcp`: token missing or revoked. Generate a new token.
- 404 Not Found: confirm the URL is exactly `https://flyinpublic.com/mcp` or `https://flyinpublic.com/api/mcp` and the request is POST.
- no_project tool error: visit the dashboard once to create your flight, then retry.
- Proof calls succeed but do not appear: check `publishedAt` is not in the future and the URL is not already attached to another proof on your project.
