Connect Claude Code

Configure the AgileBuilder MCP server in Claude Code so the AI can read your team's templates and guideline documents

Prerequisites

  • Claude Code installed
  • AgileBuilder CLI installed globally via npm (Node.js 20 or later required):
npm install -g agilebuilder

After installation, confirm the install succeeded: running npm ls -g agilebuilder should show agilebuilder and its version; agilebuilder-mcp is installed alongside it (it is a stdio service — do not run it directly in a terminal, and producing no output while running is normal).

npm ls -g agilebuilder

Configure the MCP Server

Option 1: Use the claude mcp add command

Run inside your project directory:

claude mcp add agilebuilder agilebuilder-mcp

This registers the server over stdio, scoped to the current project by default. To make it available across all projects, add --scope user:

claude mcp add agilebuilder --scope user agilebuilder-mcp

Option 2: Edit the configuration file

Alternatively, create an .mcp.json file in the project root:

{
  "mcpServers": {
    "agilebuilder": {
      "command": "agilebuilder-mcp"
    }
  }
}

AgileBuilder's MCP server runs in stdio mode: Claude Code launches the process automatically within a session. There is nothing to start manually and no port to configure.

Verify the Configuration

After configuring:

  1. Run claude mcp listagilebuilder should appear with a healthy status.
  2. Inside a Claude Code session, type /mcp to inspect the agilebuilder server and the 4 tools it exposes: list_resources, search_resources, get_resource, and create_project.

Then verify in a conversation, for example:

List the template resources in my AgileBuilder workspace.

The AI should call list_resources and return the resources in your current workspace.

If the server does not connect, check that:

  • agilebuilder-mcp is on PATH (the global install succeeded)
  • The JSON syntax in the configuration file is valid

Typical Usage

Ask the AI to list available templates

What templates are available in my AgileBuilder workspace?

The AI calls list_resources (optionally with type: "template") or search_resources and lists the templates with their IDs, descriptions, and tags.

Ask the AI to read team guidelines

Read the coding standards document from AgileBuilder before writing this module.

The AI first reads agilebuilder://docs/catalog to find the document, then fetches its content via agilebuilder://local/docs/<id> or agilebuilder://cloud/docs/<id>, using your team's guidelines as context for subsequent generation.

Ask the AI to scaffold a project from a template

Create a project called my-admin in ./my-admin using the vue-admin template.

The AI first queries the template resource to get its resourceId, then calls create_project with the targetPath and template variables. Writing into a non-empty directory requires the AI to explicitly set overwrite: true; template hooks only run when allowHooks: true.

Access Resources in Cloud Workspaces

By default, the MCP server reads from the local workspace. To let the AI access templates and guideline documents in a team cloud workspace:

ag login                    # sign in via the browser
ag space list               # list available cloud workspaces
ag space use <space-id>     # switch to the target cloud workspace

No Claude Code configuration change is needed after switching — the MCP server shares the current workspace with the CLI, so the AI sees cloud resources in the next session. For more on workspaces, members, and permissions, see Workspaces and Members.

Next Steps