pieces-mcp
Skill4 starsChanged 8 months agoMITView on GitHub
Connect ArgentOS to Pieces long-term memory via MCP. Query past activity, create durable memories, and search across devices using PiecesOS.
- Installs packages
- Sends data out
In this repository50 other files it gives its agents.
- model-usage/CLAUDE.mdCLAUDE.md
- peekaboo/CLAUDE.mdCLAUDE.md
- apple-notesSkill
- apple-remindersSkill
- autonomous-unblockSkill
- bear-notesSkill
- birdSkill
- blogwatcherSkill
- blucliSkill
- camsnapSkill
- coolifySkill
- easydmarcSkill
- eightctlSkill
- email-deliverySkill
- food-orderSkill
- geminiSkill
- gifgrepSkill
- githubSkill
- gogSkill
- goplacesSkill
- himalayaSkill
- imsgSkill
- local-placesSkill
- mcporterSkill
- model-usageSkill
- namecheapSkill
- nano-pdfSkill
- notebooklm-researchSkill
- notionSkill
- obsidianSkill
- openai-image-genSkill
- openai-whisperSkill
- openhueSkill
- oracleSkill
- ordercliSkill
- peekabooSkill
- railwaySkill
- sagSkill
- send-payloadSkill
- skill-creatorSkill
- slack-signal-monitorSkill
- songseeSkill
- sonoscliSkill
- spotify-playerSkill
- summarizeSkill
- twilioSkill
- vercelSkill
- video-framesSkill
- vip-emailSkill
- weatherSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 48
Ask the human to confirm:
- Distinctive: line 84
If you get 404, 502, or timeout — the tunnel is down.
- Very specific: line 88
Add the Pieces MCP server to ~/.argentos/argent.json under gateway.mcp.servers:
- Distinctive: line 166
Write a durable memory:
- Distinctive: line 187
Search tools (names vary by PiecesOS version) provide keyword-based search across all captured context.
- Distinctive: line 195
Ask the human for a fresh tunnel URL
- Very specific: line 199
Check ~/.argentos/argent.json has the gateway.mcp.servers.pieces entry
- Very specific: line 200
Verify mcp-remote is installed: mcp-remote --help
- Distinctive: line 201
Test the MCP URL directly with curl (Step 3)
- Very specific: line 202
Check gateway logs: grep pieces /tmp/argent/argent-*.log
- Distinctive: line 207
Add time: "What did I work on this morning?"
- Distinctive: line 208
Add topic: "What have I done on the website project?"
- Distinctive: line 209
Add context: "What debugging steps did I try for the login bug?"
- Distinctive: line 217
If MCPorter/mcp-remote isn't working, test the MCP server directly:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pieces MCP Skill for ArgentOS
Connect ArgentOS to Pieces long-term memory via MCP. Pieces captures ambient context (browser, clipboard, meetings, code) across devices. This skill teaches you how to wire it into ArgentOS so you can query that memory and create durable summaries.
When to Use This Skill
Trigger when:
- The human mentions Pieces, PiecesOS, or long-term memory
- They want cross-device memory: "What did I work on today?"
- They say "Hook up to my Pieces" or "Ask Pieces"
- You see an HTTPS tunnel URL for a Pieces MCP server
Architecture
Three components:
- PiecesOS MCP server — runs on the human's machine with Long-Term Memory (LTM) enabled. Exposed via HTTPS tunnel.
- ArgentOS gateway — this machine. Connects to the Pieces MCP server via
gateway.mcp.serversconfig. - Bridge: mcp-remote — npm package that connects to the remote
/mcpendpoint and exposes it locally as a stdio MCP server.
Important: This integration is MCP-only. Always use
/mcp, never/sse.
Setup Guide
Step 1: Confirm PiecesOS Is Running
Ask the human to confirm:
"Make sure PiecesOS is installed and running on your machine (or remote machine), and that Long-Term Memory (LTM) is enabled in the Pieces Desktop App."
Step 2: Get the Tunnel URL
The human needs to expose PiecesOS's MCP server via HTTPS:
For ngrok:
"On the machine running PiecesOS, run:
ngrok http 39300Paste the HTTPS forwarding URL here (e.g.,
https://abc123.ngrok-free.dev)."
For custom tunnels: Any HTTPS URL that forwards to localhost:39300 works.
Step 3: Verify the MCP Endpoint
Construct the MCP URL:
MCP_URL = <tunnel_url>/model_context_protocol/2025-03-26/mcpQuick sanity check:
curl -i "<MCP_URL>"Expected: HTTP 400 with "mcp-session-id header or sessionId query parameter is required". This means the server is alive and ready.
If you get 404, 502, or timeout — the tunnel is down. Ask the human to check PiecesOS and the tunnel.
Step 4: Configure ArgentOS
Add the Pieces MCP server to ~/.argentos/argent.json under gateway.mcp.servers:
{
"gateway": {
"mcp": {
"servers": {
"pieces": {
"command": "mcp-remote",
"args": ["<MCP_URL>"]
}
}
}
}
}Example with ngrok:
{
"gateway": {
"mcp": {
"servers": {
"pieces": {
"command": "mcp-remote",
"args": ["https://abc123.ngrok-free.dev/model_context_protocol/2025-03-26/mcp"]
}
}
}
}
}Step 5: Install mcp-remote
npm install -g mcp-remote@0.1.38Step 6: Restart the Gateway
argent gateway restartThe Pieces MCP tools are now available to all agent sessions.
Available Tools
Once connected, three Pieces tools become available:
ask_pieces_ltm
Query long-term memory with a natural language question:
{
"name": "ask_pieces_ltm",
"arguments": {
"question": "What did I work on today?",
"chat_llm": "gpt-4"
}
}Returns summaries[] and events[] as structured JSON. Parse this and synthesize a natural language answer for the human.
Use for:
- "What did I work on today / this week?"
- "What did we discuss in the standup?"
- "What debugging steps did I try last time?"
When you answer, attribute it:
"According to your Pieces long-term memory, ..."
create_pieces_memory
Write a durable memory:
{
"name": "create_pieces_memory",
"arguments": {
"summary_description": "Profile: Jason — MSP Owner",
"summary": "# Profile: Jason\n\n## Role\nMSP owner, AI developer\n\n## Current Focus\nArgentOS development",
"project": "ArgentOS"
}
}Use for:
- Human profile (name, role, preferences)
- Decision summaries
- Debugging recaps
- Project milestones
Full-Text Search Tools
Search tools (names vary by PiecesOS version) provide keyword-based search across all captured context.
Troubleshooting
MCP URL returns 404/502/timeout
- Confirm PiecesOS is running on the remote machine
- Confirm the tunnel is active (
ngrokmay have restarted) - Ask the human for a fresh tunnel URL
Tools not appearing after gateway restart
- Check
~/.argentos/argent.jsonhas thegateway.mcp.servers.piecesentry - Verify
mcp-remoteis installed:mcp-remote --help - Test the MCP URL directly with curl (Step 3)
- Check gateway logs:
grep pieces /tmp/argent/argent-*.log
ask_pieces_ltm times out or gives vague answers
Narrow the query:
- Add time: "What did I work on this morning?"
- Add topic: "What have I done on the website project?"
- Add context: "What debugging steps did I try for the login bug?"
Raw JSON responses
This is normal. Pieces returns structured JSON with summaries[] and events[]. You (the agent) parse it and synthesize a natural language answer. The raw JSON is not an error.
Direct Testing (Debugging Only)
If MCPorter/mcp-remote isn't working, test the MCP server directly:
Create init.json:
{
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"protocolVersion": "0.1.0",
"capabilities": {},
"clientInfo": { "name": "argentos-agent", "version": "1.0" }
},
"id": "1"
}curl -i -X POST "<MCP_URL>" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "mcp-session-id: init-001" \
--data-binary @init.jsonExtract the mcp-session-id from the response headers (13-digit timestamp like 1774202062499). Use that for all subsequent requests.
Common mistakes: Use
--data-binary @file.json(not inline-d), use string IDs ("id": "1"not"id": 1), always include bothContent-TypeandAcceptheaders.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

