@manfred-kunze-dev/backbone-mcp-server 2.6.0-dev.4 → 2.7.0-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +66 -253
  2. package/package.json +2 -6
package/README.md CHANGED
@@ -1,66 +1,30 @@
1
1
  # Backbone MCP Server
2
2
 
3
- An [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that exposes the Backbone AI platform as tools for LLMs. It lets AI assistants manage projects, define schemas, run extractions, convert documents, transcribe audio, and more all through a standardized tool interface.
3
+ An [MCP (Model Context Protocol)](https://modelcontextprotocol.io/) server that gives AI coding assistants direct access to the [Backbone AI](https://backbone.manfred-kunze.dev) platform manage projects, run extractions, convert documents, and more from your IDE.
4
4
 
5
- ## Setup
6
-
7
- ### Prerequisites
8
-
9
- - **Node.js** >= 18.0.0
10
- - **Backbone backend** running and accessible (local or remote)
11
- - A valid **API key** for the Backbone backend
12
-
13
- ### Install Dependencies
14
-
15
- ```bash
16
- cd mcp
17
- npm install
18
- ```
19
-
20
- ### Build
21
-
22
- ```bash
23
- npm run build
24
- ```
25
-
26
- This compiles TypeScript from `src/` into `dist/`.
27
-
28
- ### Environment Variables
29
-
30
- | Variable | Required | Default | Description |
31
- |---|---|---|---|
32
- | `BACKBONE_API_KEY` | Yes | — | API key for authenticating with the Backbone backend |
33
- | `BACKBONE_BASE_URL` | No | `https://backbone.manfred-kunze.dev/api` | Base URL of the Backbone backend including the API prefix. Override for local development (e.g. `http://localhost:8080/api`) |
34
- | `MCP_TRANSPORT` | No | `stdio` | Transport mode: `stdio` or `http` |
35
- | `MCP_HTTP_PORT` | No | `3100` | Port for the HTTP transport (only used when `MCP_TRANSPORT=http`) |
36
-
37
- ### Running the Server
38
-
39
- **Stdio transport** (default — for use with Claude Code, Cursor, etc.):
5
+ ## Installation
40
6
 
41
7
  ```bash
42
- BACKBONE_API_KEY=your-key BACKBONE_BASE_URL=http://localhost:8080/api npm start
8
+ npm install -g @manfred-kunze-dev/backbone-mcp-server
43
9
  ```
44
10
 
45
- **HTTP transport** (for network-accessible deployments):
11
+ Or run directly with `npx` (no install needed):
46
12
 
47
13
  ```bash
48
- BACKBONE_API_KEY=your-key BACKBONE_BASE_URL=http://localhost:8080/api MCP_TRANSPORT=http npm start
14
+ npx @manfred-kunze-dev/backbone-mcp-server
49
15
  ```
50
16
 
51
- The HTTP server exposes:
52
- - `POST /mcp` — MCP Streamable HTTP endpoint
53
- - `GET /health` — Health check
17
+ ## Quick Start
54
18
 
55
- **Development mode** (auto-recompile on changes):
19
+ 1. Create an API key in the Backbone dashboard under **API Keys**
20
+ 2. Add the server to your IDE's MCP configuration (see below)
21
+ 3. Start asking your AI assistant to manage your Backbone resources
56
22
 
57
- ```bash
58
- npm run dev
59
- ```
23
+ ## IDE Configuration
60
24
 
61
- ### Connecting to Claude Code
25
+ ### Claude Code
62
26
 
63
- Add the server to your Claude Code MCP configuration (`.claude/settings.local.json` or similar):
27
+ Add to `.claude/settings.local.json` in your project root:
64
28
 
65
29
  ```json
66
30
  {
@@ -69,18 +33,17 @@ Add the server to your Claude Code MCP configuration (`.claude/settings.local.js
69
33
  "command": "npx",
70
34
  "args": ["@manfred-kunze-dev/backbone-mcp-server"],
71
35
  "env": {
72
- "BACKBONE_API_KEY": "your-api-key",
73
- "BACKBONE_BASE_URL": "http://localhost:8080/api"
36
+ "BACKBONE_API_KEY": "sk_your_api_key"
74
37
  }
75
38
  }
76
39
  }
77
40
  }
78
41
  ```
79
42
 
80
- ### Connecting to Cursor
43
+ ### Cursor
44
+
45
+ Add to `.cursor/mcp.json` in your project root:
81
46
 
82
- Add to your `.cursor/mcp.json`:
83
- u
84
47
  ```json
85
48
  {
86
49
  "mcpServers": {
@@ -88,224 +51,74 @@ u
88
51
  "command": "npx",
89
52
  "args": ["@manfred-kunze-dev/backbone-mcp-server"],
90
53
  "env": {
91
- "BACKBONE_API_KEY": "your-api-key",
92
- "BACKBONE_BASE_URL": "http://localhost:8080/api"
54
+ "BACKBONE_API_KEY": "sk_your_api_key"
93
55
  }
94
56
  }
95
57
  }
