# Memrio — full documentation > Memrio is the central intelligence hub your AIs plug into over MCP. ChatGPT, Claude, Cursor, and your own agents read from one source of truth — and write back what they learn. Examples below use `https://memrio.ai/api/mcp/acme` as the MCP URL and `mr_live_8f3a…` as the key. Replace both with the values from your own agent page. Where a placeholder `{{API_KEY}}` survives, it means “your key”. --- # What Memrio is > Memrio is a human-governed knowledge base that AI agents read over MCP. Learn the model: workspaces, pages, page sets, agents, keys, and review. Memrio is the approved source of truth your AI agents read from. People write and approve pages. Agents connect over the Model Context Protocol (MCP) with a scoped API key and see only the pages a human published into their page set. It replaces the pattern of pasting policies into system prompts, or pointing a retrieval pipeline at a wiki nobody trusts. Pages are small, curated, and carry explicit instructions about when an agent should use them. ## The model | Concept | What it is | | --- | --- | | Organization | Your company. Members have a role: owner, admin, editor, or viewer. | | Workspace | A knowledge base inside the organization with its own slug, pages, agents, and review settings. The MCP URL is per workspace. | | Page | A unit of knowledge with a title, tags, structured content, an owner, and a status: draft, in review, published, or archived. Pages nest in a tree. | | Instruction | A block on a page telling agents how and when to apply it (critical, high, or normal priority). Instructions ride along with the page when an agent fetches it. | | Document | An uploaded file (PDF, spreadsheet, image) attached to a page. Extracted text is packed into the page for agents. | | Agent | A named consumer — “Support bot”, “Cursor (Platform team)” — with a page set, permissions, and API keys. | | Page set | The pages an agent may read. Pick pages or whole subtrees. Everything else is invisible to that agent. | | API key | A Bearer token bound to one agent in one workspace. The key alone tells the server what may be read. | | Version | Every publish creates a numbered version with a change summary. Agent edits become versions waiting for review. | ## Page lifecycle 1. **Draft** — someone (or an agent with write access) creates or edits a page. Agents cannot see drafts unless a test agent has “Read drafts” on. 2. **In review** — a version is submitted. Reviewers approve or reject with a note. 3. **Published** — the approved version is what every agent in the page set reads. A review frequency keeps it fresh. 4. **Archived** — hidden from agents and browse, kept for history. ## What an agent actually receives Agents do not receive embeddings or ranked chunks. They receive a catalog — every page title plus its “use when” instructions — and then whole pages on request. A packed page looks like this: **get_page → text** ```md # Refund policy ## Instructions [CRITICAL] Never promise a refund before checking the order date. [HIGH] Annual plans: pro-rate to the day; monthly plans: no partial refunds. ## Content Customers may request a refund within 30 days of purchase… ## Attached files [FILE] refund-exceptions-2026.pdf …extracted text… ``` > **Note:** Because pages are curated and small, the agent picks by title and instruction rather than similarity search. That is more predictable for policy and process content, and easier to audit. --- # Quickstart: publish a page and connect an agent > Go from an empty Memrio workspace to an agent answering from an approved page in about ten minutes. ## 1. Create your organization and workspace Sign up, name your organization, and create a workspace. The workspace slug becomes part of your MCP URL: `https://memrio.ai/api/mcp/acme`. ## 2. Write a page Open Knowledge → New page. Give it a clear title an agent would recognize (“Refund policy”, not “Misc notes”). Add the body, then add at least one instruction block that tells agents when to use the page. **Registry markdown** ```md :::instruction critical Use this page whenever a customer asks about refunds, returns, or chargebacks. ::: Customers may request a refund within 30 days of purchase. :::fact Annual plans are pro-rated to the day. ::: ``` ## 3. Submit and publish Submit the page for review. A reviewer approves it (or you, if your workspace lets editors self-publish). The page is now version 1 and visible to agents. ## 4. Create an agent and a key Open Agents → New agent. Name it after the consumer (“Support bot”), add the pages it may read to its page set, and leave “Can edit pages” off for now. Click New key and copy the secret — it is shown once. ## 5. Connect your client Pick your client from the integration guides — ChatGPT, Claude, Claude Code, Cursor, VS Code, Gemini CLI, or an SDK. Every guide needs only two values: the MCP URL and the key. **Generic MCP client config** ```json { "mcpServers": { "memrio": { "url": "https://memrio.ai/api/mcp/acme", "headers": { "Authorization": "Bearer mr_live_8f3a…" } } } } ``` ## 6. Verify Ask the agent a question the page answers. Then open the agent in the registry: the request log shows the browse call, the get_page call, the pages hit, and latency. > **Note:** Use “Copy connection” on the agent page to get a ready-to-paste brief with the URL, key, tool list, and current page titles. --- # Connecting over MCP > How Memrio exposes a remote MCP server: endpoint, authentication, protocol version, and the JSON-RPC handshake. ## Endpoint Each workspace has one Streamable HTTP MCP endpoint at `https://memrio.ai/api/mcp/acme`. The same URL serves every agent in the workspace; the API key decides which agent and page set apply. | Method | Behaviour | | --- | --- | | POST | JSON-RPC 2.0 request or batch. Returns JSON. Notifications return 202 with no body. | | GET | Returns server info for the authenticated key: name, workspace slug, agent name, protocol version. | | DELETE | Ends a session (no-op; the server is stateless). Returns 204. | | OPTIONS | CORS preflight. Returns 204. | ## Authentication Send the agent key as a Bearer token. There is no workspace or page-set header — the key already binds to one agent in one workspace. Requests without a valid key return 401; a paused agent returns 403. **Header** ```bash Authorization: Bearer mr_live_8f3a… ``` > **Warning:** Keys are shown once at creation and stored hashed. Treat them like passwords; rotate by creating a new key and revoking the old one from the agent page. ## Protocol The server speaks MCP protocol version `2025-03-26` over Streamable HTTP and echoes the version the client requests. It advertises the `tools` capability only — no resources or prompts. Server name is `memrio`. ## Handshake by hand Every client does this for you, but it is useful for debugging with curl. **initialize** ```bash curl -s https://memrio.ai/api/mcp/acme \ -H "Authorization: Bearer mr_live_8f3a…" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}' ``` **response** ```json { "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2025-03-26", "capabilities": { "tools": { "listChanged": false } }, "serverInfo": { "name": "memrio", "version": "0.2.0" }, "instructions": "Browse the Support bot page set in Acme first. …" } } ``` **tools/list and a tools/call** ```bash curl -s https://memrio.ai/api/mcp/acme \ -H "Authorization: Bearer mr_live_8f3a…" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}' curl -s https://memrio.ai/api/mcp/acme \ -H "Authorization: Bearer mr_live_8f3a…" \ -H "Content-Type: application/json" \ -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"browse","arguments":{}}}' ``` ## Server instructions The `initialize` result includes an `instructions` string tailored to the agent: browse first, pick pages by their use-when text, never invent facts. Agents with write access also get the registry markdown guide. Most clients pass this straight into the model’s context. ## Request log Every call — including failed authentication and unknown tools — is recorded with the tool name, query, pages hit, status, and latency. Open the agent to inspect it. --- # MCP tools reference > Every tool Memrio exposes over MCP: browse, search_pages, get_page, and the write tools get_page_source, create_page, update_page, append_to_page. Three read tools are always present. Four write tools appear only when “Can edit pages” is on for the agent. All tools return text content; JSON results are pretty-printed JSON strings. ## Read tools ### browse List every page in the agent page set with its use-when instructions. Call this first — it is the catalog the agent picks from. No arguments. **result** ```json { "pages": [ { "pageId": "pg_7f3a", "title": "Refund policy", "alwaysInclude": false, "useWhen": ["Use whenever a customer asks about refunds, returns, or chargebacks."] } ] } ``` ### search_pages Keyword filter over the page set. Titles weigh more than body text. Returns up to 8 hits with a short excerpt. Prefer `browse` unless the set is large. | Argument | Type | Required | Notes | | --- | --- | --- | --- | | query | string | yes | Keywords to search for | ### get_page Return the packed page: title, instructions, content, attached file text, and any pages or files its instructions say to use. Fails if the page is not in the set. | Argument | Type | Required | Notes | | --- | --- | --- | --- | | pageId | string | yes | From browse or search_pages | ## Write tools > **Note:** Writes create a new version. If the agent may publish, the version goes live at once; otherwise it waits for a human reviewer. A page with a version already in review rejects further writes until it is approved or rejected. ### get_page_source Editable registry markdown for a page, including drafts, plus title, tags, status, parent, path, and whether a version is in review. Read this before `update_page`. | Argument | Type | Required | Notes | | --- | --- | --- | --- | | pageId | string | yes | | ### create_page Create a page. With `parentId` it nests under a page in the set; without, it becomes top-level and is added to the set automatically. | Argument | Type | Required | Notes | | --- | --- | --- | --- | | title | string | yes | Max 200 chars | | markdown | string | yes | Registry markdown body | | parentId | string | no | A page id in this set | | tags | string[] | no | Up to 20 | | changeSummary | string | no | Shown to reviewers | ### update_page Replace the whole body, title, or tags. Send the complete rewritten page — this is not a patch. | Argument | Type | Required | Notes | | --- | --- | --- | --- | | pageId | string | yes | | | changeSummary | string | yes | One line | | markdown | string | no | Complete new body | | title | string | no | | | tags | string[] | no | | ### append_to_page Add blocks to the end of a page without touching existing content. Good for logging a decision or adding an example. | Argument | Type | Required | Notes | | --- | --- | --- | --- | | pageId | string | yes | | | markdown | string | yes | Blocks to append | | changeSummary | string | yes | One line | **write result** ```json { "pageId": "pg_7f3a", "title": "Refund policy", "versionNumber": 4, "status": "in_review", "message": "Submitted as v4 and waiting for a human to approve it." } ``` --- # Registry markdown > The markdown dialect agents and people use to write Memrio pages, including instruction, fact, callout, and fields blocks. Pages are stored as structured blocks. The editor writes them; agents write them through markdown that maps one-to-one onto those blocks. Standard markdown covers most of it; four directive fences add the registry-specific blocks. ## Standard markdown - Headings: `#`, `##`, `###` - Paragraphs, `- ` bullets, `1. ` numbered lists, `- [ ]` checklists - `> ` quotes, fenced code blocks, `---` dividers ## Directive blocks ### instruction A rule the reading agent must follow. Priority is `critical`, `high`, or `normal`. Instructions are what `browse` shows as “use when”, so make the first one describe when the page applies. ```md :::instruction critical Never promise a refund before checking the order date. ::: ``` ### fact A verified, citable statement. Agents are encouraged to quote facts verbatim. ```md :::fact Annual plans are pro-rated to the day. ::: ``` ### callout A highlighted note for humans and agents. Tone is `info`, `warning`, or `success`. ```md :::callout warning Refund exceptions require a manager approval code. ::: ``` ### fields Label / value pairs — owners, SLAs, contact points. One `Label: value` per line. ```md :::fields Owner: Billing team Review cadence: 90 days Escalation: #billing-escalations ::: ``` ## A complete page **Refund policy** ```md :::instruction critical Use this page whenever a customer asks about refunds, returns, or chargebacks. ::: :::instruction high Never promise a refund before checking the order date. ::: ## Policy Customers may request a refund within 30 days of purchase. :::fact Annual plans are pro-rated to the day. Monthly plans have no partial refunds. ::: ## Exceptions - Duplicate charges: refund in full, any time. - Service outage over 24h: refund the affected month. :::fields Owner: Billing team Review cadence: 90 days ::: ``` --- # Governance: review, publish, and agent permissions > How review and publishing work in Memrio, and what each agent permission — read drafts, can edit, can publish — actually allows. The point of the registry is that agents read what a person approved. Three mechanisms make that true: versions with review, per-agent page sets, and explicit agent permissions. ## Versions and review Editing a published page never changes what agents see until a new version is approved. A submitted version carries a change summary and shows up for reviewers, who approve or reject with a note. Workspaces can require review for everyone or let editors publish directly. Each page has a review frequency. When it lapses the page is flagged so someone re-confirms it is still right — stale knowledge is the failure mode this exists to prevent. ## Page sets An agent sees only pages in its set. Add individual pages or whole subtrees. A support bot gets customer-facing policy; an engineering agent gets runbooks; neither sees the other. Sections group pages but are not readable themselves. ## Agent permissions | Setting | Default | Effect | | --- | --- | --- | | Active | on | Paused agents reject every MCP call with 403. | | Read drafts | off | For test agents only. Lets the agent read draft and in-review pages. | | Can edit pages | off | Adds get_page_source, create_page, update_page, append_to_page. Writes are submitted for review. | | Can publish without review | off | Trusted bots only. Writes go live immediately for every other agent. | ## Human roles | Role | Can | | --- | --- | | Viewer | Read pages and activity. | | Editor | Create and edit pages, submit for review. | | Admin | Approve versions, manage agents and keys, change workspace settings. | | Owner | Everything, plus billing and members. | ## Audit trail Activity records every human and agent action — created, edited, submitted, approved, rejected, published, key created, key revoked. The request log records every MCP call with the pages hit. Together they answer “why did the agent say that?” with a page and a version number. --- # Brief for an agent > A copy-paste system prompt that teaches any AI agent how to use Memrio well: browse first, open pages, answer only from them. Paste this into a system prompt, CLAUDE.md, a Cursor rule, or a custom GPT’s instructions. Replace the two placeholders. The agent page shows a version of this with your live page titles under “Copy connection”. **agent-brief.md** ```md You are connected to Memrio, a company knowledge base, over MCP. Server: https://memrio.ai/api/mcp/acme Authorization: Bearer mr_live_8f3a… Do not send a workspace or page-set header. The key already binds you to one workspace and one page set. Tools (this page set only): - browse — list every page title with its "use when" instructions - get_page { "pageId" } — packed page: instructions, body, attached files - search_pages { "query" } — keyword filter, for large sets How to work: 1. Call browse before answering anything about the company, its products, or its policies. 2. Open every page whose "use when" text matches the question with get_page. 3. Follow [CRITICAL] and [HIGH] instructions on those pages exactly. 4. Answer only from the pages you opened. Quote facts verbatim. Name the page. 5. If no page applies, say you do not have that information. Do not guess. If you have write tools (get_page_source, update_page, append_to_page, create_page): - Read the source before rewriting a page and send the whole page back. - Prefer append_to_page for additions. Give a one-line changeSummary every time. - Your edits may wait for a human reviewer; do not assume they are live. ``` ## Why these rules - **Browse first** turns the model’s guess into a lookup. The catalog is small and fits in context. - **Open whole pages** instead of chunks so instructions and exceptions arrive together. - **Say when you do not know.** A page set is a deliberate boundary; honesty at the edge is the feature. ## Machine-readable docs Point an agent at `/llms.txt` for a map of this documentation, or `/llms-full.txt` for the whole thing in one markdown file. --- # llms.txt and machine-readable docs > Where to find Memrio documentation in formats built for language models: /llms.txt, /llms-full.txt, and per-page markdown. This site follows the llms.txt convention so an agent can learn the product without scraping HTML. | Path | Contents | | --- | --- | | /llms.txt | A short map: what the product is, and a link to every documentation and integration page with a one-line description. | | /llms-full.txt | Every documentation page and integration guide rendered as one markdown file. Paste the URL into a tool that fetches context. | | /docs/{slug}.md | Any docs page as plain markdown, for tools that fetch a single page. | > **Note:** These files describe Memrio itself. Your own company knowledge is served to agents over MCP, scoped by key — never as a public text file. --- # Memrio for ChatGPT > Give ChatGPT one approved place to look before it answers about your company. Add the registry as a custom MCP connector, and every chat can browse the pages your team published — refund policy, pricing rules, onboarding steps — instead of guessing. ## Why - **Stop pasting policies into prompts** — Publish a page once. Every ChatGPT conversation in your workspace reads the same approved version. - **Governed, not scraped** — ChatGPT only sees pages a human published into the connector’s page set. Drafts and stale notes never leak. - **Every call is logged** — See which pages ChatGPT opened, how often, and how long each request took — per key. ## Setup ### 1. Turn on Developer mode In ChatGPT open Settings → Apps & Connectors → Advanced settings and enable Developer mode. On Business and Enterprise plans a workspace admin may need to allow custom connectors first. ### 2. Create the connector Go to Apps → Create. Name it Memrio, paste your MCP server URL, and choose Access token / API key for authentication. ChatGPT sends the key as an Authorization: Bearer header — exactly what the registry expects. **Connector fields** ```bash Name Memrio MCP Server URL https://memrio.ai/api/mcp/acme Authentication Access token / API key Token mr_live_8f3a… ``` ### 3. Scan tools and save Click Scan Tools. You should see browse, search_pages, and get_page (plus the write tools if you enabled editing for this agent). Click Create. ### 4. Use it in a chat Start a new chat, open + → More → Developer mode, and enable Memrio. Ask a question your registry answers. ChatGPT browses the page set first, then opens the pages that apply. ### 5. Or call it from the Responses API Building your own product on OpenAI models? Attach the same server as a hosted MCP tool and the model gets the same governed page set. **responses.ts** ```ts import OpenAI from 'openai'; const client = new OpenAI(); const response = await client.responses.create({ model: 'gpt-5', tools: [ { type: 'mcp', server_label: 'context_registry', server_url: 'https://memrio.ai/api/mcp/acme', headers: { Authorization: 'Bearer mr_live_8f3a…' }, require_approval: 'never', }, ], input: 'What is our refund window for annual plans?', }); console.log(response.output_text); ``` ## Notes - Developer mode connectors are available on ChatGPT Plus, Pro, Business, and Enterprise, on the web. - Create one agent per audience (Support, Sales, Everyone) so each connector only sees the pages that audience should read. ## Try it > Using Memrio, what do we tell a customer who asks for a refund 40 days after purchase? ## FAQ **Does ChatGPT need OAuth to connect?** No. Choose the Access token / API key option when creating the connector and paste the agent key. ChatGPT sends it as a Bearer token on every request. **Will ChatGPT answer from the whole registry?** It answers from the page set attached to the key you used. Make a separate agent and key for each audience if different teams should see different pages. **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. --- # Memrio for Claude > Connect Claude.ai, Claude Desktop, or your own Claude-powered product to a page set your team approved. Claude browses the registry with the same MCP tools it already knows, and cites the page it used. ## Why - **One page set for every Claude surface** — The same key works in Claude.ai, Claude Desktop, and the Messages API MCP connector. - **Instructions ride along** — Critical instruction blocks on a page arrive with the content, so Claude knows how to apply it. - **Writes go through review** — Let Claude draft updates to a page. Nothing publishes until a person approves the version. ## Setup ### 1. Claude.ai — add a custom connector Open Settings → Connectors → Add custom connector. Name it Memrio and paste the MCP server URL. Under Request headers add Authorization with the value Bearer plus your key (keep the space). Claude stores the header securely and sends it on every request. **Connector fields** ```bash Name Memrio Remote MCP server URL https://memrio.ai/api/mcp/acme Request header Authorization: Bearer mr_live_8f3a… ``` ### 2. Claude Desktop — bridge with mcp-remote If your Claude Desktop build does not expose request headers yet, use the mcp-remote bridge. Edit claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude. **claude_desktop_config.json** ```json { "mcpServers": { "memrio": { "command": "npx", "args": [ "-y", "mcp-remote", "https://memrio.ai/api/mcp/acme", "--header", "Authorization:${AUTH_HEADER}" ], "env": { "AUTH_HEADER": "Bearer mr_live_8f3a…" } } } } ``` ### 3. Messages API — attach the MCP connector Building on the Anthropic API? Pass the server in mcp_servers and Claude calls the registry tools directly from the model. **messages.ts** ```ts import Anthropic from '@anthropic-ai/sdk'; const client = new Anthropic(); const message = await client.beta.messages.create({ model: 'claude-sonnet-4-5', max_tokens: 1024, betas: ['mcp-client-2025-04-04'], mcp_servers: [ { type: 'url', url: 'https://memrio.ai/api/mcp/acme', name: 'memrio', authorization_token: 'mr_live_8f3a…', }, ], messages: [ { role: 'user', content: 'Summarize our refund policy for annual plans.' }, ], }); ``` ### 4. Ask, and check the source Claude lists the page set with browse, opens the matching page with get_page, and answers from it. Open the agent in the registry to see the request log fill in. ## Notes - Request headers on Claude.ai custom connectors are rolling out; if the field is missing in your org, use the mcp-remote route. - The mcp-remote header uses no space after the colon on purpose — it avoids an argument-splitting bug on Windows. ## Try it > Check Memrio and tell me the shipping window we promise for international orders. Quote the page. ## FAQ **Does Claude support API-key auth for remote MCP servers?** Yes. Claude.ai custom connectors accept a fixed Authorization header, the Messages API takes authorization_token, and Claude Desktop can bridge through mcp-remote with a --header flag. **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. --- # Memrio for Claude Code > Put your engineering runbooks, API conventions, and architecture decisions where Claude Code can read them before it writes a line. One command adds the registry; a .mcp.json checked into the repo shares it with the whole team. ## Why - **Runbooks the agent actually reads** — Deployment steps, coding standards, incident playbooks — governed pages instead of a stale wiki. - **Shared through the repo** — Commit .mcp.json and every engineer’s Claude Code session gets the same page set. - **Let it document as it goes** — Give the agent write access and it can append to a page after a fix. A reviewer approves before it publishes. ## Setup ### 1. Add the server Run this once from the repo root. Use --scope project to write a .mcp.json the team can commit, or leave it out to keep the server local to you. **terminal** ```bash claude mcp add --transport http memrio https://memrio.ai/api/mcp/acme \ --header "Authorization: Bearer mr_live_8f3a…" \ --scope project ``` ### 2. Or commit .mcp.json by hand Reference the key through an environment variable so the secret never lands in git. **.mcp.json** ```json { "mcpServers": { "memrio": { "type": "http", "url": "https://memrio.ai/api/mcp/acme", "headers": { "Authorization": "Bearer ${CONTEXT_REGISTRY_KEY}" } } } } ``` ### 3. Tell Claude when to use it Add a line to CLAUDE.md so the agent browses the registry before answering questions about your systems. **CLAUDE.md** ```bash ## Company knowledge Before answering anything about our company, products, or policies, call `browse` on the memrio server, open the pages whose use-when instructions match, and answer only from those pages. If nothing applies, say so. ``` ### 4. Verify Run /mcp inside Claude Code. memrio should show as connected with the browse, search_pages, and get_page tools. ## Try it > Check the registry for our deployment runbook and walk me through a hotfix release. ## FAQ **Does Claude Code support HTTP MCP servers with headers?** Yes. Use --transport http with one or more --header flags, or write the same thing into .mcp.json with a headers object. **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. --- # Memrio for Cursor > Cursor’s agent is only as good as what it knows about your codebase’s rules. Add the registry as an MCP server and every Composer or Agent session can pull your conventions, service boundaries, and on-call notes before it edits. ## Why - **Conventions on demand** — Keep the long rules out of .cursor/rules. Let the agent fetch the page that matters for the task at hand. - **Same pages for every engineer** — Commit .cursor/mcp.json and the whole team’s agent reads one approved source. - **No secrets in git** — Cursor expands environment variables in mcp.json, so the key stays on each machine. ## Setup ### 1. Create the config Add .cursor/mcp.json at the root of the project (or ~/.cursor/mcp.json for every project). **.cursor/mcp.json** ```json { "mcpServers": { "memrio": { "url": "https://memrio.ai/api/mcp/acme", "headers": { "Authorization": "Bearer ${env:CONTEXT_REGISTRY_KEY}" } } } } ``` ### 2. Set the key Export CONTEXT_REGISTRY_KEY in your shell profile, or paste the key directly into the headers value if the file is not committed. **~/.zshrc** ```bash export CONTEXT_REGISTRY_KEY="mr_live_8f3a…" ``` ### 3. Enable in Cursor Open Cursor Settings → Tools & MCP. memrio appears with a green dot and its tools listed. Toggle it on if it is off. ### 4. Add a rule so the agent browses first A short always-on rule makes the agent check the registry before answering questions about your stack. **.cursor/rules/company-knowledge.mdc** ```bash --- alwaysApply: true --- Before answering anything about our company, products, or policies, call `browse` on the memrio server, open the pages whose use-when instructions match, and answer only from those pages. If nothing applies, say so. ``` ## Try it > Look up our API error-handling conventions in the registry, then refactor this handler to match. ## FAQ **Does Cursor support remote MCP servers with an Authorization header?** Yes. Give the server a url and a headers object in .cursor/mcp.json. Cursor speaks Streamable HTTP and sends the headers on every request. **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. --- # Memrio for Windsurf > Cascade can plan across your whole repo — now let it plan with your company’s approved knowledge too. Add the registry once in mcp_config.json and Cascade browses your page set whenever a task touches policy, architecture, or process. ## Why - **Cascade reads the runbook** — Ops steps and coding standards become pages the agent can open, not a PDF nobody attaches. - **Governed by default** — Only published pages in the agent page set are visible. Drafts stay private. - **Auditable** — Every browse and get_page call shows up in the request log with latency and pages hit. ## Setup ### 1. Open the MCP config In Windsurf go to Settings → Cascade → MCP Servers → View raw config, or edit ~/.codeium/windsurf/mcp_config.json directly. ### 2. Add the server Windsurf uses serverUrl for remote servers. Headers are sent with every request. **~/.codeium/windsurf/mcp_config.json** ```json { "mcpServers": { "memrio": { "serverUrl": "https://memrio.ai/api/mcp/acme", "headers": { "Authorization": "Bearer mr_live_8f3a…" } } } } ``` ### 3. Refresh and test Click Refresh in the MCP panel. Ask Cascade something your registry answers and watch it call browse, then get_page. ## Try it > Browse the registry for our database migration policy before you write this migration. ## FAQ **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. --- # Memrio for GitHub Copilot in VS Code > Copilot agent mode discovers MCP servers from .vscode/mcp.json. Add the registry with a prompted secret, commit the file, and every contributor’s Copilot reads the same approved engineering knowledge. ## Why - **Commit the config, not the key** — VS Code prompts each developer for the key once and stores it securely. - **Works in agent mode** — Copilot lists browse, search_pages, and get_page as tools it can call while it works. - **Governed source** — The team edits pages in the registry; Copilot only reads what a reviewer published. ## Setup ### 1. Create .vscode/mcp.json Use an input so the key is prompted instead of committed. **.vscode/mcp.json** ```json { "inputs": [ { "type": "promptString", "id": "memrio-key", "description": "Memrio agent API key", "password": true } ], "servers": { "memrio": { "type": "http", "url": "https://memrio.ai/api/mcp/acme", "headers": { "Authorization": "Bearer ${input:memrio-key}" } } } } ``` ### 2. Start the server Open the file and click Start above the server entry, or run MCP: List Servers from the command palette. Paste the key when prompted. ### 3. Use it in Copilot Chat Switch Copilot Chat to Agent mode. The registry tools appear under the tools picker. Ask a question and Copilot browses the page set first. ## Try it > Use the memrio tools to find our logging standards, then update this service to follow them. ## FAQ **Does VS Code support HTTP MCP servers?** Yes. Set "type": "http" with a url and optional headers in .vscode/mcp.json. Inputs let you prompt for secrets instead of committing them. **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. --- # Memrio for Gemini CLI > Gemini CLI runs in your terminal and picks up MCP servers from settings.json. Point it at the registry and it can browse your approved pages while it works through a task. ## Why - **Terminal-native context** — Pages arrive as plain text with their instruction blocks — ideal for a CLI agent. - **Per-project or global** — Use .gemini/settings.json in a repo or ~/.gemini/settings.json for everything. - **Governed and logged** — Only published pages, and every call recorded in the agent’s request log. ## Setup ### 1. Edit settings.json Gemini CLI uses httpUrl for Streamable HTTP servers. Add the Authorization header alongside it. **~/.gemini/settings.json** ```json { "mcpServers": { "memrio": { "httpUrl": "https://memrio.ai/api/mcp/acme", "headers": { "Authorization": "Bearer mr_live_8f3a…" } } } } ``` ### 2. Check the connection Start gemini and run /mcp. memrio should list its tools. **terminal** ```bash gemini > /mcp ``` ### 3. Add a standing instruction Put the browse-first rule in GEMINI.md so the agent checks the registry before it answers. **GEMINI.md** ```bash Before answering anything about our company, products, or policies, call `browse` on the memrio server, open the pages whose use-when instructions match, and answer only from those pages. If nothing applies, say so. ``` ## Try it > Browse the registry for our release checklist and run through it for version 2.4. ## FAQ **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. --- # Memrio for the OpenAI Agents SDK > Building agents on the OpenAI Agents SDK? Attach the registry as an MCP server and your agent inherits a governed page set with no retrieval pipeline to maintain. Python and TypeScript both work. ## Why - **Skip the RAG pipeline** — No chunking, no vector store to babysit. The agent browses titles and use-when instructions, then opens whole pages. - **Governance lives outside the code** — Product and ops teams edit pages and approve changes. Your agent code never redeploys for a policy update. - **Instructions travel with content** — Critical instruction blocks arrive inside get_page so the model applies rules where they matter. ## Setup ### 1. Python — connect over Streamable HTTP Pass the URL and Authorization header in params. The server handles session setup. **agent.py** ```python from agents import Agent, Runner from agents.mcp import MCPServerStreamableHttp async def main(): async with MCPServerStreamableHttp( name="memrio", params={ "url": "https://memrio.ai/api/mcp/acme", "headers": {"Authorization": "Bearer mr_live_8f3a…"}, }, ) as registry: agent = Agent( name="Support", instructions=( "Browse the memrio page set first. " "Answer only from the pages you open." ), mcp_servers=[registry], ) result = await Runner.run(agent, "What is our refund window?") print(result.final_output) ``` ### 2. TypeScript — hosted MCP tool Let the Responses API call the registry directly so tool round-trips never leave OpenAI’s side. **agent.ts** ```ts import { Agent, hostedMcpTool, run } from '@openai/agents'; const agent = new Agent({ name: 'Support', instructions: 'Browse the memrio page set first. Answer only from the pages you open.', tools: [ hostedMcpTool({ serverLabel: 'memrio', serverUrl: 'https://memrio.ai/api/mcp/acme', headers: { Authorization: 'Bearer mr_live_8f3a…' }, requireApproval: 'never', }), ], }); const result = await run(agent, 'What is our refund window?'); console.log(result.finalOutput); ``` ## Try it > What is our refund window for annual plans? ## FAQ **Do I still need embeddings or a vector database?** Not for the registry. Pages are curated and small enough to read whole. The agent picks pages by title and use-when instruction, which is more predictable than similarity search for policy content. **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. --- # Memrio for the Vercel AI SDK > Turn the registry into tools for generateText and streamText in a few lines. The AI SDK’s MCP client discovers browse, search_pages, and get_page and hands them to whichever model you run. ## Why - **Model-agnostic** — Swap providers freely. The registry tools are the same for every model. - **Streams cleanly** — Tool calls show up in streamText so your UI can show “Reading Refund policy…” while the agent works. - **Governed content** — Your product answers from pages someone approved — and you can prove it from the request log. ## Setup ### 1. Install the MCP client The MCP client ships as its own package alongside ai. **terminal** ```bash pnpm add ai @ai-sdk/mcp ``` ### 2. Create the client and pass tools to the model Use the http transport with an Authorization header. Close the client when the request finishes. **route.ts** ```ts import { createMCPClient } from '@ai-sdk/mcp'; import { generateText } from 'ai'; const registry = await createMCPClient({ transport: { type: 'http', url: 'https://memrio.ai/api/mcp/acme', headers: { Authorization: 'Bearer mr_live_8f3a…' }, }, }); try { const tools = await registry.tools(); const { text } = await generateText({ model: 'openai/gpt-5', system: 'Browse the memrio page set first. Answer only from the pages you open.', tools, prompt: 'What is our refund window for annual plans?', }); console.log(text); } finally { await registry.close(); } ``` ## Try it > What is our refund window for annual plans? ## FAQ **Can I limit which tools the model sees?** Yes. Pick from the object returned by registry.tools() before passing it to the model — for example only browse and get_page for a read-only assistant. **Does Memrio need a workspace or page-set header?** No. The API key is scoped to one workspace and one agent page set, so the key alone tells the server what the agent may read. Send only the Authorization header. **Which pages can the agent see?** Only published pages inside the agent page set you configured. Drafts and pages waiting on review are hidden unless you turn on "Read drafts" for a test agent. **Can the agent edit pages?** Only if you enable "Can edit pages" on that agent. It then gets get_page_source, create_page, update_page, and append_to_page. Edits are submitted as versions for human review unless the agent is also allowed to publish. ---