Skip to content

Comments

feat(mcp): implement MCP server with 210 tools for full platform management#11

Merged
dviejokfs merged 7 commits intomainfrom
feat/mcp-server
Feb 18, 2026
Merged

feat(mcp): implement MCP server with 210 tools for full platform management#11
dviejokfs merged 7 commits intomainfrom
feat/mcp-server

Conversation

@dviejokfs
Copy link
Contributor

Summary

  • Add a complete MCP (Model Context Protocol) server (mcp/) that mirrors the Temps CLI, exposing 210 tools across 30 domain modules for AI agents to manage the entire Temps platform programmatically
  • OpenAPI SDK auto-generated via @hey-api/openapi-ts; hand-written TempsClient with REST + WebSocket support for container logs
  • 103 integration tests, all passing against the dev instance
  • Published as @temps-sdk/mcp (executable via npx/bunx)

Additional changes

  • providers: auto-generate secret_key for MinIO, refine parameter strategies for service creation
  • web: add RustFS service logo, improve service type detection across project configurators
  • cli: add table header styling helper
  • CLAUDE.md: comprehensive rewrite covering error handling, resilience patterns, and testing guidance
  • scripts: add analytics seed data utilities (add-visitors, backfill-recent, boost-today)

MCP Server Architecture

src/
├── index.ts              # MCP server entry point (stdio transport)
├── api/
│   ├── client.ts         # TempsClient (GET/POST/PUT/PATCH/DELETE/WS)
│   └── generated/        # OpenAPI SDK (422 functions, 24K lines of types)
├── tools/
│   ├── index.ts          # Tool registry with O(1) dispatch map
│   ├── _helpers.ts       # Shared helpers (ok, err, json, table, etc.)
│   └── [30 modules].ts   # projects, deployments, environments, domains, ...
├── handlers/             # MCP protocol handlers
├── prompts/              # Prompt definitions + markdown templates
└── test/
    └── integration.ts    # 103 integration tests

How to use

{
  "mcpServers": {
    "temps": {
      "command": "npx",
      "args": ["@temps-sdk/mcp"],
      "env": {
        "TEMPS_API_URL": "https://your-instance.example.com",
        "TEMPS_API_KEY": "your-api-key-here"
      }
    }
  }
}

…gement

Add a complete MCP (Model Context Protocol) server in mcp/ that mirrors
the Temps CLI functionality, enabling AI agents to manage the entire
Temps deployment platform programmatically.

MCP server highlights:
- 210 tools across 30 domain modules (projects, deployments, environments,
  domains, backups, monitors, containers, services, DNS, error tracking, etc.)
- OpenAPI SDK generated via @hey-api/openapi-ts from live spec
- Hand-written TempsClient with GET/POST/PUT/PATCH/DELETE/WS methods
- WebSocket support for container runtime logs
- O(1) tool dispatch registry
- 103 integration tests, all passing against dev instance
- Published as @temps-sdk/mcp (npx/bunx executable)

Also includes:
- providers: auto-generate secret_key for MinIO, refine parameter strategies
- web: add RustFS service logo and improve service type detection
- cli: add table header styling helper
- CLAUDE.md: comprehensive rewrite with error handling, resilience, and testing guidance
- scripts: add analytics seed data utilities
- CRITICAL: Replace curl|sh acme.sh install with git clone (RCE risk)
- HIGH: Remove explicit ~/.temps/.secrets path (credential exposure)
- HIGH: Replace 15 secret-like example tokens with <YOUR_...> placeholders
- MEDIUM: Add npm package provenance note with org/repo links
- MEDIUM: Add Security Considerations section for external data handling
- LOW: Add boundary/sanitization guidance for prompt injection surface
…l path

- Wrap JSON examples containing {braces} in backticks when generating
  MDX format, preventing acorn parser from treating them as JSX expressions
- Remove explicit ~/.temps/.secrets path from generated docs footer
- Applied to both docs.ts and generate-docs.ts
Replace @temps/cli with @temps-sdk/cli and bare 'temps' commands
with 'bunx @temps-sdk/cli' across CLI.md and CLI.mdx. Remove
the npm install -g instruction since the CLI is used via bunx.
The deployment logs endpoint returns raw JSONL text, but the MCP
client always ran JSON.parse on responses, causing silent failures.

- Add getRaw() method to TempsClient for plain-text endpoints
- Rewrite get_deployment_logs to show a pipeline stage summary table
  with status icons and durations, followed by parsed JSONL log
  content with level-appropriate formatting
- Bump package version from 0.1.1 to 0.1.3 in package.json.
- Add detailed usage instructions for tool categories in index.ts.
- Introduce a help command that displays available tool categories and environment variables.
- Update integration test to reflect new validation criteria for tool registration.
- Add new analytics tool definitions in analytics.ts for enhanced project metrics tracking.
- Improve environment resource update descriptions for clarity in environments.ts.
@dviejokfs dviejokfs merged commit aeb82a2 into main Feb 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant