Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions MCP_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ This document describes all 106 tools available in the Massdriver MCP server.
| `fork_environment` | Forks a new environment from a parent environment in the same project. Requires `parent_id`, `id`, `name`; optional toggles `copy_secrets`, `copy_remote_references`, and `copy_environment_defaults` (all default false) control what carries over. |
| `deploy_environment` | Schedules a deployment of every instance in the environment in dependency order. Cancels any in-flight environment deployment and enqueues a fresh provision wave; changes happen asynchronously. |
| `decommission_environment` | Schedules a teardown of every instance in the environment in reverse dependency order (the environment shell stays; use `delete_environment` to remove it afterwards). Blocked when decommission protection is enabled. |
| `list_unfulfilled_dependencies` | Lists required dependency inputs across the environment's instances that nothing fills — no link, no remote reference, no environment default. Each entry is one input a deploy would block on. |
| `list_environment_links` | Lists the blueprint links in effect in the environment, given the bundle versions its instances actually run. |

## Instances

Expand Down Expand Up @@ -91,21 +93,30 @@ This document describes all 106 tools available in the Massdriver MCP server.

| Tool | Description |
|------|-------------|
| `list_resources` | Lists resources. Optionally filter by `origin`, `resource_type`, `environment_id`, or `search`. |
| `list_resources` | Lists resources. Optionally filter by `origin`, `resource_type` (accepts an `@version` pin), `environment_id`, `search`, `attributes`, or a `created_after`/`created_before` window. |
| `get_resource` | Gets a resource by ID (payload values are masked). |
| `create_resource` | Imports a resource. Requires `resource_type_id` and `name`. |
| `create_resource` | Imports a resource. Requires `resource_type_id` and `name`. Use `get_resource_type` first to learn the payload schema. |
| `update_resource` | Updates a resource's name or payload. |
| `delete_resource` | Deletes an imported resource. |
| `export_resource` | Exports a resource with unmasked payload (audit-logged). |
| `create_resource_grant` | Creates a sharing grant on a resource. `action` must be `resource:export` (the only grantable action). |
| `delete_resource_grant` | Deletes a sharing grant. |
| `list_resource_grants` | Lists sharing grants on a resource. |

## Resource Types

| Tool | Description |
|------|-------------|
| `get_resource_type` | Gets a resource type, including the JSON `schema` a `create_resource` payload must satisfy, import `instructions`, and its `connectionOrientation`. Accepts a bare identifier or an `@version` pin (`aws-iam-role@1.2.3`, `@~1`, `@latest`). |
| `list_resource_type_dependents` | Lists what depends on a resource type within one environment, one entry per (instance, dependency field) pair. |

## Organization

| Tool | Description |
|------|-------------|
| `get_organization` | Gets the current organization's details (id, name, subscription status, timestamps). Custom attributes and members are not included here — use `list_custom_attributes` and `list_organization_members` for those. |
| `get_organization_settings` | Gets organization-wide behavior settings (`defaultBundleAccess`). Requires `organization:manageSettings`. |
| `update_organization_settings` | Updates organization-wide behavior settings. `default_bundle_access` is `NONE` or `ALL_PROJECTS` and applies only to repositories created afterwards. Requires `organization:manageSettings`. |
| `create_custom_attribute` | Creates a custom attribute definition. Requires `key` and `scope`. `required` defaults to false here; setting it true makes the attribute mandatory org-wide at its scope. |
| `update_custom_attribute` | Updates a custom attribute's required flag or allowed values. |
| `delete_custom_attribute` | Deletes a custom attribute definition. |
Expand Down Expand Up @@ -151,7 +162,6 @@ This document describes all 106 tools available in the Massdriver MCP server.
|------|-------------|
| `list_service_accounts` | Lists all service accounts. Optionally filter by `search`. |
| `get_service_account` | Gets a service account by ID. |
| `create_service_account` | Creates a service account. Response includes the bearer token (shown once). |
| `update_service_account` | Updates a service account's name or description. |
| `delete_service_account` | Deletes a service account. |

Expand Down
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)

The server uses stdio transport, compatible with any MCP client.

## Available Tools (106)
## Available Tools (111)

See [MCP_README.md](MCP_README.md) for the full tool reference, including per-tool descriptions, input conventions, pagination, and behavioral annotations.

### Projects (6)
`list_projects` `get_project` `create_project` `clone_project` `update_project` `delete_project`

