Skip to main content
Glama
@microservices-sh/mcp

@microservices-sh/mcp

Official

@microservices-sh/mcp

npm version Official MCP Registry mcp MCP server

MCP server for AI agents that generate, verify, and deploy Cloudflare-native apps from reusable microservices.sh modules.

This package is a standalone stdio MCP server. It vendors a small microservices.sh SDK/module-contract snapshot until the public SDK is split out.

Why Agents Use It

@microservices-sh/mcp gives coding agents a typed planning layer for building production-oriented Cloudflare apps. Agents can discover verified templates and modules, inspect module contracts, compose an app plan, validate configuration, generate project files for review, run readiness checks, and prepare approval-gated preview deployments through the microservices.sh control plane.

It is useful when an agent needs to build apps with common product modules such as auth, booking, customer records, payments, files, and audit logs without inventing each integration from scratch.

Related MCP server: mcpdeployment

Install

pnpm add -D @microservices-sh/mcp

Or run it directly after publish:

pnpm dlx @microservices-sh/mcp

Or install from Glama:

MCP Client Config

{
  "mcpServers": {
    "microservices": {
      "command": "microservices-mcp",
      "env": {
        "MICROSERVICES_API_URL": "https://api.microservices.sh",
        "MICROSERVICES_API_KEY": "favored-secret-manager-reference"
      }
    }
  }
}

For local development inside this repo:

{
  "mcpServers": {
    "microservices-local": {
      "command": "node",
      "args": ["/absolute/path/to/mcp/dist/index.js"]
    }
  }
}

Build the local package first:

pnpm build

For agent-oriented one-click install guidance, see llms-install.md.

Tools

Read-only and local planning tools:

  • list_templates

  • inspect_template

  • list_modules

  • inspect_module

  • list_module_docs

  • get_module_doc

  • compose_app

  • validate_config

  • generate_project

  • run_checks

  • plan_add_module

  • check_updates

  • plan_module_upgrade

  • get_secrets_status

  • create_preview_plan

Remote control-plane tools:

  • deploy_preview

  • get_deployment_status

deploy_preview is mutating and requires confirm: "preview". Run create_preview_plan first.

Environment

Variable

Purpose

MICROSERVICES_API_URL

Remote control-plane URL. Defaults to https://api.microservices.sh.

MICROSERVICES_API_KEY

Bearer token for remote tools.

MICROSERVICES_TOKEN

Fallback bearer token.

Secret values are never returned by the MCP tools.

Registry Notes

The package is published to npm, listed in the official MCP Registry, and verified by Glama:

The package declares "mcpName": "sh.microservices/mcp" in package.json. Docker/OCI packaging should wrap this same stdio server rather than forking behavior.

Available Tools

17 tools
check_updatesCheck UpdatesAInspect

Check locked module versions against the bundled registry snapshot. Use this to identify available module updates before plan_module_upgrade.

Inputs: lock.

compose_appCompose AppAInspect

Compose a template and selected modules into a checked app contract and lockfile plan without writing files. Use this to preview the exact app composition before generate_project or deployment planning.

Inputs: templateId, modules, config.

create_preview_planCreate Preview PlanAInspect

Create a local preview-deployment readiness plan without mutating remote state. Use this before deploy_preview to review resources, checks, errors, warnings, and required approval steps.

Inputs: templateId, modules, config, mode.

deploy_previewDeploy PreviewAInspect

Prepare a remote preview deployment through the microservices.sh control plane. This is a mutating tool and requires confirm: preview; call create_preview_plan first and only proceed after human review.

Inputs: confirm (required), templateId, modules, config, +4 more.

generate_projectGenerate ProjectAInspect

Generate project source files in memory for agent inspection. This tool does not write files; use it to review planned source, docs, migrations, and config before creating or editing a local project.

Inputs: templateId, modules, config.

get_deployment_statusGet Deployment StatusAInspect

Read a remote preview deployment status from the microservices.sh control plane. Use this after deploy_preview to poll status, inspect errors, or retrieve deployment metadata.

Inputs: deploymentId (required), apiUrl, apiKey.

get_module_docGet Module DocAInspect

Return an LLM-readable documentation page for a module, including rules, implementation notes, and agent guidance. Use this before coding against a module contract.

Inputs: moduleId (required).

get_secrets_statusGet Secrets StatusAInspect

Report required secret names and configured/missing status for a template/module composition without exposing secret values. Use this before deployment planning or remote preview deploys.

Inputs: templateId, modules, config.

inspect_moduleInspect ModuleAInspect

Inspect one module contract in detail, including permissions, hooks, events, resources, storage needs, and customization points. Use this before editing or adding a module so the agent understands the module boundaries.

Inputs: moduleId (required).

inspect_templateInspect TemplateAInspect

Inspect one app template contract, including supported modules, default configuration, runtime metadata, and generation behavior. Use this before composing or generating a project from a specific template id.

Inputs: templateId (required).

list_module_docsList Module DocsAInspect

List LLM-readable documentation pages available for module implementation guidance. Use this to discover local docs before get_module_doc or before changing generated source.

Inputs: no named parameters.

list_modulesList ModulesAInspect

List available verified microservices.sh modules with ids, categories, summaries, versions, and maturity status. Use this to discover production building blocks before inspect_module, compose_app, or plan_add_module.

Inputs: no named parameters.

list_templatesList TemplatesAInspect

List available microservices.sh app templates, including template ids and summaries. Use this before inspect_template, compose_app, generate_project, or run_checks when choosing a foundation for a new Cloudflare app.

Inputs: no named parameters.

plan_add_modulePlan Add ModuleAInspect

Plan an approval-gated module addition against an optional existing microservices.lock.json. This tool reports intended lockfile changes and required review gates without writing files.

Inputs: moduleId, version, lock.

plan_module_upgradePlan Module UpgradeAInspect

Plan a module version change and report approval gates, compatibility notes, and lockfile impact. Use this before applying a module upgrade.

Inputs: moduleId, version, to, lock.

run_checksRun ChecksAInspect

Run local contract and readiness checks for a template/module composition. Use this before deployment planning to verify module compatibility, generated artifacts, and operational guardrails.

Inputs: templateId, modules, config.

validate_configValidate ConfigAInspect

Validate a template, module list, and configuration object before generation or deployment. Use this to catch unsupported modules, missing settings, and invalid config before side effects.

Inputs: templateId, modules, config.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 17 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: planning, inspecting, deploying, validating, listing, etc. Overlaps are minimal and well-differentiated by descriptions.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in snake_case, e.g., compose_app, inspect_module, plan_add_module. No mixing of conventions.

    Tool Count5/5

    With 17 tools, the set is comprehensive for the microservices deployment domain without being overcrowded. Each tool serves a distinct step in the workflow.

    Completeness4/5

    Covers the full preview deployment lifecycle- discovery, composition, planning, validation, deployment, status, and upgrades. Minor gaps include no delete/undeploy or list deployments tool.

    Maintenance

    ActivityStale
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers