Skip to content

Commit 8f024bd

Browse files
committed
Adjust language
1 parent 983a8fd commit 8f024bd

1 file changed

Lines changed: 90 additions & 70 deletions

File tree

‎docs/mcp-server/index.md‎

Lines changed: 90 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
---
22
title: MCP server
3-
description: Connect popular IDEs and AI clients to the Nordcraft MCP server to securely find, inspect, and update your Nordcraft projects.
3+
description: Connect popular AI tools to Nordcraft so they can help you find projects, review changes, validate files, and make updates.
44
---
55

66
# MCP server
77

8-
The Model Context Protocol (MCP) is an open standard that lets AI applications connect to external tools and data. With the Nordcraft MCP server, you can use an MCP-compatible AI client to find your projects, inspect branches and project files, validate changes, and edit Nordcraft projects.
8+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is an open standard that connects AI assistants and coding tools to other services. With the Nordcraft MCP server, you can ask your AI tool to find your projects, explore branches, review or change files, and check your work.
99

10-
The server is hosted by Nordcraft and uses the remote [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-06-18/basic/transports). It authenticates each user through an interactive OAuth 2.0 authorization-code flow with Proof Key for Code Exchange (PKCE).
10+
The connection is hosted by Nordcraft. When you set it up, you sign in to Nordcraft in your browser and choose which permissions to approve. You never need to copy your Nordcraft password or another secret into your AI tool.
1111

12-
## Connect an MCP client
12+
## Connect your AI tool
1313

14-
You need an MCP client that supports remote Streamable HTTP servers and interactive OAuth. You also need access to the Nordcraft projects and organizations that you want the client to use.
14+
You need an AI tool that supports MCP connections, such as one of the tools listed below. You also need access to the Nordcraft projects and organizations that you want to use.
1515

16-
Use the following server URL in your MCP client:
16+
All of the setup instructions use the same Nordcraft server address:
1717

1818
```text
1919
https://api.nordcraft.com/mcp
2020
```
2121

22-
After you add the server configuration, start the connection or use the client's authentication action. A browser window opens so you can sign in to Nordcraft, review the requested permissions, and approve access. The client stores the returned access token for future requests.
22+
Many AI tools let you add a server from a settings screen. If yours does, paste the address there. The examples below are only needed when your tool asks you to edit a settings file.
23+
24+
After you add the address, your AI tool will ask you to connect. A browser window opens so you can sign in to Nordcraft, review the requested permissions, and approve access. Once approved, your AI tool can use the connection for future requests.
2325

2426
:::info
25-
You do not need to create or copy an access token. Never add an access token, client secret, or `Authorization` header to an MCP configuration or project file.
27+
You do not need an API key or a manually created access token. Never paste a password, access token, or other secret into your AI tool's settings or a Nordcraft project.
2628
:::
2729

2830
### Claude Code
@@ -42,17 +44,17 @@ Then authenticate the server:
4244

4345
### Claude Desktop
4446

45-
Claude Desktop uses a custom connector for remote MCP servers. Do not add the Nordcraft server to `claude_desktop_config.json`.
47+
Claude Desktop uses a custom connector to connect to MCP servers. Do not add the Nordcraft server to `claude_desktop_config.json`.
4648

4749
1. In Claude Desktop, go to **Customize > Connectors**.
4850
2. Select **+** and then **Add custom connector**.
49-
3. Enter `https://api.nordcraft.com/mcp` as the remote MCP server URL.
51+
3. Enter `https://api.nordcraft.com/mcp` as the server address.
5052
4. Add the connector, select **Connect**, and approve access in the browser.
5153
5. Enable the connector for the conversations where you want to use it.
5254

5355
### VS Code with GitHub Copilot
5456

55-
Open the Command Palette and run **MCP: Open User Configuration**. You can also add the server to a workspace `.vscode/mcp.json` file. Add the following configuration:
57+
Open the Command Palette and run **MCP: Open User Configuration**. You can also add the server to a workspace `.vscode/mcp.json` file. Add the following settings:
5658

