This page is about building Keystroke with an MCP client. It’s the reverse of giving your Keystroke agents tools from an external MCP server — for that, see MCP tools.
When to use MCP
Keystroke gives you two ways to build with AI:| MCP server (this page) | Local CLI | |
|---|---|---|
| Where you work | A chat-first agent (ChatGPT, Claude, Cursor) | Your own editor (Cursor, Claude Code) |
| Where code lives | A hosted Keystroke workspace | Your machine |
| Setup | Connect a URL, sign in once | npm i -g @keystrokehq/cli, scaffold a project |
| Best for | Building from chat with no local setup | Full control of files, git, and your editor |
Connect a client
Add the Keystroke MCP server to your client, then sign in. Authentication uses OAuth — there’s no API key to paste. The first time your client calls the server, it registers itself and opens a Keystroke login in your browser.- Cursor
- Claude
- ChatGPT
- Other clients
Add Keystroke to Open Cursor Settings → MCP, then click Login next to the Keystroke server to complete the OAuth flow.
~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):The build loop
Building over MCP follows the same deploy-first loop as the CLI: create or open a project, edit code in its workspace, run it to check the output, then deploy. Your agent drives this with MCP tools — you just describe what you want.Pick a project
The agent calls
list_organizations and list_projects, or create_project to start fresh. A new project comes with a hosted workspace and the Keystroke CLI ready to go.Run and inspect
exec_command runs shell commands in the workspace — including the keystroke CLI, which is authenticated automatically. The agent runs workflows and agents and reads the real output before wiring up dependent steps.Connect integrations
A workspace can’t open a browser, so when a build needs a connected app, the agent calls
connect_app to get a link. You open it to authorize the integration in the web app. See connect and manage apps.Deploy
deploy_project builds and ships the workspace to the platform, activating it in the cloud runtime — the same result as keystroke deploy. See deploy a project.Tools
The server exposes two groups of tools.Docs
Always available. These let your agent search and read the Keystroke documentation on demand — the same docs access the CLI exposes, served straight from the MCP server.| Tool | Description |
|---|---|
search_docs | Broad or conceptual lookups; returns matching pages and their paths. |
query_docs | Exact keyword/regex search and reading pages by path against the docs filesystem. |
Projects and workspaces
Tools for building in a hosted workspace. Every tool is scoped to your account and the projects you can access.| Tool | Description |
|---|---|
list_organizations | List organizations you belong to. |
list_projects | List projects you can access in an organization. |
create_project | Create a project, provision its workspace, and bootstrap the CLI. |
delete_project_workspace | Tear down a project’s workspace (keeps the project record). |
read_file | Read a file from the workspace. |
write_file | Write a file in the workspace. |
edit_file | Apply exact text replacements to a file. |
list_files | List files in a workspace directory. |
delete_file | Delete a file or directory. |
exec_command | Run a shell command (the keystroke CLI is pre-authenticated). |
deploy_project | Build and deploy the workspace to the platform. |
connect_app | Get a web link to connect an integration to the project. |
Next steps
CLI for agents
Build locally in your own editor with the Keystroke CLI.
Docs for agents
How your agent searches and reads the docs while it builds.
Build agents
Author agents, configure models, and add tools.
Deploy a project
How a workspace becomes a running cloud project.