Step 1 of 6

Install

Create the project and connect txtscape to your IDE.

Create your project

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.

Configure your IDE

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"]
    }
  }
}
Other IDEs work too. See installation instructions for Cursor, Windsurf, Claude Desktop, and Claude Code.

Verify it works

Open the project in your IDE and start a new AI chat. Ask:

Tell your agent
"List the txtscape pages in this project."

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.

Initialise git

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"
⚠️
Do not gitignore .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.

What you have so far

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.

Notice what's not here. No random markdown files in your project root. No 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.
💡
Why this matters. Without txtscape, your agent forgets everything between conversations. You re-explain your project, your decisions, your architecture — every time. With txtscape, knowledge accumulates in your repo instead of evaporating.