# UseMyContext - Deep SDK + MCP Reference > The long-form companion to /llms.txt, written for AI coding assistants building with the UseMyContext SDK and MCP tools. Every signature, type, and example below is grounded in the shipped source. For the high-level site map, see https://usemycontext.ai/llms.txt. UseMyContext is a structurally-blind, third-party service for one person's personal context. A user curates their compiled context once, then connects any AI client (Claude, ChatGPT, Gemini, Perplexity) or your own app over MCP. The public surface is structurally blind: it physically cannot read the user's file content. You ship the integration; UseMyContext holds and serves the user's context, and the user controls and can revoke it. There are two ways to build: - The MCP surface (7 tools over Streamable HTTP at https://mcp.usemycontext.ai/mcp). Any MCP-speaking client can use it directly. - The npm SDK (`usemycontext`), a typed client + React hook that wraps those 7 tools for JS/TS apps. Scope is ALWAYS the authenticated user. It is resolved server-side from the token, never passed as a tool argument. Every tool is read-only except `suggest_update`, which only files a PENDING proposal for the user to review - nothing is ever written to the user's files. -------------------------------------------------------------------------------- ## Install ```bash npm i usemycontext ``` - Package: `usemycontext` (version 1.0.4 at time of writing). - ESM + CJS, with bundled TypeScript declarations. - The core entry is framework-free. The React hook + button live behind the `usemycontext/react` subpath, gated by an OPTIONAL `react` peer dependency (>=17), so importing the core entry never pulls React in. - Exports: - `usemycontext` -> the framework-free client factory + types + errors. - `usemycontext/react` -> the React hook and the drop-in button. -------------------------------------------------------------------------------- ## Quickstart - React The React hook is `useMyContextReact()` (imported from `usemycontext/react`). It creates one stable client per component instance and re-renders on every connection-state change. ```jsx import { useMyContextReact } from "usemycontext/react"; // The user supplies their UseMyContext token (they grab one at // usemycontext.ai/#/connect). This component connects, then drops the user's // compiled context + relevant passages into a system prompt. function Assistant({ token }) { const { state, connected, connect, client } = useMyContextReact(); async function run() { await connect({ token }); // v1 is TOKEN-IN const { composite } = await client.profile(); // the user's compiled context const { passages } = await client.ask("what should I keep in mind?"); const systemPrompt = `You are helping a specific person. Their context:\n${composite}\n\n` + `Relevant notes:\n${passages.map((p) => p.text).join("\n")}`; console.log(systemPrompt); // -> hand this to your LLM } return ( ); } ``` `useMyContextReact(options?)` returns: ```ts interface UseMyContextReactValue { state: ConnectState; // re-renders on change connected: boolean; // state === "connected" token: string | null; // the held token, else null client: UseMyContextClient; // the 7 tool wrappers live here connect: (args: { token: string }) => Promise; disconnect: () => void; } ``` There is also a zero-config drop-in button. It renders one `