SourceAnt Memory Docs
Everything you need to give your AI tools persistent project context.
Quick Start
Get context flowing to your AI tools in three steps:
Sign in and connect a repository
Go to the dashboard and connect your GitHub repository. Memory will analyze the codebase and generate initial context proposals.
Review proposals
AI-generated context proposals appear on the Proposals page. Approve, edit, or reject them. Approved proposals become active context objects.
Configure the MCP server
Run npx @sourceant/memory setup --token YOUR_TOKEN in your project directory, or manually add the config to your AI tool. Context flows automatically when your AI touches relevant code.
MCP Setup
The fastest way to get started — run this in your project directory:
npx @sourceant/memory setup --token YOUR_TOKENThis configures the MCP server and sets up automatic context retrieval for any MCP-compatible tool (Claude Code, Claude Desktop, VS Code, Cursor, Windsurf, etc.).
Manual configuration
Alternatively, add the following to your MCP client configuration:
{
"mcpServers": {
"sourceant-memory": {
"command": "npx",
"args": ["-y", "@sourceant/memory"],
"env": {
"SOURCEANT_TOKEN": "<your-token>"
}
}
}
}Get your token from the Settings page in the dashboard.
MCP Tools
get_context
Retrieves relevant context before modifying code. Returns decisions, constraints, and workarounds that apply to the specified files or symbols.
| Parameter | Type | Description |
|---|---|---|
| paths | string[] | File paths being modified |
| symbols | string[] | Function or class names being modified |
| intent | string | What you're trying to accomplish |
| repo | string | Repository in owner/name format (optional) |
get_context({
paths: ["src/api/auth/login.ts"],
symbols: ["validateToken"],
intent: "refactoring error handling"
})propose_context
Proposes a new context object for human review. Use when you discover important constraints or decisions during a coding session.
| Parameter | Type | Description |
|---|---|---|
| kind | string | One of: decision, constraint, workaround, convention, plan |
| summary | string | One-line summary of the context |
| why | string | Detailed explanation of why this matters |
| repo | string | Repository in owner/name format (required) |
| scope | object | Paths and symbols this context applies to |
propose_context({
kind: "decision",
summary: "Use JWTs for API auth",
why: "Stateless auth allows horizontal scaling without session storage.",
repo: "myorg/myapp",
scope: {
paths: ["src/auth/"],
symbols: ["authenticate", "verifyToken"]
}
})Context Kinds
A deliberate choice made by the team. Example: "Use PostgreSQL JSONB for flexible schema storage."
An external limitation that affects implementation. Example: "API rate limit of 100 req/min on the payments provider."
A temporary solution for a known issue. Example: "Retry with exponential backoff due to upstream flakiness."
A team standard or pattern. Example: "All API responses use the envelope format with data/error/meta keys."
Something planned or intended for the future. Example: "Migrate from REST to GraphQL in Q3 starting with the read endpoints."
Organization Contexts
Organization contexts apply across all your repositories. Use them for team-wide standards like security practices, commit conventions, and testing guidelines.
Create and manage them from the Organization page in the dashboard. Tag contexts with categories like security, testing, or architecture for easy filtering.
Organization contexts are served alongside repository-specific contexts when your AI tools query Memory, ensuring team standards are always visible.
API Reference
The Memory API is available at /api/memory/. All endpoints require authentication via your SourceAnt session.
/api/memory/repos/{id}/contextsList context objects for a repository. Supports kind, status, and q query params.
/api/memory/repos/{id}/contextsCreate a new context object. Body: kind, summary, why, scope_paths, scope_symbols.
/api/memory/org/contextsList organization-wide context objects. Supports kind, status, and q query params.
/api/memory/org/contextsCreate an organization context. Body: kind, summary, why, scope_tags.
/api/memory/proposalsList all proposals across connected repositories.
/api/memory/proposals/{id}/approveApprove a proposal, creating an active context object from it.
/api/memory/proposals/{id}/rejectReject a proposal.