96
58
  }
97
59
  ```
98
60
 
99
- > **Installing from the GitLab registry:** Configure npm to use the GitLab registry for the `@manfred-kunze-dev` scope by adding this to your `.npmrc`:
100
- > ```
101
- > @manfred-kunze-dev:registry=https://gitlab.com/api/v4/projects/<PROJECT_ID>/packages/npm/
102
- > //gitlab.com/api/v4/projects/<PROJECT_ID>/packages/npm/:_authToken=<YOUR_TOKEN>
103
- > ```
104
-
105
- ---
106
-
107
- ## Available Tools
108
-
109
- ### Projects
110
-
111
- Manage projects within your organization.
112
-
113
- | Tool | Description | Parameters |
114
- |---|---|---|
115
- | `backbone_list_projects` | List projects with optional search and pagination | `search?`, `page?`, `size?`, `sort?` |
116
- | `backbone_get_project` | Get a project by ID | `projectId` |
117
- | `backbone_create_project` | Create a new project | `name`, `description?` |
118
- | `backbone_update_project` | Update a project | `projectId`, `name?`, `description?` |
119
- | `backbone_delete_project` | Delete a project and all its data (irreversible) | `projectId` |
120
-
121
- ### Schemas
122
-
123
- Define extraction schemas within projects. Schemas describe the structure of data to extract.
124
-
125
- | Tool | Description | Parameters |
126
- |---|---|---|
127
- | `backbone_list_schemas` | List schemas in a project | `projectId`, `search?`, `page?`, `size?`, `sort?` |
128
- | `backbone_get_schema` | Get a schema by ID | `projectId`, `schemaId` |
129
- | `backbone_create_schema` | Create a new schema | `projectId`, `name`, `description?`, `content?` |
130
- | `backbone_update_schema` | Update a schema | `projectId`, `schemaId`, `name?`, `description?`, `content?` |
131
- | `backbone_delete_schema` | Delete a schema and all its versions (irreversible) | `projectId`, `schemaId` |
132
-
133
- ### Schema Versions
134
-
135
- Manage versioned snapshots of schema definitions.
136
-
137
- | Tool | Description | Parameters |
138
- |---|---|---|
139
- | `backbone_create_schema_version` | Create a new version (becomes active) | `projectId`, `schemaId`, `jsonSchema`, `changeDescription?` |
140
- | `backbone_list_schema_versions` | List all versions of a schema | `projectId`, `schemaId`, `page?`, `size?` |
141
- | `backbone_get_schema_version` | Get a specific version | `projectId`, `schemaId`, `versionId` |
142
- | `backbone_get_latest_schema_version` | Get the latest active version | `projectId`, `schemaId` |
143
- | `backbone_activate_schema_version` | Re-activate a historical version | `projectId`, `schemaId`, `versionId` |
144
-
145
- ### Schema Testing
146
-
147
- Validate schemas and test extractions without persisting data.
148
-
149
- | Tool | Description | Parameters |
150
- |---|---|---|
151
- | `backbone_validate_schema` | Validate a JSON Schema definition | `projectId`, `schemaId`, `jsonSchema` |
152
- | `backbone_test_schema` | Test a schema against sample text with AI extraction | `projectId`, `schemaId`, `jsonSchema`, `sampleText`, `model` |
153
-
154
- ### Extractions
155
-
156
- Extract structured data from text using schemas and AI models.
157
-
158
- | Tool | Description | Parameters |
159
- |---|---|---|
160
- | `backbone_create_extraction` | Extract data from text (sync or async) | `projectId`, `schemaId`, `inputText`, `model`, `schemaVersionId?`, `async?` |
161
- | `backbone_get_extraction` | Get an extraction by ID (check status or retrieve results) | `projectId`, `extractionId` |
162
- | `backbone_list_extractions` | List extractions with filtering | `projectId`, `status?`, `schemaVersionId?`, `search?`, `page?`, `size?`, `sort?` |
163
- | `backbone_estimate_tokens` | Estimate token usage without executing | `projectId`, `schemaId`, `inputText`, `schemaVersionId?` |
164
- | `backbone_rerun_extraction` | Re-run an existing extraction | `projectId`, `extractionId` |
165
-
166
- ### Document Conversion
167
-
168
- Convert documents (PDF, DOCX, etc.) to Markdown, text, HTML, or JSON.
169
-
170
- | Tool | Description | Parameters |
171
- |---|---|---|
172
- | `backbone_convert_document` | Convert documents from URLs, base64, or local files | `sources[]` (type, url/data/path, filename), `outputFormats?`, `pageRange?`, `async?` |
173
- | `backbone_get_task_status` | Check status of an async conversion task | `taskId`, `wait?` |
174
- | `backbone_get_task_result` | Get the result of a completed conversion | `taskId` |
175
-
176
- Each source in `sources` can be:
177
- - **`url`** — fetch from a URL
178
- - **`base64`** — provide raw base64 data with a filename
179
- - **`file`** — provide a local file path (automatically read and encoded)
180
-
181
- ### Audio Transcription
182
-
183
- Transcribe audio files using AI models.
184
-
185
- | Tool | Description | Parameters |
186
- |---|---|---|
187
- | `backbone_transcribe_audio` | Transcribe an audio file | `filePath`, `model`, `language?`, `prompt?`, `responseFormat?`, `temperature?` |
188
-
189
- Supported formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, webm.
190
-
191
- ### AI Gateway
61
+ ### Windsurf
192
62
 
193
- Access multiple AI providers through a unified OpenAI-compatible interface.
63
+ Add to `.windsurf/mcp.json` in your project root:
194
64
 
195
- | Tool | Description | Parameters |
196
- |---|---|---|
197
- | `backbone_chat` | Send a chat completion request | `model`, `messages[]`, `temperature?`, `max_tokens?`, `top_p?`, `frequency_penalty?`, `presence_penalty?`, `stop?`, `response_format?`, `tools?`, `tool_choice?` |
198
- | `backbone_list_models` | List available AI models and providers | *(none)* |
199
-
200
- Models use the format `provider/model` (e.g. `openai/gpt-4o`, `anthropic/claude-sonnet-4-5-20250929`).
201
-
202
- ### API Documentation
203
-
204
- Browse the backend's OpenAPI documentation by section. Useful for understanding endpoint details, request/response shapes, and parameter constraints.
205
-
206
- | Tool | Description | Parameters |
207
- |---|---|---|
208
- | `backbone_list_api_doc_sections` | List available doc sections (tags) with endpoint counts | *(none)* |
209
- | `backbone_get_api_docs` | Fetch filtered docs for a specific section | `tag` |
210
-
211
- > **Note:** Requires `SPRINGDOC_ENABLED=true` on the backend. If docs are disabled, these tools return an informative error message.
212
-
213
- The `get_api_docs` tool returns only the endpoints and schemas relevant to the requested tag, keeping context usage minimal. The OpenAPI spec is cached in memory after the first fetch.
214
-
215
- ---
216
-
217
- ## Development
218
-
219
- ```bash
220
- # Build
221
- npm run build
222
-
223
- # Dev mode (watch + auto-recompile)
224
- npm run dev
225
-
226
- # Start
227
- npm start
228
-
229
- # Type-check without emitting
230
- npm run typecheck
231
-
232
- # Debug with MCP Inspector
233
- npm run inspect
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "backbone": {
69
+ "command": "npx",
70
+ "args": ["@manfred-kunze-dev/backbone-mcp-server"],
71
+ "env": {
72
+ "BACKBONE_API_KEY": "sk_your_api_key"
73
+ }
74
+ }
75
+ }
76
+ }
234
77
  ```
235
78
 
236
- ### OpenAPI Type Generation
237
-
238
- Types are generated from the backend's OpenAPI spec using `openapi-typescript`. This ensures that all API calls are type-checked at compile time — if the backend renames a field, the MCP server won't compile until updated.
239
-
240
- **Prerequisites:**
241
- - A running Backbone backend at `http://localhost:8080` (or pass a custom URL as argument)
242
- - `BACKBONE_API_KEY` set — either in a `.env` file or as an environment variable
243
-
244
- ```bash
245
- # Set up your .env (one-time)
246
- cp .env.example .env
247
- # Then edit .env with your API key
248
-
249
- # Full pipeline: fetch spec from backend + generate TypeScript types
250
- npm run generate
79
+ ### OpenAI Codex CLI
251
80
 
252
- # Individual steps:
253
- npm run generate:spec # Fetch spec → openapi/openapi.json
254
- npm run generate:types # Generate types → src/generated/openapi.d.ts
81
+ Add to `~/.codex/config.json`:
255
82
 
256
- # CI drift check: compare committed spec against live backend
257
- npm run check:spec
83
+ ```json
84
+ {
85
+ "mcpServers": {
86
+ "backbone": {
87
+ "command": "npx",
88
+ "args": ["@manfred-kunze-dev/backbone-mcp-server"],
89
+ "env": {
90
+ "BACKBONE_API_KEY": "sk_your_api_key"
91
+ }
92
+ }
93
+ }
94
+ }
258
95
  ```
259
96
 
260
- > **Note:** `generate:types` does not need the API key — it reads from the committed `openapi/openapi.json` file. The `.env` file is loaded automatically by the `generate:spec` and `check:spec` scripts.
261
-
262
- **When to regenerate:**
263
- - After any backend API change (new endpoints, renamed fields, changed DTOs)
264
- - The `check:spec` script can be used in CI to detect stale types automatically
97
+ Works with any MCP-compatible client using the same configuration pattern.
265
98
 
266
- **How it works:**
99
+ ## Environment Variables
267
100
 
268
- 1. `generate:spec` Fetches the OpenAPI spec from the backend's `/v3/api-docs` endpoint and saves it to `openapi/openapi.json`
269
- 2. `generate:types` — Runs `openapi-typescript` to convert `openapi.json` into TypeScript type definitions at `src/generated/openapi.d.ts`
270
- 3. `check:spec` CI guard that compares the committed `openapi.json` against the live backend. Exits non-zero if they differ.
101
+ | Variable | Required | Default | Description |
102
+ |----------|----------|---------|-------------|
103
+ | `BACKBONE_API_KEY` | Yes | | API key for authenticating with the Backbone backend |
104
+ | `BACKBONE_BASE_URL` | No | `https://backbone.manfred-kunze.dev/api` | Base URL of your Backbone instance |
105
+ | `MCP_TRANSPORT` | No | `stdio` | Transport mode: `stdio` or `http` |
106
+ | `MCP_HTTP_PORT` | No | `3100` | Port for HTTP transport |
271
107
 
