teamshared

Rules for using the teamshared MCP server as persistent memory shared across sessions and code repositories. An MCP server is a service that gives an AI agent access to a specific capability.

In plain words
What is it for?
Using shared memory across sessions and repositories, managing authentication, and locating stored people, wiki, file, or project information.
Why use it?
They tell the agent how to connect, identify who saved information, find the right memory tools, and keep memory available between conversations.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/teamshared-ai/teamshared-plugin/teamshared
Clone the repo
git clone --depth 1 https://github.com/teamshared-ai/teamshared-plugin
Per session 1,873 This file is loaded in full into every session.
When invoked 1,873 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01873 $0.01873
Opus 5 $0.00937 $0.00937
Sonnet 5 $0.00375 $0.00375
Haiku 4.5 $0.00187 $0.00187

Measured yesterday against content hash de6bac5420e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

teamshared scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

rules/teamshared.mdc · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

teamshared Memory Protocol

The teamshared MCP server is your durable brain across sessions and repos. Authenticated identity sets write attribution; do not pass agent unless you intentionally override it or narrow a read filter. On Cursor desktop, connect with OAuth (Settings → Tools & MCP → Connect, email + OTP) — no API key in mcp.json. Grok Bot iOS native Connect is unsupported; sign in from Desktop Cursor instead. Cloud / Grok Bot agents inherit that account-level Connect; the one-time setup is Settings → Tools & MCP → teamshared → Connect. Durable backup if Connect does not follow the agent: one org tsk_ on the MCP headers (Authorization: Bearer tsk_…), same as Codex. Do not call mcp_auth as the first hop — it is a last-resort fallback after initialize when the host has no token. Other harnesses use a tsk_* bearer. Point humans at the console (/app) for sign-in, wiki, people, and keys.

Unsure which tool? Call memory_tools_catalog(need="<intent>") — do not scan every MCP descriptor, and do not call scope="memory", tier="core" as the only discovery path (that hides files and projects).

Staying current

On the first turn of a chat (or when the user asks about teamshared versions), call version with this rule's frontmatter version (1.23.0) as installed_rule_version. Do not call version every turn. If update_available: true, write the returned rule_markdown verbatim to ~/.cursor/rules/teamshared.mdc (or .cursor/rules/teamshared.mdc in a repo) and tell the user the memory rule was updated. Never invent a version.

Every turn

Run in order:

  1. memory_session_ensure(repo=..., topic=..., fresh=<first turn>, user=<request>) — recovers or rotates the session and appends the substantive user request. fresh=true only on the first turn of a new chat (or a clear mid-chat pivot). Adopt a non-empty soul (private human) and agent_memory (org-shared Agent entity) from the ensure payload.
  2. memory_recall(...) for keyword search (architecture, debugging, past work). Named playbook/skill/entity → get-by-name, not recall.
  3. Do the work.
  4. context_commit(summary=..., facts=[...], repo=..., github=..., close=<done?>) — last MCP call of the turn. close=true when the task is done or the user says goodbye (queues distillation). Adopt reopened: true session ids.

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 160 lines · 1,873 tokens per session scan A de6bac5420e0

Subscribe to this mod's changes

teamshared is a cursor rule published in the GitHub repository teamshared-ai/teamshared-plugin (0 stars, last pushed yesterday), licensed MIT. It adds 1,873 tokens to every session, about $0.0094 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.