Skip to main content

Overview

In addition to callable tools, Nectr’s MCP server exposes resources — streaming data endpoints that external agents can subscribe to for bulk data access. Resources use URI patterns and return serialized JSON strings, making them ideal for:
  • Bulk data export
  • Real-time monitoring dashboards
  • Data synchronization with external systems
  • AI context augmentation
Resources are read-only. To modify Nectr data, use the REST API endpoints instead.

reviews_resource

Stream recent reviews for a repository as serialized JSON.

URI Pattern

string
required
Repository owner (GitHub username or organization)
string
required
Repository name

Example URIs

Returns

A JSON string containing an array of review objects (same schema as get_recent_reviews tool).
integer
required
Workflow run ID from the database
string
required
Full repository name (reconstructed as owner/repo)
integer
GitHub pull request number
string
required
AI verdict: APPROVED, CHANGES_REQUESTED, COMMENT, or UNKNOWN
string
required
Plain-English review summary
string
ISO 8601 timestamp when the review was created
string
required
Workflow status: completed, failed, processing, or pending

Example

Parsed Response (Pretty)

When parsed from the text field:

Implementation

The resource is registered using FastMCP’s @mcp.resource() decorator:
Source code location:
The {repo} parameter in the URI pattern expects the full repository name in the format owner/repo. The FastMCP framework automatically extracts this from the URI path.

Data Limit

The resource returns the 20 most recent reviews for the repository, ordered by created_at DESC. To fetch more reviews, use the get_recent_reviews tool with a custom limit parameter (up to 50).

Error Handling

If the database query fails:
  1. _query_db_reviews() logs a warning
  2. Returns an empty list []
  3. Resource returns "[]" as the JSON string
The MCP client receives a valid response with an empty array:

Use Cases

Real-Time Monitoring Dashboard

Subscribe to the reviews resource and update a dashboard whenever new reviews are posted:

Data Export

Export all reviews for a repository to a JSON file:

AI Context Augmentation

Provide recent reviews as context to an AI agent:

Slack Bot

Post a summary of recent reviews to Slack every morning:

Comparison: Resources vs Tools

Use resources when you need to fetch all recent data for a repository. Use tools when you need to query specific PRs or apply filters.

Future Resources (Roadmap)

Planned additional resources:
  • nectr://repos/{owner}/{repo}/contributors — Top contributors with stats
  • nectr://repos/{owner}/{repo}/health — Repository health metrics
  • nectr://repos/{owner}/{repo}/prs/{pr_number} — Single PR review details
  • nectr://repos/{owner}/{repo}/memories — Project patterns and memories
Want to request a new resource? Open an issue on GitHub.

MCP Resource Protocol

Nectr follows the MCP resource protocol specification:
  1. Registration — Resources are registered with URI patterns during server initialization
  2. Discovery — Clients can list available resources via resources/list
  3. Subscription — Clients can subscribe to resources for real-time updates (SSE)
  4. Reading — Clients can read resource contents via resources/read (JSON-RPC)

List Available Resources

Authentication

Resources do not require authentication in the current implementation. This is suitable for internal/trusted deployments only.For production use, add authentication middleware at the FastAPI level.

Source Code

The reviews resource is implemented at:
Helper function: