π§ Memory & MCP
Long-term memory recalls earlier facts with pgvector. MCP is optional and off by default. Neither is required to chat.
Two advanced layers, both optional in practice: Memory is on by default and needs OpenAI embeddings. MCP is off until you opt in.
You can leave MCP alone until you need it. Memory you only turn off if you do not want recall β or if you do not have an OpenAI key yet.
Memory
Let your product remember.
Memory lets the AI reuse relevant information from earlier interactions instead of treating every conversation as new. It is not the chat transcript. Transcripts already persist as messages. Memory is a smaller, searched set of facts about the user.
After a turn β extract facts β embed β agent_memory
Next question β retrieve similar rows β inject into the promptWhat you already have
| Piece | Detail |
|---|---|
| Store | agent_memory (pgvector 1536 + HNSW) |
| Search | match_agent_memory |
| Service | apps/api/app/services/memory_service.py |
| Tool | search_memory (same registry as other tools) |
| User toggle | Settings β AI β memory_enabled |
| Product flag | features.memory (default true) |
When it is retrieved: every chat turn, retrieve_relevant_memories runs before the model call.
When it is written: after the turn, an extraction prompt (EXTRACTION_SYSTEM_PROMPT in memory_service.py) proposes facts; they are saved if they are not near-duplicates.
Effective on/off: product flag and plan memory_enabled and the user toggle.
OpenAI required
Embeddings (and the extraction model default) go through OpenAI β the same constraint as RAG. Doctor requires OPENAI_API_KEY while features.memory is true.
What a builder changes
| Goal | Where |
|---|---|
| Disable for the product | features.memory: false |
| Change who gets memory | apps/api/app/plans/config.py |
| Extraction behavior | EXTRACTION_SYSTEM_PROMPT in memory_service.py |
| Match count / similarity | MEMORY_MATCH_COUNT, MEMORY_MATCH_THRESHOLD, MEMORY_DUPLICATE_THRESHOLD in apps/api/.env |
You usually do not replace the table. You tune prompts and whether the feature exists.
MCP
Connect external capabilities with MCP.
MCP (Model Context Protocol) lets the AI connect to compatible external tools and services through a standardized interface. In GoShipped it is an extension layer. Native chat, web research, URL reading, files, memory, and Deep Research all work with features.mcp set to false.
This is optional and advanced. Skip it for v1 unless you already have a server to attach.
Default: off
"features": { "mcp": false }Both shipped servers in apps/api/config/mcp_servers.yaml are enabled: false (website_reader, filesystem).
When the feature is off, the API never contacts MCP. Doctor skips the whole MCP group. Credentials are not required.
Turn it on
- Set
features.mcptotrue - Edit
apps/api/config/mcp_servers.yaml(or pointMCP_CONFIG_PATHat another file) - Set
enabled: trueonly on servers you actually run - Put secrets in
apps/api/.envβ reference them as${MCP_WEBSITE_READER_TOKEN}, never in the YAML
mcp_servers:
website_reader:
enabled: false
transport: http
url: https://website-reader-mcp.vercel.app/mcp/
headers:
Authorization: "Bearer ${MCP_WEBSITE_READER_TOKEN}"Plans also gate MCP (mcp_enabled: Free false, Pro true in the shipped catalog). A Free user will not see MCP tools even if the product flag is on.
Doctor and credentials
Verified in the current doctor:
| Situation | Credentials required? |
|---|---|
features.mcp is false | No |
MCP on, server enabled: false | No β that serverβs ${ENV} refs are ignored |
MCP on, server enabled: true | Yes β those env names must exist (local file or Vercel Production names) |
Production Doctor uses the same rule: only enabled servers, and only when the feature is on.
Native tools stay in apps/api/app/ai/tools/. Prefer a Python tool when the logic is yours. Use MCP when the capability already lives in another process. See Tools.