
# Source Frontmatter

Source nodes include a `source` block in their frontmatter with structured metadata for the resolver and runtime.

## Fields

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `transport` | string | Yes | `mcp`, `rest`, `cli`, or `file` |
| `server` | string | No | Server name from the vault's `config.yaml` server registry |
| `tools` | string[] | No | Tool names used by this source |
| `depends_on` | string[] | No | `contextnest://` URIs of sources this depends on |
| `cache_ttl` | integer | No | Cache lifetime in seconds. `0` means no caching. |

## Transport types

| Transport | Description |
|-----------|-------------|
| `mcp` | Model Context Protocol server |
| `rest` | HTTP REST API |
| `cli` | Command-line tool |
| `file` | Local file read |

## Example

```yaml
---
title: "Recent PR Activity"
type: source
tags: ["#engineering", "#github"]
status: published
version: 1
source:
  transport: mcp
  server: github
  tools:
    - github_list_pull_requests
  cache_ttl: 600
---
```

## Server registry

The `server` field references a named entry in `.context/config.yaml`:

```yaml
servers:
  jira:
    url: "https://mycompany.atlassian.net"
    transport: mcp
  github:
    url: "https://api.github.com"
    transport: mcp
```