### Environments (11)
`list_environments` `get_environment` `create_environment` `update_environment` `delete_environment` `set_environment_default` `remove_environment_default` `compare_environments` `fork_environment` `deploy_environment` `decommission_environment`
### Environments (13)
`list_environments` `get_environment` `create_environment` `update_environment` `delete_environment` `set_environment_default` `remove_environment_default` `compare_environments` `fork_environment` `deploy_environment` `decommission_environment` `list_unfulfilled_dependencies` `list_environment_links`

### Instances (10)
`list_instances` `get_instance` `update_instance` `set_instance_secret` `remove_instance_secret` `set_remote_reference` `remove_remote_reference` `copy_instance` `orphan_instance` `list_alarms`
Expand All @@ -151,8 +151,11 @@ See [MCP_README.md](MCP_README.md) for the full tool reference, including per-to
### Resources (9)
`list_resources` `get_resource` `create_resource` `update_resource` `delete_resource` `export_resource` `create_resource_grant` `delete_resource_grant` `list_resource_grants`

### Organization (6)
`get_organization` `create_custom_attribute` `update_custom_attribute` `delete_custom_attribute` `list_organization_members` `list_custom_attributes`
### Resource Types (2)
`get_resource_type` `list_resource_type_dependents`

### Organization (8)
`get_organization` `get_organization_settings` `update_organization_settings` `create_custom_attribute` `update_custom_attribute` `delete_custom_attribute` `list_organization_members` `list_custom_attributes`

### Viewer (1)
`get_viewer`
Expand All @@ -163,8 +166,8 @@ See [MCP_README.md](MCP_README.md) for the full tool reference, including per-to
### Groups (14)
`list_groups` `get_group` `create_group` `update_group` `delete_group` `add_group_user` `remove_group_user` `revoke_group_invitation` `add_group_service_account` `remove_group_service_account` `list_group_members` `list_group_service_accounts` `list_group_invitations` `list_group_policies`

### Service Accounts (5)
`list_service_accounts` `get_service_account` `create_service_account` `update_service_account` `delete_service_account`
### Service Accounts (4)
`list_service_accounts` `get_service_account` `update_service_account` `delete_service_account`

### OCI Repos (8)
`list_oci_repos` `get_oci_repo` `create_oci_repo` `update_oci_repo` `delete_oci_repo` `create_oci_repo_grant` `delete_oci_repo_grant` `list_oci_repo_grants`
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.25

