Skip to content
Merged
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
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ start: ## Start the MCP HTTP server from dist/ (run `make build` first)
echo "$(GREEN)==> Starting the MCP HTTP server$(RESET)"
pnpm start

.PHONY: stdio
stdio: ## Start the MCP STDIO server from dist/ (run `make build` first)
echo "$(GREEN)==> Starting the MCP STDIO server$(RESET)"
pnpm run stdio

.PHONY: inspector
inspector: ## Debug the STDIO server with the MCP Inspector (run `make build` first)
echo "$(GREEN)==> Starting the MCP Inspector$(RESET)"
npx @modelcontextprotocol/inspector node dist/stdio-server.js

.PHONY: format
format: ## Format the codebase, fixing every auto-fixable lint problem
echo "$(GREEN)==> Formatting the codebase$(RESET)"
Expand All @@ -75,6 +85,11 @@ test: ## Run the unit tests
echo "$(GREEN)==> Running the unit tests$(RESET)"
pnpm run test:unit

.PHONY: test-all
test-all: ## Run the whole test suite (unit and integration)
echo "$(GREEN)==> Running the whole test suite$(RESET)"
pnpm test

.PHONY: test-integration
test-integration: ## Run the integration tests
echo "$(GREEN)==> Running the integration tests$(RESET)"
Expand Down
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Now ask Claude to connect to your Plone site, e.g. *"Connect to https://demo.plo
The server ships two entry points:

- **STDIO** (`plone-mcp` bin / `dist/stdio-server.js`) - for local MCP clients such as Claude Desktop.
- **HTTP** (`dist/http-server.js`) - a streamable-HTTP server with per-session state, listening on `PORT` (default `3001`) at `/mcp`. Start it with `pnpm start`.
- **HTTP** (`dist/http-server.js`) - a streamable-HTTP server with per-session state, listening on `PORT` (default `3001`) at `/mcp`. Start it with `make start`.

## Quick Start using Claude Desktop as an example

Expand Down Expand Up @@ -112,8 +112,8 @@ Clone the repo if you want to modify the server, debug it, or run it with the MC
```bash
git clone https://github.com/plone/plone-mcp.git
cd plone-mcp
pnpm install
pnpm run build
make install
make build
```

Point Claude Desktop at your local build instead of the `npx` command:
Expand All @@ -132,32 +132,32 @@ Point Claude Desktop at your local build instead of the `npx` command:
Development commands:

```bash
# Development mode with hot reload
pnpm run dev
# Install the dependencies
make install

# Build for production (compiles TypeScript and copies blocks.json)
pnpm run build
make build

# Run the HTTP server / the STDIO server from the build
pnpm start
pnpm run stdio
make start
make stdio

# Test with MCP Inspector
pnpm run inspector
# Debug with the MCP Inspector
make inspector

# Tests (Vitest)
pnpm test # everything
pnpm run test:unit # unit tests only
pnpm run test:coverage # with coverage
make test-all # everything
make test # unit tests only
make test-coverage # with coverage

# Static checks
pnpm run lint # ESLint over src/ and __tests__/
pnpm run type-check # tsc over sources and tests

# Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/stdio-server.js
make lint # ESLint over src/ and __tests__/
make format # ESLint with --fix
make type-check # tsc over sources and tests
```

Run `make help` to list every available target.

## Core Features

- **Content Management**: CRUD operations on all Plone content types
Expand Down Expand Up @@ -304,7 +304,7 @@ plone_search({
| "Block not found" | Use `plone_get_content` to get valid block IDs |
| Connection errors | Verify Plone URL and credentials are correct |
| Blocks not applied | Call `plone_create_blocks_layout` immediately before create/update (60s TTL) |
| TypeScript errors during local build | Run `pnpm install` to ensure all dependencies are installed |
| TypeScript errors during local build | Run `make install` to ensure all dependencies are installed |

## Resources

Expand Down
1 change: 1 addition & 0 deletions news/+make-targets.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Document the local development workflow with the `make` targets instead of the raw `pnpm` commands, and add the missing `stdio`, `inspector` and `test-all` targets to the Makefile. @ericof
Loading