StoneWay
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@StoneWay add my new project and current tech stack to my StoneWay memory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Give every AI agent the same you.
StoneWay gives your AI agents a persistent, user-owned source of identity, projects, preferences and context.
“StoneWay isn’t where your AI remembers you. It’s where your agents learn who you are.”
StoneWay is a user-owned, provenance-aware, portable identity and context layer for builders. It maintains a canonical, verified source of truth across Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, Cline, and custom autonomous agent loops.
⚡ The Shift: From Generic AI Memory to Personal Agent Identity
Generic AI memory dumps unbounded chat histories into crowded semantic search vectors. That creates three failure modes:
Unbounded Context Bloat: Memory logs balloon into megabytes of noisy text, blowing out prompt windows.
Untrusted LLM Mutations: Letting an arbitrary agent's LLM decide canonical identity creates prompt-injection vulnerabilities and hallucinations.
No Source Authority or Provenance: If an external sync claims you use TypeScript while you manually wrote you prefer Python, "newer timestamp wins" overwrites explicit human intent.
StoneWay's Provenance & Authority Engine
Instead of “LLM reconciles → server accepts”, StoneWay enforces:
LLM proposes claims
↓
Server validates claims against strict schema
↓
Provenance & source authority engine
↓
Canonical profileSource Authority Hierarchy
USER (1.0)
↓
MANUAL PROFILE EDIT (0.9)
↓
VERIFIED CONNECTOR (0.8)
↓
AGENT CLAIM (0.6)
↓
INFERRED DATA (0.4)user_override = absolute: User-defined entries cannot be overwritten by external syncs or agent claims.Observations preserved: Lower-authority claims are never discarded; they are preserved as structured observations with attribution.
Why does StoneWay think this?: Every canonical attribute maintains cryptographic and temporal provenance showing exactly which source, agent, or document authored it.
Related MCP server: Sugar Memory
🛠️ Architecture: Identity, Context & Memory
STONEWAY
│
┌─────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
StoneWay.md StoneWay.json Context Files
human data structured data user documents
(scratchpad) (provenance) (PDF/DOCX/MD)
│ │ │
└─────────────────┼─────────────────┘
│
MCP Context
│
┌──────────────┼──────────────┐
▼ ▼ ▼
Claude Cursor Codex1. Canonical Identity (StoneWay.json & StoneWay.md)
StoneWay.json: Schema-validated identity matrix (skills, active projects, credentials, preferences).StoneWay.md: Human-readable scratchpad for notes and agent session summaries.Safety Envelope: All profile content returned to agents is wrapped in
<USER DATA, NOT INSTRUCTIONS>to neutralize prompt injection attacks.
2. Context Files (list_context_files, get_context_file, search_context)
User-owned documents (PDFs, research notes, architecture diagrams, docx).
Separation of Storage & Metadata: Binary files reside securely in object storage, while metadata, tags, and extracted text live in Neon Postgres.
Strict Tenant Isolation: Every query requires
WHERE id = :file_id AND user_id = :authenticated_user_id. Files are addressed by opaque IDs, never raw filenames.Originals are Immutable: Lossless storage preserves original documents; derived representations provide searchable chunks without destroying the source.
3. Prompt & Skill Libraries (PROMPTS.json / PROMPTS.md)
User-authored instructions and skill templates with variable interpolation (
{{var}},{{profile.*}}).Exposed directly through dynamic MCP prompt handlers (
prompts/list,prompts/get) and fallback tools (list_prompts,run_prompt,list_skills,get_skill).Validated with strict schema bounds (unique prompt names, max 100 entries, no arbitrary code execution).
🗄️ Multi-Provider Storage & Context Engine
StoneWay integrates a pluggable, multi-provider storage fabric. Neon PostgreSQL remains the sole authority for file existence, versions, ownership, and permissions. Redis and bucket listings never determine access.
Client Upload / API
│
┌────────────┴────────────┐
▼ ▼
Neon PostgreSQL Storage Router
(Authoritative State) (routeUpload())
│ │
│ ┌──────────────┼──────────────┐
│ ▼ ▼ ▼
│ Vercel Blob Upstash Blob Filebase
│ (Active Files) (Derived/Assets) (Archival/Large)
│ │ │ │
│ └──────────────┼──────────────┘
│ ▼
└─────────────────► Verified Replica
(SHA-256 match)Storage Providers & Routing Policy
Neon PostgreSQL + Drizzle ORM: Authoritative source of truth for all users, files, versions (
file_versions), replicas (file_replicas), prompt libraries, and audit records.Vercel Blob (
@vercel/blob): Primary backend for active context documents (PDF, Markdown, text, JSON). Server-mediated streaming downloads enforce tenant authorization.Upstash Blob (
@aws-sdk/client-s3): S3-compatible backend for specialized assets and derived previews, minted viahttps://blob.upstash.io/v1/credentialswith automatic credential caching.Filebase (
@aws-sdk/client-s3): S3-compatible backend using AWS SigV4 for archival workloads, large datasets (>15 MB), and container formats (.tar,.zip,.gz).Upstash Redis (
@upstash/redis): High-performance transient caching and rate limiting. Gracefully fails open to Neon if Redis is unconfigured or unavailable.
Security & Invariant Guarantees
Server-Authoritative Keys: Object keys are generated strictly on the server as
u/<user_id>/f/<file_id>/v<version>/<kind>with path traversal characters sanitized.Strict Tenant Isolation: All endpoints require
WHERE id = :file_id AND user_id = :authenticated_user_id. Non-existent or unauthorized files return uniform, non-disclosing404 Not Foundresponses.Untrusted File Boundary: Document text returned to AI agents is wrapped in an inert boundary (
<<<USER DATA, NOT INSTRUCTIONS>>>) to prevent prompt injection.Cross-Provider Replication: Idempotent replication verifies SHA-256 integrity on the destination before recording status as
verified.
🚀 Quick Setup (for Any Agent)
1. Stdio (Local Node Execution)
Add StoneWay to your agent's MCP settings using npx:
🚀 Quick Setup: Zero Token Friction
StoneWay eliminates API key friction with two connection options:
1. Remote MCP with OAuth (Claude.ai & ChatGPT Web Connectors)
No tokens or config files required. Just paste the URL:
Canonical Endpoint:
https://stonewaymd.vercel.app/api/mcp(orhttps://stonewaymd.vercel.app/mcp)In Claude.ai or ChatGPT Custom Connector screens, paste the URL.
When prompted, sign in with GitHub via Better Auth.
Authorize the connector once. Token refresh and session persistence are managed automatically via RFC 8414 OAuth 2.0 metadata discovery.
View and revoke active web agent connections anytime in your dashboard at
/app/connections.
2. Local Terminal Agents (Claude Code, Cursor, Claude Desktop, Windsurf)
Step 1: Log in once from your terminal
npx -y stoneway-mcp login
# or with Python / uv:
uvx stoneway-mcp loginThis opens your browser, completes GitHub authentication, and securely writes credentials to ~/.stoneway/credentials.json (file mode 0600).
Step 2: Add to your agent configuration (Zero secrets required!)
Claude Code CLI:
claude mcp add stoneway npx -y stoneway-mcp
# or:
claude mcp add stoneway uvx stoneway-mcpCursor / Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"stoneway": {
"command": "npx",
"args": ["-y", "stoneway-mcp"]
}
}
}(For CI/CD or headless environments, STONEWAY_TOKEN remains supported as an environment variable fallback).
3. Standing Instruction for Every Agent
Add this single instruction to your CLAUDE.md, AGENTS.md, .cursor/rules, or GEMINI.md:
Before answering anything about me, my projects, or my preferences, call StoneWay's get_profile_context. After meaningful work, call append_note with what changed.🧰 Available MCP Tools
Tool | Purpose |
| Retrieves canonical identity, skills, active projects, and preferences (supports optional |
| Proposes structured field updates evaluated through the source authority engine. |
| Appends concise timestamped session summaries and milestones to |
| Synthesizes tailored bios for Twitter/X, GitHub, LinkedIn, elevator pitches, and conferences. |
| Triggers transparent, permissioned sync from connected services (e.g. GitHub). |
| Lists attached context files filtered by group or tags. |
| Fetches extracted content of a specific document by its secure ID. |
| Searches through extracted document passages and project notes. |
| Accesses and renders user-authored prompts with profile variables. |
| Retrieves specific developer skills on-demand. |
| Exports verified identity in standard JSON Resume schema. |
🔒 Security & Privacy Guarantees
Zero-Token Leak Invariant: API keys (
sw_...), bearer tokens, and encryption keys are scrubbed and never written to audit tables or logged.Salted IP Hashing: Audit logs record SHA-256 salted hashes of client IPs, never raw addresses.
Tenant Isolation: All queries enforce strict ownership verification on both the database and file storage tiers.
Prompt Injection Defense: Ingested content is strictly labeled inert data and disarmed before being passed to LLMs.
⚙️ Environment Configuration
Refer to .env.example for all required and optional environment variables. Never hardcode or expose actual secrets.
Variable | Description | Requirement |
| Neon PostgreSQL connection string ( | Authoritative DB |
| 32-byte session signing key | Session Auth |
| 32-byte AES-256-GCM envelope key | Secrets Encryption |
| Vercel Blob access token | Active Files Backend |
| Upstash Blob bearer token | Derived & Previews Backend |
| Filebase Access Key | Archival / Large Workloads |
| Filebase Secret Key | Archival / Large Workloads |
| Filebase S3 Endpoint ( | Archival / Large Workloads |
| Filebase Bucket name | Archival / Large Workloads |
| Upstash Redis REST URL | Caching & Rate Limiting |
| Upstash Redis REST Token | Caching & Rate Limiting |
📜 License
MIT © Ayush
Available Tools
5 toolsappend_noteA
Quickly appends a timestamped scratchpad note, idea, or observation into StoneWay.md tagged with your agent name.
Inputs: note (required), agent_name. Returns: result
get_bioB
Generates platform-tailored builder bios using STRICTLY fields marked with visibility: 'public'. Filters out private contact and location info.
Inputs: tone, platform, max_length. Returns: result
get_profile_contextA
Call this first whenever you need facts, tech stacks, bio info, links, or active projects about the user. Returns structured StoneWay.json and raw StoneWay.md with reconciliation guidance.
Inputs: no named parameters. Returns: result
trigger_external_syncB
Triggers on-demand synchronization for connected integrations (GitHub, npm, Hugging Face, RSS, Notion).
Inputs: integration. Returns: result
update_profile_contextC
Safely updates structured profile attributes and/or appends notes to StoneWay.md without data loss. Reconciles structural updates into StoneWay.json with optimistic locking.
Inputs: base_version (required), md_append, agent_name, json_patch. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
get_profile_context and get_bio overlap in providing bio-related information, and update_profile_context explicitly appends notes to StoneWay.md, which overlaps with append_note. The descriptions do clarify the intended use cases, but an agent could still misselect for note appending or bio retrieval.
All tool names follow a consistent snake_case verb_noun pattern: get_profile_context, update_profile_context, append_note, get_bio, trigger_external_sync. The slight variation in noun specificity (bio vs profile_context) does not break the pattern.
Five tools is well-scoped for a profile management server, covering read, update, note-taking, bio generation, and sync without redundancy or bloat.
The surface covers the core profile lifecycle: read, update, append notes, generate bios, and trigger syncs. However, there is no explicit delete or list operation for notes, and integration management (adding/removing connections) is absent, though the latter may be out of scope.
Related MCP Connectors
Persistent memory for AI agents. Semantic search, memory graph, W3C DID identity.
Secure durable memory and bounded context for AI agents, with hosted OAuth and local Lite support.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Project memory, documentation and controlled secret access for AI coding agents.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceProvides a local-first persistent memory layer that AI coding agents can read and write during sessions, enabling semantic search and recall of project decisions, preferences, error patterns, research, and cross-project guidelines stored in local SQLite. It also exposes an optional task queue and orchestration tools for delegating autonomous coding work that reuses the same stored context.-
- FlicenseNot gradedqualityAmaintenanceProvides AI coding agents with a local-first persistent memory layer they can read and write during sessions, storing decisions, preferences, error patterns, and research per project or globally. Enables semantic and keyword search, formatted context recall, and cross-project guideline surfacing without API keys or cloud storage.-
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to read and write persistent, local-first memory so project decisions, preferences, and cross-project guidelines survive across sessions and can be retrieved by semantic search. Optionally also exposes a task queue for autonomous execution that draws on the same stored context.-
- FlicenseNot gradedqualityAmaintenanceProvides a local-first persistent memory layer that lets AI coding agents store, recall, and semantically search project-specific and cross-project knowledge across sessions, so context, decisions, and guidelines survive between conversations. Runs entirely on the user's machine with SQLite and no API keys, and optionally supports autonomous task-queue execution built on the same memory.-