require (
github.com/google/jsonschema-go v0.3.0
github.com/massdriver-cloud/massdriver-sdk-go v0.2.17
github.com/massdriver-cloud/massdriver-sdk-go v0.2.19
github.com/modelcontextprotocol/go-sdk v1.0.0
)

Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/massdriver-cloud/massdriver-sdk-go v0.2.17 h1:Afv/OJWzTwPPD+1r3yErDI/mn3BuKePjFFMrGUXC1fk=
github.com/massdriver-cloud/massdriver-sdk-go v0.2.17/go.mod h1:6NrSP+wfGQvUOAggsz10/Wkln8CKmk3VBnD+OJzZgFY=
github.com/massdriver-cloud/massdriver-sdk-go v0.2.19 h1:4p9+wexriVdfO6yC2bVEOOSohROXMup0ATx4f0tupVY=
github.com/massdriver-cloud/massdriver-sdk-go v0.2.19/go.mod h1:6NrSP+wfGQvUOAggsz10/Wkln8CKmk3VBnD+OJzZgFY=
github.com/modelcontextprotocol/go-sdk v1.0.0 h1:Z4MSjLi38bTgLrd/LjSmofqRqyBiVKRyQSJgw8q8V74=
github.com/modelcontextprotocol/go-sdk v1.0.0/go.mod h1:nYtYQroQ2KQiM0/SbyEPUWQ6xs4B95gJjEalc9AQyOs=
github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
Expand Down
8 changes: 6 additions & 2 deletions main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func TestMCPServerTools(t *testing.T) {
"list_environments", "get_environment", "create_environment", "update_environment", "delete_environment",
"set_environment_default", "remove_environment_default", "compare_environments", "fork_environment",
"deploy_environment", "decommission_environment",
"list_unfulfilled_dependencies", "list_environment_links",
// Instances
"list_instances", "get_instance", "update_instance", "set_instance_secret", "remove_instance_secret",
"set_remote_reference", "remove_remote_reference", "copy_instance", "orphan_instance", "list_alarms",
Expand All @@ -74,8 +75,11 @@ func TestMCPServerTools(t *testing.T) {
// Resources
"list_resources", "get_resource", "create_resource", "update_resource", "delete_resource", "export_resource",
"create_resource_grant", "delete_resource_grant", "list_resource_grants",
// Resource Types
"get_resource_type", "list_resource_type_dependents",
// Organization
"get_organization", "create_custom_attribute", "update_custom_attribute", "delete_custom_attribute",
"get_organization", "get_organization_settings", "update_organization_settings",
"create_custom_attribute", "update_custom_attribute", "delete_custom_attribute",
"list_organization_members", "list_custom_attributes",
// Viewer
"get_viewer",
Expand All @@ -87,7 +91,7 @@ func TestMCPServerTools(t *testing.T) {
"add_group_service_account", "remove_group_service_account",
"list_group_members", "list_group_service_accounts", "list_group_invitations", "list_group_policies",
// Service Accounts
"list_service_accounts", "get_service_account", "create_service_account", "update_service_account", "delete_service_account",
"list_service_accounts", "get_service_account", "update_service_account", "delete_service_account",
// OCI Repos
"list_oci_repos", "get_oci_repo", "create_oci_repo", "update_oci_repo", "delete_oci_repo",
"create_oci_repo_grant", "delete_oci_repo_grant", "list_oci_repo_grants",
Expand Down
10 changes: 9 additions & 1 deletion mcp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func clientFromSDK(client *massdriver.Client) *tools.Client {
Components: client.Components,
Bundles: client.Bundles,
Resources: client.Resources,
ResourceTypes: client.ResourceTypes,
Organizations: client.Organizations,
Viewer: client.Viewer,
AuditLogs: client.AuditLogs,
Expand All @@ -85,6 +86,8 @@ func (s *Server) registerTools() {
// Environments
mcpsdk.AddTool(s.mcpServer, tools.ListEnvironmentsTool, tools.HandleListEnvironments(c))
mcpsdk.AddTool(s.mcpServer, tools.GetEnvironmentTool, tools.HandleGetEnvironment(c))
mcpsdk.AddTool(s.mcpServer, tools.ListUnfulfilledDependenciesTool, tools.HandleListUnfulfilledDependencies(c))
mcpsdk.AddTool(s.mcpServer, tools.ListEnvironmentLinksTool, tools.HandleListEnvironmentLinks(c))
mcpsdk.AddTool(s.mcpServer, tools.CreateEnvironmentTool, tools.HandleCreateEnvironment(c))
mcpsdk.AddTool(s.mcpServer, tools.UpdateEnvironmentTool, tools.HandleUpdateEnvironment(c))
mcpsdk.AddTool(s.mcpServer, tools.DeleteEnvironmentTool, tools.HandleDeleteEnvironment(c))
Expand Down Expand Up @@ -144,8 +147,14 @@ func (s *Server) registerTools() {
mcpsdk.AddTool(s.mcpServer, tools.DeleteResourceGrantTool, tools.HandleDeleteResourceGrant(c))
mcpsdk.AddTool(s.mcpServer, tools.ListResourceGrantsTool, tools.HandleListResourceGrants(c))

// Resource Types
mcpsdk.AddTool(s.mcpServer, tools.GetResourceTypeTool, tools.HandleGetResourceType(c))
mcpsdk.AddTool(s.mcpServer, tools.ListResourceTypeDependentsTool, tools.HandleListResourceTypeDependents(c))

// Organization
mcpsdk.AddTool(s.mcpServer, tools.GetOrganizationTool, tools.HandleGetOrganization(c))
mcpsdk.AddTool(s.mcpServer, tools.GetOrganizationSettingsTool, tools.HandleGetOrganizationSettings(c))
mcpsdk.AddTool(s.mcpServer, tools.UpdateOrganizationSettingsTool, tools.HandleUpdateOrganizationSettings(c))
mcpsdk.AddTool(s.mcpServer, tools.CreateCustomAttributeTool, tools.HandleCreateCustomAttribute(c))
mcpsdk.AddTool(s.mcpServer, tools.UpdateCustomAttributeTool, tools.HandleUpdateCustomAttribute(c))
mcpsdk.AddTool(s.mcpServer, tools.DeleteCustomAttributeTool, tools.HandleDeleteCustomAttribute(c))
Expand Down Expand Up @@ -179,7 +188,6 @@ func (s *Server) registerTools() {
// Service Accounts
mcpsdk.AddTool(s.mcpServer, tools.ListServiceAccountsTool, tools.HandleListServiceAccounts(c))
mcpsdk.AddTool(s.mcpServer, tools.GetServiceAccountTool, tools.HandleGetServiceAccount(c))
mcpsdk.AddTool(s.mcpServer, tools.CreateServiceAccountTool, tools.HandleCreateServiceAccount(c))
mcpsdk.AddTool(s.mcpServer, tools.UpdateServiceAccountTool, tools.HandleUpdateServiceAccount(c))
mcpsdk.AddTool(s.mcpServer, tools.DeleteServiceAccountTool, tools.HandleDeleteServiceAccount(c))

Expand Down
26 changes: 23 additions & 3 deletions mcp/structured_content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/massdriver-cloud/massdriver-sdk-go/massdriver/platform/policies"
"github.com/massdriver-cloud/massdriver-sdk-go/massdriver/platform/projects"
"github.com/massdriver-cloud/massdriver-sdk-go/massdriver/platform/resources"
"github.com/massdriver-cloud/massdriver-sdk-go/massdriver/platform/resourcetypes"
"github.com/massdriver-cloud/massdriver-sdk-go/massdriver/platform/server"
"github.com/massdriver-cloud/massdriver-sdk-go/massdriver/platform/serviceaccounts"
"github.com/massdriver-cloud/massdriver-sdk-go/massdriver/platform/types"
Expand Down Expand Up @@ -159,6 +160,7 @@ func stubToolsClient() *tools.Client {
Components: scComponents{},
Bundles: scBundles{},
Resources: scResources{},
ResourceTypes: scResourceTypes{},
Organizations: scOrganizations{},
Viewer: scViewer{},
AuditLogs: scAuditLogs{},
Expand Down Expand Up @@ -200,6 +202,12 @@ func (scEnvironments) ListPage(context.Context, environments.ListInput) (types.P
func (scEnvironments) Get(context.Context, string) (*environments.Environment, error) {
return &environments.Environment{}, nil
}
func (scEnvironments) Links(context.Context, string) ([]types.Link, error) {
return []types.Link{{}}, nil
}
func (scEnvironments) UnfulfilledDependencies(context.Context, string) ([]environments.UnfulfilledDependency, error) {
return []environments.UnfulfilledDependency{{}}, nil
}
func (scEnvironments) Create(context.Context, string, environments.CreateInput) (*environments.Environment, error) {
return &environments.Environment{}, nil
}
Expand Down Expand Up @@ -355,11 +363,26 @@ func (scResources) ListGrantsPage(context.Context, string, resources.ListGrantsI
return types.Page[resources.Grant]{Items: []resources.Grant{{}}}, nil
}

type scResourceTypes struct{}

func (scResourceTypes) Get(context.Context, string) (*resourcetypes.ResourceType, error) {
return &resourcetypes.ResourceType{}, nil
}
func (scResourceTypes) Dependents(context.Context, string, string) ([]resourcetypes.Dependent, error) {
return []resourcetypes.Dependent{{}}, nil
}

type scOrganizations struct{}

func (scOrganizations) Get(context.Context) (*organizations.Organization, error) {
return &organizations.Organization{}, nil
}
func (scOrganizations) GetSettings(context.Context) (*organizations.Settings, error) {
return &organizations.Settings{}, nil
}
func (scOrganizations) UpdateSettings(context.Context, organizations.UpdateSettingsInput) (*organizations.Settings, error) {
return &organizations.Settings{}, nil
}
func (scOrganizations) CreateCustomAttribute(context.Context, organizations.CreateCustomAttributeInput) (*organizations.CustomAttribute, error) {
return &organizations.CustomAttribute{}, nil
}
Expand Down Expand Up @@ -433,9 +456,6 @@ func (scServiceAccounts) ListPage(context.Context, serviceaccounts.ListInput) (t
func (scServiceAccounts) Get(context.Context, string) (*serviceaccounts.ServiceAccount, error) {
return &serviceaccounts.ServiceAccount{}, nil
}
func (scServiceAccounts) Create(context.Context, serviceaccounts.CreateInput) (*serviceaccounts.Created, error) {
return &serviceaccounts.Created{}, nil
}
func (scServiceAccounts) Update(context.Context, string, serviceaccounts.UpdateInput) (*serviceaccounts.ServiceAccount, error) {
return &serviceaccounts.ServiceAccount{}, nil
}
Expand Down
7 changes: 5 additions & 2 deletions mcp/tools/components.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ func HandleListComponents(c *Client) func(context.Context, *mcpsdk.CallToolReque
}

var GetComponentTool = &mcpsdk.Tool{
Name: "get_component",
Description: "Gets a specific component by ID, including its configuration and links.",
Name: "get_component",
Description: "Gets a specific component by ID, including its configuration and links. Each link carries " +
"`fromVersionConstraint` and `toVersionConstraint` — the tilde version ranges of the components it routes between " +
"(`~1` covers 1.x, `~0.4` covers 0.4.x) — which decide the environments the link actually applies in. " +
"Use list_environment_links to see which links are in effect for a given environment.",
}

type GetComponentInput struct {
Expand Down
Loading
Loading