MCP Integration
View as MarkdownConnect your AI agent to PostGrad via the Model Context Protocol.
Overview
The PostGrad MCP server gives your AI agent direct access to structured knowledge feeds. It exposes:
- 5 Tools — Search, browse recent entries, get category summaries, list feeds, and subscribe to feeds
- 4 Resources — Discoverable reference data (feed directory, feed details, entries, stats)
- 2 Prompts — Pre-built templates for business strategy and deal evaluation
All communication happens over HTTPS using the Model Context Protocol remote transport. No local server process is required.
Two ways to connect
PostGrad's MCP server accepts both OAuth 2.1 custom connectors (no API key required — the client walks the user through a login + consent flow) and raw Bearer API keys (for CLI tools and configs that prefer a static credential).
| Client | Recommended path | Status |
|---|---|---|
| ChatGPT | OAuth custom connector | ✅ Working |
| Cursor | OAuth custom connector (or deeplink) | ✅ Working |
| Claude Code CLI | API key Bearer via --header | ✅ Working |
npx add-mcp | API key Bearer | ✅ Working |
| Any other JSON-config client | API key Bearer | ✅ Working |
| Claude.ai web / Claude Desktop | Blocked by Anthropic's connector bug — use Claude Code CLI instead | ⚠ See note below |
Both paths hit the same /api/mcp endpoint and expose the same tools.
Option A — Custom connector (OAuth)
Supported clients: ChatGPT, Cursor. Claude web and Claude Desktop are currently blocked by an Anthropic-side bug — see the warning below.
Claude.ai connector bug (as of April 2026): Claude web and Claude Desktop complete the OAuth flow with PostGrad successfully but do not attach the resulting Bearer token to the subsequent MCP request. This produces the error "Authorization with the MCP server failed" on every attempt. The issue affects every self-hosted OAuth-protected MCP server, not just PostGrad — it's tracked in Anthropic's bug repository. Our server is independently verified correct (ChatGPT, Cursor, and Claude Code CLI all connect successfully). Until Anthropic ships a fix, use Option B (API key Bearer) below with the Claude Code CLI — it works today.
- In ChatGPT, Cursor, or another OAuth-capable client, open the custom-connector dialog.
- ChatGPT: Settings → Connectors → Add custom MCP → paste the URL below.
- Cursor: Settings → MCP → Add custom connector → paste the URL below.
- Paste the MCP URL:
https://postgrad.io/api/mcp - The client will redirect you to PostGrad. If you're not already signed in, you'll land on the login page; sign in with the same account you used to subscribe to feeds.
- On the consent screen, confirm you want the client to access your subscribed feeds. Click Allow.
- You're done — the client has a short-lived access token and will auto-refresh it for as long as you stay connected.
Revoking access: go to postgrad.io/dashboard/settings to see all authorized clients and revoke any of them (coming soon in the admin UI; in the meantime contact support).
What the client can do: search, browse, and list categories/feeds across every feed you're actively subscribed to. Rate limits match your subscription tier. The client cannot create, modify, or delete any data.
Under the hood: standard OAuth 2.1 + PKCE with dynamic client registration (RFC 7591). Discovery metadata is at https://postgrad.io/.well-known/oauth-authorization-server and https://postgrad.io/.well-known/oauth-protected-resource.
Option B — API key Bearer
Supported clients: Claude Code CLI, npx add-mcp, any client that lets you set raw HTTP headers.
Prerequisites
- Create an account at postgrad.io
- Subscribe to a plan (Starter, Pro, or Scale) — or subscribe to a free feed
- Generate an API key from your Dashboard
- Your key will look like:
pg_live_xxxxxxxxxxxxx
Client Configuration
Claude Code CLI
Run:
claude mcp add postgrad --transport http https://postgrad.io/api/mcp \
--header "Authorization: Bearer pg_live_xxxxxxxxxxxxx"Or add to your .mcp.json manually:
{
"mcpServers": {
"postgrad": {
"type": "remote",
"url": "https://postgrad.io/api/mcp",
"headers": {
"Authorization": "Bearer pg_live_xxxxxxxxxxxxx"
}
}
}
}Cursor
Add to your Cursor MCP settings at .cursor/mcp.json:
{
"mcpServers": {
"postgrad": {
"url": "https://postgrad.io/api/mcp",
"headers": {
"Authorization": "Bearer pg_live_xxxxxxxxxxxxx"
}
}
}
}Windsurf
Add to your Windsurf MCP settings:
{
"mcpServers": {
"postgrad": {
"url": "https://postgrad.io/api/mcp",
"headers": {
"Authorization": "Bearer pg_live_xxxxxxxxxxxxx"
}
}
}
}Replace pg_live_xxxxxxxxxxxxx with your actual API key from the PostGrad dashboard.
Available Tools
search_knowledge
Search knowledge entries across one or all of the user's subscribed feeds. Supports three search modes — keyword, semantic, and hybrid — each with different strengths and tier requirements. See Search modes explained below for how to pick.
| Parameter | Type | Required | Description |
|---|---|---|---|
feed_id | string | No | Three accepted values: (1) omit to auto-select the user's most-populated feed (response includes an auto_selected note), (2) pass "all" to search every subscribed feed and get merged, relevance-ranked results, (3) pass a UUID to scope to that one feed. Use list_feeds to discover feeds. |
query | string | Yes | Search query text (max 500 chars) |
mode | string | No | keyword (default), semantic, or hybrid. See Search modes explained. |
categories | string[] | No | Filter to specific categories (keyword mode only — semantic and hybrid rankings don't have a natural narrow-by-category semantics). |
confidence_min | number | No | Minimum confidence score (0-1). Applied in-SQL for semantic + hybrid. |
limit | number | No | Max results (1-50, default 20) |
Search modes explained
PostGrad's search engine ships three retrieval strategies. Each one has a different way of deciding "does this entry match the query?" — so the right mode depends on what the query looks like and how valuable precision is to your agent.
keyword — exact lexical matching
How it works: Postgres full-text search (tsvector + ts_rank). The query is tokenized into terms and scored against entries that contain those exact tokens.
Best for:
- Known-term lookups — SKUs, model numbers, acronyms, product names:
"SOC 2","SKU-1234","GPT-5". - Short queries where the words ARE the signal.
- Anywhere you want predictable, explainable results that a non-technical user can verify by eye.
Trade-offs:
- Blind to paraphrasing.
"how do I cancel my subscription"and"subscription cancellation procedure"may rank different entries. - Misses synonyms. A query for
"laid off"won't surface entries that only say"terminated".
Cost: free — no embedding generation. Fastest mode.
semantic — conceptual / paraphrase matching
How it works: both the query and every knowledge entry are converted into 768-dimensional vector embeddings (Gemini text-embedding-004), then ranked by cosine distance in pgvector. Two texts with similar MEANING sit close together in vector space even if they share no exact words.
Best for:
- Natural-language questions from human users or general-purpose agents.
- Queries where the user doesn't know the exact terminology the entry uses.
- Cross-lingual queries (to the extent the embedding model handles the language pair).
Trade-offs:
- Embeddings cost an API call per unique query. PostGrad caches query embeddings for 24 hours (Upstash, keyed by SHA-256 of query text) so repeat queries are free.
- Can miss exact-term matches. A query for literal
"SKU-1234"may rank a conceptually-related entry above the one that literally contains the SKU. - "Confidently wrong" failure mode: semantic match scores look high even when no entry is actually relevant. Use
confidence_minto filter.
Cost: Pro tier and above. ~50-100ms of extra latency on cold-cache queries.
hybrid — Reciprocal Rank Fusion (RRF) of keyword + semantic
How it works: runs BOTH the keyword search and the semantic search in a single Postgres round-trip, then combines the two ranked lists using Reciprocal Rank Fusion with k=60. An entry that ranks highly in either list (or moderately well in both) floats to the top.
Best for:
- Production agents with unknown / diverse query distributions.
- Use-cases where you need defensibility — "we ran it both ways and this is what came up top on average."
- Query patterns that mix natural-language questions and exact-term lookups.
Trade-offs:
- Strictly more expensive than either mode alone (two rankings, one fusion).
- The RRF score is opaque — it's not a confidence score, it's a rank-combination metric, so don't show it to end users.
Cost: Scale tier only. Ships the best quality of the three modes on heterogeneous query distributions.
Picking a mode in one sentence
- You know the exact words you're searching for:
keyword. - You want natural-language / conceptual matching:
semantic. - You're building a general-purpose agent and want the retrieval layer to handle whatever the user throws at it:
hybrid.
Search mode access by tier:
| Tier | Keyword | Semantic | Hybrid |
|---|---|---|---|
| Starter | Yes | Blocked (403 TIER_INSUFFICIENT) | Blocked (403 TIER_INSUFFICIENT) |
| Pro | Yes | Yes | Blocked (403 TIER_INSUFFICIENT) |
| Scale | Yes | Yes | Yes |
When a request is blocked, the response body includes required_tier (which plans would accept the mode) and current_tier, so clients can surface a precise upgrade prompt. Retry the same query with mode=keyword if you want a result on the current tier:
{
"data": null,
"error": {
"code": "TIER_INSUFFICIENT",
"message": "mode=hybrid requires a scale tier API key. Your key is on starter. Upgrade at https://postgrad.io/pricing, or retry with mode=keyword.",
"details": {
"reason": "TIER_INSUFFICIENT",
"required_tier": ["scale"],
"current_tier": "starter"
}
}
}There is no silent fallback. If your tier doesn't support the mode you asked for, the request fails with 403 instead of returning keyword results under the hood — so your agent's retry logic can make an explicit decision.
get_recent_knowledge
Get recently added or updated knowledge entries within a feed. Useful for checking what new insights have been extracted.
| Parameter | Type | Required | Description |
|---|---|---|---|
feed_id | string (uuid) | Yes | Feed ID to browse |
since | string | No | ISO date string (e.g. 2026-04-01) |
categories | string[] | No | Filter to specific categories |
limit | number | No | Max results (1-50, default 20) |
get_category_summary
Get a summary of a specific category within a feed — entry count, common tags, and sample entries.
| Parameter | Type | Required | Description |
|---|---|---|---|
feed_id | string (uuid) | Yes | Feed ID to inspect |
category | string | Yes | Category name (e.g. ai_operations, scaling_strategy) |
list_feeds
Browse available data feeds in the PostGrad marketplace. Returns feeds you're subscribed to and optionally other available feeds.
| Parameter | Type | Required | Description |
|---|---|---|---|
include_available | boolean | No | Include unsubscribed feeds (default false) |
subscribe_feed
Subscribe to a feed to access its knowledge entries. Free feeds are subscribed instantly. Paid feeds return a checkout URL.
| Parameter | Type | Required | Description |
|---|---|---|---|
feed_id | string (uuid) | Yes | Feed ID to subscribe to |
Available Resources
Resources provide discoverable reference data that MCP hosts can pre-load.
| URI | Description |
|---|---|
postgrad://feeds | Browse available feeds in the marketplace |
postgrad://feeds/{slug} | Feed details by slug (includes category breakdown) |
postgrad://knowledge/entry/{id} | Single knowledge entry (requires feed subscription) |
postgrad://stats | Marketplace statistics (total feeds, entries, last updated) |
Available Prompts
Prompts provide structured templates for common use cases.
business_strategy_advisor
Get strategic business advice grounded in real operator experience.
| Argument | Type | Description |
|---|---|---|
context | string | Current business context or situation |
question | string | Specific strategic question to answer |
deal_evaluator
Evaluate a business deal or partnership opportunity.
| Argument | Type | Description |
|---|---|---|
deal_description | string | Description of the deal or partnership to evaluate |
Troubleshooting
Invalid API Key
- Verify your key starts with
pg_live_ - Check that the key is active in your PostGrad dashboard
- Ensure the Authorization header uses the
Bearerprefix
Rate Limiting
| Tier | Rate Limit | Monthly Quota |
|---|---|---|
| Starter | 10 req/min | 1,000/month |
| Pro | 30 req/min | 10,000/month |
| Scale | 100 req/min | 50,000/month |
If rate limited, wait and retry. Upgrade your tier for higher limits.
Connection Timeout
- The MCP endpoint supports up to 60 seconds per request
- For large result sets, use the
limitparameter to reduce response size - Check your network connection and firewall settings
Empty Results
- For
search_knowledge, tryfeed_id: "all"to fan out across every subscribed feed, or omitfeed_idto let PostGrad auto-select - Verify the category name matches one of the feed's categories
- Check that your tier has access to the requested search mode
- Try broadening your search query
Get API usage for current period
Returns the authenticated key's usage for the current billing period in the canonical `usage` envelope block. `data` is `null` — every consumer should read `response.usage` for tier + quota information.
Agent Skill File
Drop-in instructions for any AI agent or bot to use PostGrad effectively. Copy this into your agent's system prompt.