272
- Both `mcp/` and `cli/` share the same backend spec and generated types.
108
+ ## Available Tools
273
109
 
274
- ### Project Structure
110
+ | Category | Tools |
111
+ |----------|-------|
112
+ | **Projects** | List, get, create, update, delete projects |
113
+ | **Schemas** | CRUD operations, version management, validation, testing |
114
+ | **Extractions** | Create extractions (sync/async), estimate tokens, re-run |
115
+ | **Document Conversion** | Convert PDFs, DOCX, images to Markdown/text/HTML/JSON |
116
+ | **Transcription** | Transcribe audio files (flac, mp3, mp4, ogg, wav, webm) |
117
+ | **AI Gateway** | Chat completions, list available models |
118
+ | **API Docs** | Browse API documentation by section |
275
119
 
276
- ```
277
- mcp/
278
- ├── openapi/
279
- │ ├── openapi.json # Committed OpenAPI spec (generated)
280
- │ └── scripts/
281
- │ ├── fetch-spec.ts # Downloads spec from running backend
282
- │ └── check-drift.ts # CI guard for spec drift detection
283
- ├── src/
284
- │ ├── index.ts # Entry point, transport setup, tool registration
285
- │ ├── client.ts # openapi-fetch client factory with error middleware
286
- │ ├── errors.ts # Error types and MCP error formatting
287
- │ ├── mime.ts # MIME type detection for file uploads
288
- │ ├── schema-compat.ts # OpenAI-compatible schema enforcement
289
- │ ├── generated/
290
- │ │ └── openapi.d.ts # Auto-generated TypeScript types (do not edit)
291
- │ └── tools/
292
- │ ├── ai-gateway.ts # Chat completions & model listing
293
- │ ├── conversion.ts # Document conversion
294
- │ ├── docs.ts # API documentation browsing
295
- │ ├── extraction.ts # Data extraction
296
- │ ├── projects.ts # Project CRUD
297
- │ ├── schema-testing.ts # Schema validation & testing
298
- │ ├── schema-versions.ts # Schema version management
299
- │ ├── schemas.ts # Schema CRUD
300
- │ └── transcription.ts # Audio transcription
301
- ├── dist/ # Compiled output (generated)
302
- ├── package.json
303
- └── tsconfig.json
304
- ```
120
+ For full tool documentation, see the [Backbone docs](https://backbone.manfred-kunze.dev).
305
121
 
306
- ### Adding New Tools
122
+ ## License
307
123
 
308
- 1. Create a new file in `src/tools/` following the existing pattern
309
- 2. Export a `register(server: McpServer, client: ApiClient): void` function
310
- 3. Import and call `register()` in `src/index.ts`
311
- 4. Rebuild with `npm run build`
124
+ Proprietary see [LICENSE](./LICENSE) for details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manfred-kunze-dev/backbone-mcp-server",
3
- "version": "2.6.0-dev.4",
3
+ "version": "2.7.0-dev.2",
4
4
  "description": "MCP server for the Backbone AI platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -36,11 +36,7 @@
36
36
  "registry": "https://registry.npmjs.org",
37
37
  "access": "public"
38
38
  },
39
- "repository": {
40
- "type": "git",
41
- "url": "https://gitlab.com/manfred-kunze-dev/backbone.git",
42
- "directory": "mcp"
43
- },
39
+ "homepage": "https://backbone.manfred-kunze.dev",
44
40
  "files": [
45
41
  "dist/**/*.js",
46
42
  "dist/**/*.d.ts"