| layout | default |
|---|---|
| title | Chapter 2: Repository Architecture and Package Layout |
| nav_order | 2 |
| parent | Taskade MCP Tutorial |
Welcome to Chapter 2: Repository Architecture and Package Layout. In this part of Taskade MCP Tutorial: OpenAPI-Driven MCP Server for Taskade Workflows, you will build an intuitive mental model first, then move into concrete implementation details and practical production tradeoffs.
This chapter maps the monorepo so you can make targeted changes without breaking generation or runtime flow.
- understand root workspace/build orchestration
- identify boundaries between runtime server and codegen package
- locate the critical scripts used to regenerate tool surfaces
taskade/mcp is a workspace monorepo with two primary packages:
packages/server-> runtime MCP server package (@taskade/mcp-server)packages/openapi-codegen-> generator package (@taskade/mcp-openapi-codegen)
flowchart LR
A[OpenAPI spec] --> B[openapi-codegen]
B --> C[generated tool bindings]
C --> D[server package build]
D --> E[MCP runtime in client]
At root:
- workspaces configured via
package.json lernacoordinates package-level scripts- root
buildcalls package build pipelines
From root package.json:
build:lerna run buildlint: repo-wide lintingpublish: build + lint + changeset publish flow
From packages/server/package.json:
fetch:openapi-> pulls Taskade public OpenAPI YAMLgenerate:taskade-mcp-tools-> generates tool bindingsbuild:cli-> compiles CLI runtimestart:server-> local HTTP runtime for iterative testing
From packages/openapi-codegen:
- exports codegen API for generating MCP tools from OpenAPI
- depends on parser + schema tooling for OpenAPI dereference and output shaping
- root
README.md packages/server/README.mdpackages/openapi-codegen/README.md- server generation scripts and generated output files
You now know where generation happens, where runtime happens, and which scripts connect both.
Next: Chapter 3: MCP Server Tools, Auth, and API Surface
The TaskadeMCPServer class in packages/server/src/server.ts handles a key part of this chapter's functionality:
};
export class TaskadeMCPServer extends McpServer {
readonly config: TaskadeServerOpts;
constructor(opts: TaskadeServerOpts) {
super({
name: 'taskade',
version: '0.0.1',
capabilities: {
resources: {},
tools: {},
},
});
this.config = opts;
setupTools(this, {
url: 'https://www.taskade.com/api/v1',
fetch,
headers: {
Authorization: `Bearer ${this.config.accessToken}`,
},
normalizeResponse: {
folderProjectsGet: (response) => {
return {
content: [
{
type: 'text',
text: JSON.stringify(response),
},
{This class is important because it defines how Taskade MCP Tutorial: OpenAPI-Driven MCP Server for Taskade Workflows implements the patterns covered in this chapter.
flowchart TD
A[TaskadeMCPServer]