Step 1 of 6
Create the project and connect txtscape to your IDE.
mkdir labyrinth
cd labyrinth
npm init -y
touch index.html
That's your whole project: a folder with a package.json and an empty
index.html. The game will live in that one HTML file.
txtscape is an MCP server — it runs alongside your IDE and gives your AI agent tools to read and write project knowledge. You don't install it globally. Your IDE starts it automatically.
Create the MCP configuration:
.vscode/mcp.json
{
"servers": {
"txtscape": {
"command": "npx",
"args": ["-y", "@txtscape/mcp@latest"]
}
}
}
Open the project in your IDE and start a new AI chat. Ask:
The agent should respond saying there are no pages yet, or show an empty listing. If it can see the txtscape tools, you're ready.
If the agent doesn't recognize txtscape, reload your IDE window and try again. The MCP server needs a moment to initialize on first run.
txtscape pages are designed to be committed to version control alongside your code. Start a git repository now so every step of the tutorial is captured in history:
git init
git add -A
git commit -m "initial project setup with txtscape"
.txtscape. The whole point is that
pages live in your repo — versioned, diffable, reviewable in PRs. If you
gitignore .txtscape/, your agent's memory disappears for every other
developer and every CI run.
labyrinth/
├── .vscode/
│ └── mcp.json
├── index.html (empty)
└── package.json
No game yet. No content. Just a project wired up to an AI agent that can remember things. Next, you'll teach it the shape of your world.
MEMORY.md,
no DECISIONS.md, no AI_CONTEXT.md. When txtscape
starts writing knowledge, it all goes into .txtscape/ —
one folder, totally out of the way.