Skip to content

Commit 185662a

Browse files
aborrusoclaude
andcommitted
docs: add CONTRIBUTING.md and examples/ structure
- Add CONTRIBUTING.md with language policy, commit conventions, project structure, and PR checklist - Move docker/ckan-mcp-bridge.js → examples/ollama-chat/ - Add examples/ollama-chat/README.md - Update docker/README.md to point to the example - Update .gitignore with examples/ policy comment Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2caf405 commit 185662a

11 files changed

Lines changed: 193 additions & 21 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ gha-creds-*.json
6464
docs/video/
6565
nanobanana-output/
6666
README.bak.md
67+
# examples/ contains tracked community integrations.
68+
# Add specific entries here only for local-only experiments that should not be committed.
6769
examples/langgraph/
6870
tasks/
6971
skills/

CONTRIBUTING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing
2+
3+
## Language
4+
5+
All code, comments, documentation, and commit messages must be in **English**.
6+
7+
## Commit Messages
8+
9+
Use the format: `<type>: <short description>`
10+
11+
Allowed types:
12+
13+
| Type | When to use |
14+
|------|-------------|
15+
| `feat` | New feature or tool |
16+
| `fix` | Bug fix |
17+
| `docs` | Documentation only |
18+
| `chore` | Maintenance (deps, config, build) |
19+
| `refactor` | Code restructure, no behavior change |
20+
| `test` | Adding or updating tests |
21+
22+
Examples:
23+
24+
```
25+
feat: add ckan_group_search tool
26+
fix: handle timeout errors in datastore queries
27+
docs: update Docker setup instructions
28+
```
29+
30+
Keep the subject line under 72 characters. No period at the end.
31+
32+
## Project Structure
33+
34+
```
35+
ckan-mcp-server/
36+
├── src/ # Source code (TypeScript)
37+
├── tests/ # Test suite
38+
├── docs/ # Documentation
39+
├── docker/ # Core Docker files (Dockerfile, compose, bridge)
40+
├── examples/ # Community integrations (one subfolder per integration)
41+
│ └── <name>/
42+
│ └── README.md
43+
├── openspec/ # Spec-driven change proposals
44+
└── scripts/ # Utility scripts
45+
```
46+
47+
Place files in the right folder. Do not add new files to the repo root unless they are standard top-level files (README, LICENSE, Dockerfile, etc.).
48+
49+
## Pull Requests
50+
51+
Before opening a PR:
52+
53+
- [ ] Branch from `main` and keep it up to date with upstream
54+
- [ ] No unrelated diffs (check `git diff main` carefully)
55+
- [ ] Do not modify `src/portals.json` unless the PR is specifically about portals — local fork customizations should stay in your fork
56+
- [ ] All tests pass: `npm test`
57+
- [ ] Build succeeds: `npm run build`
58+
59+
## Adding an Example Integration
60+
61+
Community integrations go under `examples/<name>/`. Each integration must have a `README.md` explaining what it does and how to run it. The core server files (`src/`, `docker/`) must not be modified as part of an example contribution.

