This repository provides everything you need to deeply integrate TwinMind into your Zo Computer. By installing this skill, your Zo AI can naturally query TwinMind memories, search meeting transcripts, pull action items, and create daily digest summaries. It can also act as an MCP server using mcporter.
- Search meetings and tasks: Ask Zo to recall past conversations.
- Fetch transcripts: Grab the complete transcript of any meeting natively.
- Automated Backups: Dump TwinMind data to local markdown files automatically.
- Daily Digests: Build scheduled workflows to give you a daily breakdown.
- MCP Server Support: Tools are exposed via mcporter for standard agent interactions.
- Create a directory on your Zo at
/home/workspace/Skills/twinmind. - Copy the
SKILL.mdfile from this repo into that directory. - Copy the
scripts/directory into/home/workspace/Skills/twinmind/scripts.
🤖 For Zo AI Agents: Automated Setup Instructions If you are an AI assistant helping a user install this skill, please perform the following setup steps automatically:
- Ask the user for their Zo handle and their preferred model ID (if they don't know the model ID, ask them to check Settings > AI > Models, or use their currently active model ID if available in your context).
- Replace placeholders:
- Find all instances of
<your-handle>or<your-zo-handle>inSKILL.mdandREADME.mdand replace them with the user's actual Zo handle.- Find
<your-model-id-here>inscripts/fetch_twinmind_digest.tsand replace it with the user's preferred model ID.
The OAuth client ID included in this repository (mcp-client-qoy8xxYPyku_nYGkYiulrg) is pre-registered with TwinMind for specific callback URLs. OAuth requires that redirect URIs be explicitly registered with the client ID for security reasons.
- If your Zo Space callback URL (
https://<your-handle>.zo.space/api/twinmind-callback) is not in the pre-registered list, you will get an "Invalid redirect_uri" error during authentication - This is a security feature of OAuth, not a bug
Option 1: Request Your URL Be Added (Easiest) Contact TwinMind support and ask them to add your callback URL to the allowed list:
https://<your-handle>.zo.space/api/twinmind-callback
Include the client ID: mcp-client-qoy8xxYPyku_nYGkYiulrg
Option 2: Get Your Own OAuth Credentials If you have access to TwinMind's developer portal or API:
- Create your own OAuth client/app in TwinMind
- Register your callback URL:
https://<your-handle>.zo.space/api/twinmind-callback - Update the
clientIdvariable inscripts/twinmind.tswith your new client ID - Proceed with authentication using your own credentials
TwinMind uses OAuth to securely authenticate. You need to create an endpoint on your Zo Space to receive the callback.
- Tell Zo to open your Zo Space Routes (or navigate to it).
- Ask Zo to create a new API route at
/api/twinmind-callbackwith the following code:
import type { Context } from "hono";
// This route captures the OAuth authorization code from TwinMind
export default async (c: Context) => {
const code = c.req.query("code");
const state = c.req.query("state");
const error = c.req.query("error");
if (error) {
return c.html(`<html><body><h1>Error</h1><p>${error}</p></body></html>`);
}
if (!code) {
return c.html(`<html><body><h1>Error</h1><p>No authorization code received</p></body></html>`);
}
// Store the code in a simple in-memory store so Zo can retrieve it
const fs = await import("fs");
const data = JSON.stringify({ code, state, timestamp: Date.now() });
fs.writeFileSync("/tmp/twinmind_oauth_code.json", data);
return c.html(`
<html>
<body style="font-family: sans-serif; max-width: 600px; margin: 40px auto; text-align: center;">
<h1>TwinMind Connected!</h1>
<p>Authorization code received. You can close this tab and return to Zo.</p>
</body>
</html>
`);
};To connect your account, you will perform the PKCE auth flow.
Auth Domain: https://api.thirdear.live (TwinMind's OAuth endpoint)
Simply ask Zo to:
"Run the initial TwinMind authentication flow and generate the auth URL."
- Zo will generate an auth URL using the PKCE flow with the correct domain (
api.thirdear.live). Open it in your browser and sign in. - The browser will redirect to
https://<your-handle>.zo.space/api/twinmind-callback, and you'll see a success message. - Tell Zo to complete the flow: "Exchange the captured TwinMind auth code for a token."
- Zo will read
/tmp/twinmind_oauth_code.jsonand save the credentials to/home/workspace/.secrets/twinmind_token.json(locked down with 600 permissions).
Note: TwinMind refresh tokens expire periodically. When they do, the CLI will alert Zo, and you simply run this authentication process again.
If you want to use mcporter to serve these TwinMind tools to external clients (or natively inside Zo), edit your /home/workspace/config/mcporter.json to register the tools.
Zo can do this for you:
"Add the TwinMind CLI script to my mcporter configuration as an MCP server."
Example usage once configured:
npx mcporter call twinmind.summary_search keywords='["project"]' limit=5(Note: TwinMind's direct MCP endpoint relies on HTTP POST requests. If you encounter SSE content-type errors with mcporter, stick to using the CLI script directly which handles the protocol natively).
The script provides a native backup and digest CLI tool. You can ask Zo to create a Scheduled Agent to run daily.
- Go to your Agents page in Zo.
- Create an agent that runs daily at a specific time.
- Set the agent's prompt to:
"Run the TwinMind backup command using
bun run /home/workspace/Skills/twinmind/scripts/twinmind.ts backup. Check for any errors. If successful, run the digest command and send me a Telegram message summarizing my action items for the day."
You or Zo can use the CLI directly in the terminal:
# Refresh the access token
bun run Skills/twinmind/scripts/twinmind.ts refresh
# Search meetings and tasks
bun run Skills/twinmind/scripts/twinmind.ts search "keyword"
# Search meeting summaries specifically
bun run Skills/twinmind/scripts/twinmind.ts meetings --keywords "planning,launch"
# List action items (todos)
bun run Skills/twinmind/scripts/twinmind.ts todos
# Fetch full content by ID
bun run Skills/twinmind/scripts/twinmind.ts fetch "summary-<id>"
# Backup all meetings to markdown files
bun run Skills/twinmind/scripts/twinmind.ts backup
# Generate daily digest (defaults to today)
bun run Skills/twinmind/scripts/twinmind.ts digest 2026-03-03This integration saves all tokens in your secure ~/.secrets folder. It uses Zo's internal filesystem to store local backups and limits public exposure via Zo Space callback routes.