Deployable MCP The goal of this stage is to build a ready-to-deploy MCP designed for Cloudflare Workers.
The MCP will serve as a bridge between LLMs and operational tools, enabling structured interaction (read, write, query, notify) through defined interfaces. It should abstract away model logic from infrastructure, allowing any compatible LLM to perform controlled actions.
It's encouraged to begin embedded (chatbot and MCP in the same repo) to simplify iteration, then transition into a modular deployable MCP with clear request/response contracts and test coverage.
This MCP should include a minimal but practical toolset for experimentation, such as:
Reading Linear issues (via API or Linear MCP).
Writing Slack messages via ValBot (through the hub.valiot.io endpoint).
The final architecture must be Cloudflare-compatible and ready to deploy once validated.
Recommended Steps
Embed Phase (Iteration Loop)
Run MCP and chatbot in the same codebase.
Focus on tool experimentation (Linear, Slack).
Rapid iteration on prompt flows and tool schemas.
Abstraction Phase
Define clear typed interfaces for all tool I/O.
Ensure consistency with JSON schemas for each request and response.
Establish separation between:
LLM orchestration logic
MCP interaction layer
Tool drivers/adapters
Contract Tests Phase
Add golden tests that validate schema compliance and tool behavior determinism.
Include mock responses for each supported tool.
Introduce a validation pipeline to ensure models can only use allowed actions.
Split and Prepare for Deployment
Extract MCP into its own deployable module.
Use Cloudflare Worker conventions (Durable Objects, KV, Wrangler config).
Validate via local and staging runs.
Constraints
Must be Cloudflare Workers–compatible (no server dependencies like Express).
MCP must expose a typed HTTP interface (e.g., /invoke, /status, /schema).
Tools must be declaratively registered in the MCP.
The codebase should not assume a single LLM vendor — must support multiple APIs.
Focus on deployability: architecture, not production ops.
Acceptance Criteria
At least three working tools implemented.
Request/response schemas defined and validated through JSON Schema or equivalent typing system.
Golden tests exist for schema and behavioral validation.
Code is ready for Cloudflare deployment (config, dependencies, env vars, etc.).
Expected Impact
Establishes a clean, deployable architecture for the MCP.
Enables future plug-and-play LLM orchestration via Cloudflare Workers.
Provides a testable base to evaluate model behaviors with real operational integrations.
Official typescript SDK for building MCP Servers: https://github.com/modelcontextprotocol/typescript-sdk