5759
```json
5860
{
@@ -65,11 +67,11 @@ Open the Command Palette and run **MCP: Open User Configuration**. You can also
6567
}
6668
```
6769

68-
Start or refresh the Nordcraft server from VS Code. When prompted, trust the server and complete the Nordcraft sign-in in your browser.
70+
Start or refresh the Nordcraft server from VS Code. When prompted, trust the server and sign in to Nordcraft in your browser.
6971

7072
### Cursor
7173

72-
Create a global `~/.cursor/mcp.json` file, or a project-specific `.cursor/mcp.json` file, and add the following configuration:
74+
Create a global `~/.cursor/mcp.json` file, or a project-specific `.cursor/mcp.json` file, and add the following settings:
7375

7476
```json
7577
{
@@ -81,7 +83,7 @@ Create a global `~/.cursor/mcp.json` file, or a project-specific `.cursor/mcp.js
8183
}
8284
```
8385

84-
Reload Cursor if necessary, enable the server from **Customize**, and complete the browser authentication when Cursor first connects to it.
86+
Reload Cursor if necessary, enable the server from **Customize**, and sign in to Nordcraft when Cursor asks you to connect.
8587

8688
### Windsurf
8789

@@ -113,90 +115,108 @@ In Zed, go to **Settings > AI > MCP Servers**, select **Add Server**, and then s
113115
}
114116
```
115117

116-
Because the configuration does not include an `Authorization` header, Zed starts the standard MCP OAuth flow and prompts you to authenticate in your browser.
118+
Zed will automatically ask you to sign in to Nordcraft when the server first connects. You do not need to add your Nordcraft login details to the settings.
119+
120+
### OpenCode
121+
122+
Run the following command to add Nordcraft to all of your OpenCode projects:
123+
124+
```bash
125+
opencode mcp add nordcraft --global --url https://api.nordcraft.com/mcp
126+
```
127+
128+
To connect only the current project, remove `--global` from the command. You can check the connection by running:
117129

118-
## Use the server
130+
```bash
131+
opencode mcp list
132+
```
133+
134+
If OpenCode reports that Nordcraft needs authentication, open OpenCode, run `/mcps`, select `nordcraft`, and sign in to Nordcraft in the browser.
135+
136+
## Get started
137+
138+
Once the connection is ready, you can use the tools you already know. You do not need to enter a tool name or remember its settings.
119139

120140
For the best results:
121141

122-
1. Use `current_user` to confirm the authenticated Nordcraft account and its granted scopes.
123-
2. Use `projects_search` to find the project short ID and organization ID.
124-
3. Use `branches_search` to inspect existing branches.
125-
4. Create and work on a feature branch instead of editing the read-only `main` branch.
126-
5. Use the file tools to inspect, edit, and validate the branch, and then use `diff` to review its changes.
142+
1. Ask your AI tool which Nordcraft account it is connected to.
143+
2. Ask it to find your project.
144+
3. Ask it to list the branches or create a new feature branch.
145+
4. Ask it to inspect, update, and validate files on that branch.
146+
5. Ask it to show you the changes before you merge them.
147+
148+
If your AI tool chooses the wrong project or branch, tell it the project's short ID and branch name. Both are included in the project and branch results.
127149

128-
All project file tools require both a project short ID and a branch name. File paths are arrays of path segments, such as `["components", "Header"]`, rather than slash-separated strings.
150+
File changes are saved to the branch you select. The `main` branch is read-only, so ask your AI tool to create or use a feature branch for changes.
129151

130-
You can also ask your AI client directly, for example:
152+
You can also ask your AI tool directly, for example:
131153

132-
- “Use the Nordcraft MCP server to find my projects and list the branches in my website project.”
133-
- “Use Nordcraft to inspect the components on my latest feature branch and suggest accessibility improvements.”
134-
- “Update the header on my feature branch, validate the files, and show me the changes before I merge them.”
154+
- “Use Nordcraft to find my website projects and show their branches.”
155+
- “Look at the components on my latest feature branch and suggest accessibility improvements.”
156+
- “Update the header on my feature branch, check the files for issues, and show me the changes before I merge them.”
135157