docker/README.md

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ ckan-mcp-server/
1111
├── Dockerfile ← multi-stage build (builder + runtime)
1212
├── docker-compose.yml ← orchestration with variables and healthcheck
1313
├── docker/
14-
│ ├── README.md ← this file
15-
│ └── ckan-mcp-bridge.js ← stdio bridge for Claude Desktop
14+
│ └── README.md ← this file
1615
└── ... (rest of the repo)
1716
```
1817

@@ -55,25 +54,7 @@ docker run -d \
5554

5655
## Configuring Claude Desktop with the Container
5756

58-
Once the container is running, add the following to `claude_desktop_config.json`.
59-
Set `MCP_URL` to point to your Docker host if running on a remote machine.
60-
61-
```json
62-
{
63-
"mcpServers": {
64-
"ckan": {
65-
"command": "node",
66-
"args": ["/path/to/ckan-mcp-server/docker/ckan-mcp-bridge.js"],
67-
"env": {
68-
"MCP_URL": "http://localhost:3000/mcp"
69-
}
70-
}
71-
},
72-
"preferences": {
73-
"coworkWebSearchEnabled": true
74-
}
75-
}
76-
```
57+
Use the stdio bridge from [`examples/ollama-chat/`](../examples/ollama-chat/README.md) to connect Claude Desktop to the running container.
7758

7859
## Logs and Monitoring
7960

examples/ollama-chat/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Ollama Chat — stdio bridge for ckan-mcp-server
2+
3+
This example provides a stdio bridge that allows MCP clients configured for local process communication (e.g. Claude Desktop) to talk to a `ckan-mcp-server` instance running as an HTTP container.
4+
5+
```
6+
MCP client (stdio) <---> ckan-mcp-bridge.js <---> ckan-mcp-server (HTTP)
7+
```
8+
9+
## Prerequisites
10+
11+
- `ckan-mcp-server` running as a Docker container (see [`docker/README.md`](../../docker/README.md))
12+
- Node.js installed on the host machine
13+
14+
## Usage
15+
16+
### Claude Desktop
17+
18+
Add this to `claude_desktop_config.json`:
19+
20+
```json
21+
{
22+
"mcpServers": {
23+
"ckan": {
24+
"command": "node",
25+
"args": ["/path/to/ckan-mcp-server/examples/ollama-chat/ckan-mcp-bridge.js"],
26+
"env": {
27+
"MCP_URL": "http://localhost:3000/mcp"
28+
}
29+
}
30+
}
31+
}
32+
```
33+
34+
Set `MCP_URL` to point to your Docker host if the container runs on a remote machine.
35+
36+
### Environment Variables
37+
38+
| Variable | Default | Description |
39+
|----------|---------|-------------|
40+
| `MCP_URL` | `http://localhost:3000/mcp` | URL of the running ckan-mcp-server |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Change: Add CONTRIBUTING.md
2+
3+
## Why
4+
5+
External contributors (e.g. PR #14) repeatedly hit the same friction points: wrong language, wrong file placement, local fork diffs leaking in. A single reference document would cut review round-trips.
6+
7+
## What Changes
8+
9+
- Add `CONTRIBUTING.md` at repo root with:
10+
- Language policy (English only)
11+
- Commit message conventions (written inline, not linked)
12+
- Project structure overview (where files belong)
13+
- PR checklist (clean branch, no unrelated diffs)
14+
- How to add examples (`examples/<name>/`)
15+
16+
## Impact
17+
18+
- Affected specs: contributor-guide (new)
19+
- Affected code: none (docs only)
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## ADDED Requirements
2+
3+
### Requirement: Contribution Guide Document
4+
The project SHALL provide a `CONTRIBUTING.md` at the repo root that covers language policy, commit conventions, project structure, and PR checklist.
5+
6+
#### Scenario: Language policy
7+
- **WHEN** a contributor opens the file
8+
- **THEN** they see that all code, comments, docs, and commit messages must be in English
9+
10+
#### Scenario: Commit conventions
11+
- **WHEN** a contributor reads the commit section
12+
- **THEN** they see the format: `<type>: <short description>` with allowed types (feat, fix, docs, chore, refactor, test)
13+
14+
#### Scenario: Project structure
15+
- **WHEN** a contributor reads the structure section
16+
- **THEN** they understand where files belong: src/ for code, docs/ for docs, examples/ for community integrations, docker/ for Docker core files
17+
18+
#### Scenario: PR checklist
19+
- **WHEN** a contributor reads the PR section
20+
- **THEN** they see: branch from main, no unrelated diffs, no local-only files (e.g. portals.json changes), tests pass
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1. Implementation
2+
- [x] 1.1 Write `CONTRIBUTING.md` at repo root
3+
- [x] 1.2 Verify language, commit, structure, and PR sections are all present
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Change: Add examples/ structure
2+
3+
## Why
4+
5+
PR #14 introduced an Ollama+React integration but had no clear home. `docker/ckan-mcp-bridge.js` ended up in `docker/` even though it belongs to that integration, not to the core Docker setup. A formalized `examples/` pattern prevents this ambiguity for future contributors.
6+
7+
## What Changes
8+
9+
- Move `docker/ckan-mcp-bridge.js``examples/ollama-chat/ckan-mcp-bridge.js`
10+
- Add `examples/ollama-chat/README.md` documenting the integration
11+
- Update `docker/README.md` to remove reference to the bridge
12+
- Update root `.gitignore`: replace specific `examples/langgraph/` with a policy comment
13+
- Document the `examples/<name>/` pattern in `CONTRIBUTING.md` (companion to add-contributing-guide)
14+
15+
## Impact
16+
17+
- Affected specs: examples-structure (new)
18+
- Affected code: `docker/README.md`, `docker/ckan-mcp-bridge.js` (moved), `.gitignore`
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## ADDED Requirements
2+
3+
### Requirement: Examples Folder Convention
4+
The project SHALL maintain an `examples/` folder for community integrations, where each integration lives in its own subdirectory with a README.
5+
6+
#### Scenario: New integration placement
7+
- **WHEN** a contributor adds an integration (e.g. Ollama, LangGraph)
8+
- **THEN** it goes under `examples/<integration-name>/` with at minimum a `README.md`
9+
10+
#### Scenario: Core Docker files unaffected
11+
- **WHEN** a contributor looks at `docker/`
12+
- **THEN** they find only files needed to run the MCP server itself (Dockerfile, docker-compose.yml, docker/README.md)
13+
14+
### Requirement: Ollama Chat Example
15+
The project SHALL include `examples/ollama-chat/` with the stdio bridge and documentation for running the server via Ollama.
16+
17+
#### Scenario: Bridge file location
18+
- **WHEN** a user needs the stdio bridge for Ollama
19+
- **THEN** they find it at `examples/ollama-chat/ckan-mcp-bridge.js`
20+
21+
#### Scenario: README present
22+
- **WHEN** a user opens `examples/ollama-chat/`
23+
- **THEN** they find a README explaining how to use the bridge with Ollama

0 commit comments

Comments
 (0)