136-
If your client does not select the Nordcraft tools automatically, name the **Nordcraft** server or a specific tool in your prompt.
158+
## Available tools
137159

138-
## Supported tools
160+
After you sign in, the Nordcraft tools become available to your AI tool. You will usually use them by describing what you want in everyday language. The list below explains what each tool can do and what information it needs.
139161

140-
The MCP client discovers the available tools after you authenticate. The Nordcraft MCP server currently provides the following tools.
162+
### Your account and projects
141163

142-
### Account and projects
164+
| Tool | What it does | Information needed |
165+
| ----------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
166+
| `current_user` | Checks which Nordcraft account is connected and which permissions are available. | Nothing |
167+
| `projects_search` | Finds projects that you can access. | Optional filters for a project's short ID, name, organization, visibility, or type |
168+
| `projects_create` | Creates a new project from Nordcraft's starter template. | A project name, short ID, organization, and whether the project is private or public |
143169

144-
| Tool | Purpose | Inputs |
145-
| ----------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- |
146-
| `current_user` | Returns the authenticated user's ID, name, username, and granted scopes. | None |
147-
| `projects_search` | Finds Nordcraft projects that you can access. | Optional: `shortId`, `name`, `organizationId`, `isPrivate`, and `type` (`app` or `package`) |
148-
| `projects_create` | Creates a project from Nordcraft's default starter template. | `name` (1–64 characters), `shortId` (1–40 lowercase letters or numbers), `organizationId`, and `isPrivate` |
170+
A project name can be up to 64 characters. A short ID can contain up to 40 lowercase letters or numbers.
149171

150-
`projects_search` returns up to 100 accessible projects, with the most recently updated projects first. The `name` filter matches part of a project name without considering case. Other project tools use the project's `short_id` value as `projectShortId`.
172+
`projects_search` returns up to 100 projects, with the most recently updated projects first. You can search by all or part of a project name, and the search does not consider capitalization.
151173

152174
### Branches and changes
153175

154-
| Tool | Purpose | Inputs |
155-
| ----------------- | ---------------------------------------------------------------------- | --------------------------------- |
156-
| `branches_search` | Lists branches in a project, with the newest branches first. | `projectShortId` |
157-
| `branches_create` | Creates a branch in a project. | `projectShortId` and `name` |
158-
| `diff` | Returns changes on a branch compared with the project's `main` branch. | `projectShortId` and `branchName` |
176+
| Tool | What it does | Information needed |
177+
| ----------------- | ----------------------------------------------------------- | ----------------------------------------- |
178+
| `branches_search` | Lists a project's branches, with the newest branches first. | The project |
179+
| `branches_create` | Creates a new branch in a project. | The project and a name for the new branch |
180+
| `diff` | Shows what has changed on a branch compared with `main`. | The project and branch |
159181

160-
A new branch name must start with a lowercase letter, can contain lowercase letters, numbers, and dashes, and can be at most 32 characters long.
182+
A branch name must start with a lowercase letter. It can contain lowercase letters, numbers, and dashes, and can be up to 32 characters long.
161183

162184
### Project files
163185

164-
| Tool | Purpose | Inputs |
165-
| ---------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
166-
| `files_glob` | Lists full paths for files that match a glob pattern. | `projectShortId`, `branchName`, and optional `pattern` (defaults to `**/*`) |
167-
| `files_read` | Reads a project file and returns it in Nordcraft's NC format when applicable. | `projectShortId`, `branchName`, `path`, and optional `patterns` |
168-
| `files_edit` | Applies an NC Diff patch to one new or existing file and saves it to the branch. | `projectShortId`, `branchName`, and `patch` |
169-
| `files_validate` | Runs validation rules against one or more project files. | `projectShortId`, `branchName`, and `paths` |
170-
171-
Glob matching is case-sensitive. For `files_read`, `path` is an array of segments and `patterns` can filter returned sections. For `files_validate`, `paths` is an array of path arrays, such as `[["components", "Header"], ["formulas", "total"]]`, and each path must contain at least two segments.
186+
| Tool | What it does | Information needed |
187+
| ---------------- | ---------------------------------------------------------------------------------- | ------------------------------------------------- |
188+
| `files_glob` | Finds files by folder or name pattern. | The project, branch, and an optional file pattern |
189+
| `files_read` | Reads a project file and returns it in a format that is easy for AI to understand. | The project, branch, and file |
190+
| `files_edit` | Makes a change to one new or existing file and saves it to the branch. | The project, branch, and requested change |
191+
| `files_validate` | Checks one or more project files for issues. | The project, branch, and files to check |
172192

173-
The `files_edit` patch must contain a complete NC Diff body inside a type-specific semantic XML tag. The opening tag includes the file `path` and a one-line commit `message`.
193+
The AI tool handles the file locations and edit format for you. To point it to a specific file, you can describe the folder and name, such as `components/Header`. File searches are case-sensitive.
174194

175-
### Nordcraft skills
195+
### Built-in Nordcraft guidance
176196

177-
These tools return reference instructions that help an AI client work correctly with Nordcraft. They do not directly change a project and do not take project inputs.
197+
These tools do not change your project. Instead, they give your AI tool additional guidance for working with Nordcraft correctly.
178198

179-
| Tool | Reference |
180-
| ----------------------- | ------------------------------------------------------------------------------------ |
181-
| `skill-action` | Custom action JavaScript handlers and workflow statements |
182-
| `skill-formula` | Project formulas and JavaScript-based calculation handlers |
183-
| `skill-component` | Components and pages, including nodes, workflows, APIs, lifecycles, and patch syntax |
184-
| `skill-theme` | Theme files, including metadata, fonts, custom properties, and variants |
185-
| `skill-stdlib-formulas` | Built-in `@toddle/*` formulas |
186-
| `skill-stdlib-actions` | Built-in `@toddle/*` actions |
199+
| Tool | Guidance it provides |
200+
| ----------------------- | --------------------------------------------------------------------- |
201+
| `skill-action` | Creating custom actions and workflow steps |
202+
| `skill-formula` | Creating project formulas and calculations |
203+
| `skill-component` | Building components and pages, including their workflows and settings |
204+
| `skill-theme` | Working with themes, fonts, colors, and design variations |
205+
| `skill-stdlib-formulas` | Using Nordcraft's built-in formulas |
206+
| `skill-stdlib-actions` | Using Nordcraft's built-in actions |
187207

188-
## Security and permissions
208+
## Keep your projects safe
189209

190-
The MCP server acts with the access of the Nordcraft user who approves the connection. Your Nordcraft account permissions still determine which existing projects and organizations you can use.
210+
The AI tool acts on your behalf and can make real changes to your Nordcraft account. Only connect tools that you trust, and review the permissions and actions they request.
191211

192212
:::warning
193-
Some tools can create projects and branches or change project files. Work on a feature branch, review every tool call, validate edited files, and inspect the branch diff before merging changes.
213+
Work on a feature branch. Review every change, check edited files for issues, and inspect the branch changes before merging anything into your live project.
194214
:::
195215

196-
Follow these guidelines when using the server:
216+
Keep the connection safe by following these guidelines:
197217

198-
- Review the requested OAuth permissions and only approve the access you need.
199-
- Review write operations before allowing your AI client to run them automatically.
200-
- Do not commit access tokens, client secrets, or `Authorization` headers to source control.
201-
- Do not store credentials in Nordcraft project files.
202-
- Disconnect the server from your MCP client when you no longer need the access.
218+
- Review requested permissions and only approve the access you need.
219+
- Review changes before allowing an AI tool to make them automatically.
220+
- Do not commit passwords, access tokens, or other secrets to source control.
221+
- Do not store passwords, access tokens, or other secrets in Nordcraft project files.
222+
- Disconnect the server from your AI tool when you no longer need it.

0 commit comments

Comments
 (0)