docbot-mcp 1.0.2 → 1.0.4

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.
@@ -0,0 +1,57 @@
1
+ # GitHub Copilot Instructions for docbot-mcp
2
+
3
+ ## Purpose
4
+ Provide workspace-specific guidance for Copilot Chat agents to work effectively in this small Node.js MCP server project.
5
+
6
+ ## Project brief
7
+ - Node.js (ES modules, `type: module`) MCP server for CSV/JSON/Markdown conversion.
8
+ - Two transports: HTTP (`index.js`) and stdio (`index-stdio.js`).
9
+ - Minimal scripts (`npm start` for HTTP), no automated tests currently.
10
+ - Dependencies: `@modelcontextprotocol/sdk`, `@rflukerii/docbot`, `express`, `zod`.
11
+
12
+ ## Key files
13
+ - `index.js` : main server (HTTP + Express on port 3000, MCP tool registration)
14
+ - `index-stdio.js` : stdio transport alternative
15
+ - `README.md` : most up-to-date usage, architecture and examples
16
+ - `package.json` : scripts + dependencies
17
+
18
+ ## Build / test commands
19
+ - `npm install`
20
+ - `npm start` (starts production-like server on localhost:3000)
21
+ - `node index-stdio.js` (stdio transport)
22
+
23
+ > Note: no test suite exists, implement new tests in a modern style (Jest/Mocha/Node test runner) if requested.
24
+
25
+ ## Architecture notes
26
+ - Each POST to `/docbot-mcp` creates a new MCP server via `createServer` and `StreamableHTTPServerTransport`.
27
+ - Tools are registered via `server.registerTool()` with Zod schema validation.
28
+ - Conversion logic primarily lives in the `@rflukerii/docbot` package and is wrapped by MCP tool handlers.
29
+
30
+ ## Conventions / style
31
+ - ES modules (`import` / `export`) throughout.
32
+ - Keep payloads as text (`type: 'text'`, `content` array) in MCP responses.
33
+ - Avoid mutating shared state; each request new server context.
34
+ - For new tool additions, follow the registration pattern in `index.js`.
35
+
36
+ ## Common changes
37
+ - Add tool: update `index.js` tool registry + README docs
38
+ - Transport behavior: follow patterns for `StreamableHTTPServerTransport` and stdio setup
39
+
40
+ ## Gotchas
41
+ - Do not use `require()` (Esm only).
42
+ - Express v5 middleware and response flow must match existing behavior.
43
+ - Keep `content` as string arrays; avoid mixing objects in response type unless MCP spec supports.
44
+
45
+ ## Example prompts
46
+ 1. "Add tool `yamlToJson` in `index.js` with schema `yaml: z.string()`, converting YAML text to JSON string output."
47
+ 2. "Refactor server lifecycle in `index.js` so MCP server instance is reused across requests but still isolates tool execution per request."
48
+ 3. "Add basic Jest tests for `csvToJson` and `jsonToCsv` using `node index-stdio.js` or direct function exports."
49
+
50
+ ## Next agent customizations
51
+ - **agent**: `create-agent docbot-mcp/dev` (focus on tool authoring and transport patches).
52
+ - **prompt**: `create-prompt docbot-mcp/add-tool` (guides on how to add tools with converters and Zod schemas).
53
+ - **hook**: `create-hook docbot-mcp/on-run-tests` (automate test command from unobtrusive mode).
54
+
55
+ ---
56
+
57
+ > This file is intended as workspace bootstrap for Copilot Chat. Keep it minimal, precise, and updated when major architecture or dependency changes occur.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: chat-instructions
3
+ description: Chatbot response rules and guidelines
4
+ ---
5
+
6
+ # Chat Instructions
7
+
8
+ These instructions govern how chatbots respond to user prompts. Chatbots and large-language models must strictly adhere to these rules at all times.
9
+
10
+ **Rule 1: Always limit responses to a maximum of 30 words**
11
+
12
+ **Rule 2: Chat in a conversational manner**
13
+
14
+ A conversational manner means:
15
+
16
+ - Use natural language that mimics human conversation
17
+ - Write direct and concise statements or questions
18
+ - Exchange back-and-forth dialogue addressing one idea or topic at a time
19
+ - Avoid providing multiple suggestions, explanations, or solutions in a single response
20
+ - When the user writes a declarative prompt:
21
+ - Do NOT immediately provide answers, suggestions or explanations
22
+ - Respond with a simple acknowledgement
23
+ - Ask a question to clarify intent--a declarative prompt may be a prelude to an imperative or interrogative prompt
24
+
25
+ **Rule 3: Tutoring the User**
26
+
27
+ When the user asks how to complete a complex procedure such as coding and developing a user-interface, adhere to the following rules:
28
+
29
+ - **Do not immediately provide a full solution:**\
30
+ Begin by framing the problem to help the user reason about the solution themselves.
31
+
32
+ - **Surface initial thought starters:**\
33
+ Share guiding principles or foundational concepts relevant to the task (e.g., componentization, data flow, layout hierarchy, state boundaries).
34
+
35
+ - **Ask probing, clarifying questions:**\
36
+ Use questions to uncover intent, constraints, and assumptions. The goal is to lead the user's thinking, not to guess on their behalf.
37
+
38
+ - **Facilitate decomposition:**\
39
+ Use chain-of-thought (CoT) reasoning to break down complex procedures into smaller, manageable steps and present each step sequentially. (e.g., pages → sections → components → behaviors).
40
+
41
+ - **Use conversational scaffolding:**\
42
+ Phrase guidance in a way that nudges the user toward the correct approach without asserting the solution. Avoid prescriptive language unless explicitly prompted.
43
+
44
+ - **Casually confirm understanding:**\
45
+ Periodically check the user's comprehension with a short quiz e.g. "Does this distinction make sense?" or "Can you explain why we'd lift this state?".
@@ -0,0 +1,97 @@
1
+ # Version Control Instructions
2
+
3
+ Git is the version-control system used for this project.
4
+
5
+ Follow the rules below when a user prompts you to complete a task related to version control.
6
+
7
+ ## Copilot Capabilities
8
+
9
+ You are allowed to carry out ONLY the following two actions:
10
+
11
+ 1. Examine the git working directory to determine whether the modified files belong in the same commit.
12
+ 2. Write a commit message for staged files adhering to the guidelines in "Writing Commit Messages" below.
13
+
14
+ ### Allowed Commands
15
+
16
+ Copilot may always run the following commands without asking for permission:
17
+
18
+ - **git status --short**\
19
+ List files that are in the working directory as well as files that are staged for commit.
20
+
21
+ - **git diff --name-only**\
22
+ List files in the working diretory that have unstaged changes.
23
+
24
+ - **git diff --staged --name-only**\
25
+ List files that are staged for commit.
26
+
27
+ ### Prohibited Commands
28
+
29
+ Copilot is NEVER allowed to modify the index nor run the following commands regardless of user permission:
30
+
31
+ - **git add [file]**\
32
+ NEVER stage a file for commit.
33
+
34
+ - **git commit -m "[message]"**\
35
+ NEVER create a commit.
36
+
37
+ - **git restore [file]**\
38
+ NEVER discard changes in the working directory.
39
+
40
+ - **git reset [file]**\
41
+ NEVER unstage a file.
42
+
43
+ - **git push**\
44
+ NEVER push commits to a remote repository.
45
+
46
+ - **git pull**\
47
+ NEVER pull changes from a remote repository.
48
+
49
+
50
+ - Always examine the diffs of staged files to get context for commit messages
51
+ - List staged files by executing `git diff --cached --name-only`
52
+ - View file diffs, run `git diff --cached`
53
+ - If there are no staged files:
54
+ - Do not write a commit message
55
+ - Inform the user, "There are not staged files"
56
+
57
+ ## Writing Commit Messages
58
+
59
+ Commit messages must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) structure including:
60
+
61
+ 1. Use the imperative mood -- the message should complete the sentence: "If applied, this commit will __"
62
+ 2. Insert a blank line between the subject and the body
63
+ 3. Limit the subject to a maximum of 50 characters
64
+ 4. Wrap the body lines at approximately 72 characters
65
+ 5. Use Conventional Commit prefixes (e.g., `feat:`, `fix:`, `docs:`, `refactor`, `revert`)
66
+
67
+ Carry out the following steps when prompted to write a commit message:
68
+
69
+ 1. Check for staged files: run `git diff --staged --name-only`
70
+ 2. If there are no staged files:
71
+ - Do not write a commit message
72
+ - Inform the user, "There are not staged files"
73
+
74
+ If there are staged files:
75
+
76
+ 1. Run `git diff --staged` to examine the diffs and get context for commit messages
77
+ 2. Based on the file diffs, infer the message's structural elements including:
78
+ - Prefix
79
+ - Optional scope
80
+ - Body
81
+ - Footer
82
+ 3. Output the commit message inside the chat panel for the user to preview prior to commit
83
+
84
+ ### Example Message Structure
85
+
86
+ ```
87
+ feat(auth): add OAuth2 provider for Google logins
88
+
89
+ Implement the Google-specific strategy within the passport middleware.
90
+ This allows users to authenticate using their corporate accounts.
91
+
92
+ Fixes: #102
93
+ ```
94
+
95
+ ## References
96
+
97
+ [Git documentation](https://git-scm.com/docs "Official Git docs")
package/CHANGELOG.md CHANGED
@@ -1,20 +1,33 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## [1.0.2] - 2026-03-09
6
- ### Added
7
- - Add `mcpName` to package.json for MCP registry registration
8
- - Add `server.json` for MCP registry metadata
9
-
10
- ## [1.0.1] - 2026-03-07
11
- ### Changed
12
- - Migrate from stdio to HTTP transport
13
-
14
- ## [1.0.0] - 2026-03-05
15
- ### Added
16
- - Initial release
17
- - `csvToJson` — converts CSV string to JSON array
18
- - `jsonToCsv` converts JSON array to CSV string
19
- - `jsonToMarkdown` — converts JSON array to Markdown table
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [1.0.4] - 2026-03-15
6
+ ### Changed
7
+ - Move sample data into `data/` subfolder for better organization
8
+ - Remove exposed App Runner URL from server settings
9
+ - Update `.gitignore` with MCP registry ignore rules
10
+ - Add `sample_data.csv` fixture under `data/`
11
+ - Add script to sync version between package files
12
+
13
+ ## [1.0.3] - 2026-03-14
14
+ ### Changed
15
+ - Update HTTP MCP endpoint from `/mcp` to `/docbot-mcp` for all incoming requests
16
+ - Bump `server.json` package/service version to 1.0.3
17
+
18
+ ## [1.0.2] - 2026-03-09
19
+ ### Added
20
+ - Add `mcpName` to package.json for MCP registry registration
21
+ - Add `server.json` for MCP registry metadata
22
+
23
+ ## [1.0.1] - 2026-03-07
24
+ ### Changed
25
+ - Migrate from stdio to HTTP transport
26
+
27
+ ## [1.0.0] - 2026-03-05
28
+ ### Added
29
+ - Initial release
30
+ - `csvToJson` — converts CSV string to JSON array
31
+ - `jsonToCsv` — converts JSON array to CSV string
32
+ - `jsonToMarkdown` — converts JSON array to Markdown table
20
33
  - `csvToMarkdown` — converts CSV string to Markdown table
package/README.md CHANGED
@@ -1,177 +1,177 @@
1
- # docbot-mcp
2
-
3
- Bidirectional CSV ↔️ JSON ↔️ Markdown transformer exposed as an MCP (Model Context Protocol) server with HTTP transport.
4
-
5
- ## Overview
6
-
7
- **docbot-mcp** is a Model Context Protocol server that provides tools for converting between CSV, JSON, and Markdown formats. It's built on the [Model Context Protocol](https://modelcontextprotocol.io/) and designed for deployment on serverless platforms like AWS App Runner.
8
-
9
- ## Features
10
-
11
- - ✅ **CSV to JSON** — Parse CSV strings into JSON arrays
12
- - ✅ **JSON to CSV** — Serialize JSON arrays to CSV format
13
- - ✅ **CSV to Markdown** — Convert CSV to formatted Markdown tables
14
- - ✅ **JSON to Markdown** — Convert JSON arrays to Markdown tables
15
- - ✅ **HTTP-based** — REST API endpoint for easy integration
16
- - ✅ **Containerized** — Ready for deployment on AWS App Runner, Docker, etc.
17
-
18
- ## Installation
19
-
20
- ```bash
21
- npm install
22
- ```
23
-
24
- ### Requirements
25
-
26
- - Node.js 16+ (ES modules support)
27
- - Dependencies:
28
- - `@modelcontextprotocol/sdk` — MCP protocol implementation
29
- - `@rflukerii/docbot` — Document conversion utilities
30
- - `express` — HTTP server framework
31
- - `zod` — Input validation
32
-
33
- ## Usage
34
-
35
- ### Starting the Server
36
-
37
- ```bash
38
- npm start
39
- ```
40
-
41
- The server starts on `http://localhost:3000` with the MCP endpoint at `/docbot-mcp`.
42
-
43
- ### Available Tools
44
-
45
- All tools accept input as text parameters and return formatted text responses.
46
-
47
- #### csvToJson
48
- Converts a CSV string to JSON format.
49
-
50
- **Input:** `csv` (string)
51
- **Output:** JSON array as string
52
-
53
- ```bash
54
- curl -X POST http://localhost:3000/docbot-mcp \
55
- -H "Content-Type: application/json" \
56
- -d '{"tool": "csvToJson", "input": {"csv": "name,age\nAlice,30"}}'
57
- ```
58
-
59
- #### jsonToCsv
60
- Converts a JSON array to CSV format.
61
-
62
- **Input:** `json` (string)
63
- **Output:** CSV string
64
-
65
- ```bash
66
- curl -X POST http://localhost:3000/docbot-mcp \
67
- -H "Content-Type: application/json" \
68
- -d '{"tool": "jsonToCsv", "input": {"json": "[{\"name\":\"Alice\",\"age\":30}]"}}'
69
- ```
70
-
71
- #### csvToMarkdown
72
- Converts a CSV string to a Markdown table.
73
-
74
- **Input:** `csv` (string)
75
- **Output:** Markdown table string
76
-
77
- #### jsonToMarkdown
78
- Converts a JSON array to a Markdown table.
79
-
80
- **Input:** `json` (string)
81
- **Output:** Markdown table string
82
-
83
- ## Architecture
84
-
85
- ### HTTP Transport
86
-
87
- The server uses `StreamableHTTPServerTransport` instead of stdio for better compatibility with containerized environments. Each request to `/docbot-mcp` creates a new server instance, processes the MCP request, and returns the result.
88
-
89
- ```
90
- Express Server (port 3000)
91
-
92
- POST /docbot-mcp endpoint
93
-
94
- MCP Server instance (createServer)
95
-
96
- StreamableHTTPServerTransport
97
-
98
- Tool execution (csvToJson, jsonToCsv, etc.)
99
-
100
- Response back to client
101
- ```
102
-
103
- ### File Structure
104
-
105
- - `index.js` — Main HTTP server entry point (AWS App Runner compatible)
106
- - `index-stdio.js` — Stdio transport version (for local/stdio-based clients)
107
- - `package.json` — Dependencies and scripts
108
-
109
- ## Deployment
110
-
111
- ### AWS App Runner
112
-
113
- The server includes a `start` script configured for AWS App Runner:
114
-
115
- ```json
116
- {
117
- "scripts": {
118
- "start": "node index.js"
119
- }
120
- }
121
- ```
122
-
123
- **Steps to deploy:**
124
-
125
- 1. Push code to AWS CodeCommit, GitHub, or BitBucket
126
- 2. Create AWS App Runner service
127
- 3. Configure source as your repository
128
- 4. Set build command: `npm install`
129
- 5. Set start command: `npm start`
130
- 6. App Runner will automatically run the server on port 3000
131
-
132
- ### Docker
133
-
134
- Example Dockerfile:
135
-
136
- ```dockerfile
137
- FROM node:18-alpine
138
- WORKDIR /app
139
- COPY package*.json ./
140
- RUN npm install --production
141
- COPY . .
142
- EXPOSE 3000
143
- CMD ["npm", "start"]
144
- ```
145
-
146
- ## Development
147
-
148
- ### Switching Between Transports
149
-
150
- - **HTTP (default)**: `node index.js` — For containerized environments
151
- - **Stdio**: `node index-stdio.js` — For direct CLI/stdio clients
152
-
153
- ### Adding New Tools
154
-
155
- Edit `index.js` and use the `server.registerTool()` pattern:
156
-
157
- ```javascript
158
- server.registerTool(
159
- 'toolName',
160
- {
161
- title: 'Display Title',
162
- description: 'What it does',
163
- inputSchema: { paramName: z.type() }
164
- },
165
- async ({ paramName }) => ({
166
- content: [{ type: 'text', text: 'result' }]
167
- })
168
- );
169
- ```
170
-
171
- ## License
172
-
173
- MIT
174
-
175
- ## Changelog
176
-
1
+ # docbot-mcp
2
+
3
+ Bidirectional CSV ↔️ JSON ↔️ Markdown transformer exposed as an MCP (Model Context Protocol) server with HTTP transport.
4
+
5
+ ## Overview
6
+
7
+ **docbot-mcp** is a Model Context Protocol server that provides tools for converting between CSV, JSON, and Markdown formats. It's built on the [Model Context Protocol](https://modelcontextprotocol.io/) and designed for deployment on serverless platforms like AWS App Runner.
8
+
9
+ ## Features
10
+
11
+ - ✅ **CSV to JSON** — Parse CSV strings into JSON arrays
12
+ - ✅ **JSON to CSV** — Serialize JSON arrays to CSV format
13
+ - ✅ **CSV to Markdown** — Convert CSV to formatted Markdown tables
14
+ - ✅ **JSON to Markdown** — Convert JSON arrays to Markdown tables
15
+ - ✅ **HTTP-based** — REST API endpoint for easy integration
16
+ - ✅ **Containerized** — Ready for deployment on AWS App Runner, Docker, etc.
17
+
18
+ ## Installation
19
+
20
+ ```bash
21
+ npm install
22
+ ```
23
+
24
+ ### Requirements
25
+
26
+ - Node.js 16+ (ES modules support)
27
+ - Dependencies:
28
+ - `@modelcontextprotocol/sdk` — MCP protocol implementation
29
+ - `@rflukerii/docbot` — Document conversion utilities
30
+ - `express` — HTTP server framework
31
+ - `zod` — Input validation
32
+
33
+ ## Usage
34
+
35
+ ### Starting the Server
36
+
37
+ ```bash
38
+ npm start
39
+ ```
40
+
41
+ The server starts on `http://localhost:3000` with the MCP endpoint at `/docbot-mcp`.
42
+
43
+ ### Available Tools
44
+
45
+ All tools accept input as text parameters and return formatted text responses.
46
+
47
+ #### csvToJson
48
+ Converts a CSV string to JSON format.
49
+
50
+ **Input:** `csv` (string)
51
+ **Output:** JSON array as string
52
+
53
+ ```bash
54
+ curl -X POST http://localhost:3000/docbot-mcp \
55
+ -H "Content-Type: application/json" \
56
+ -d '{"tool": "csvToJson", "input": {"csv": "name,age\nAlice,30"}}'
57
+ ```
58
+
59
+ #### jsonToCsv
60
+ Converts a JSON array to CSV format.
61
+
62
+ **Input:** `json` (string)
63
+ **Output:** CSV string
64
+
65
+ ```bash
66
+ curl -X POST http://localhost:3000/docbot-mcp \
67
+ -H "Content-Type: application/json" \
68
+ -d '{"tool": "jsonToCsv", "input": {"json": "[{\"name\":\"Alice\",\"age\":30}]"}}'
69
+ ```
70
+
71
+ #### csvToMarkdown
72
+ Converts a CSV string to a Markdown table.
73
+
74
+ **Input:** `csv` (string)
75
+ **Output:** Markdown table string
76
+
77
+ #### jsonToMarkdown
78
+ Converts a JSON array to a Markdown table.
79
+
80
+ **Input:** `json` (string)
81
+ **Output:** Markdown table string
82
+
83
+ ## Architecture
84
+
85
+ ### HTTP Transport
86
+
87
+ The server uses `StreamableHTTPServerTransport` instead of stdio for better compatibility with containerized environments. Each request to `/docbot-mcp` creates a new server instance, processes the MCP request, and returns the result.
88
+
89
+ ```
90
+ Express Server (port 3000)
91
+
92
+ POST /docbot-mcp endpoint
93
+
94
+ MCP Server instance (createServer)
95
+
96
+ StreamableHTTPServerTransport
97
+
98
+ Tool execution (csvToJson, jsonToCsv, etc.)
99
+
100
+ Response back to client
101
+ ```
102
+
103
+ ### File Structure
104
+
105
+ - `index.js` — Main HTTP server entry point (AWS App Runner compatible)
106
+ - `index-stdio.js` — Stdio transport version (for local/stdio-based clients)
107
+ - `package.json` — Dependencies and scripts
108
+
109
+ ## Deployment
110
+
111
+ ### AWS App Runner
112
+
113
+ The server includes a `start` script configured for AWS App Runner:
114
+
115
+ ```json
116
+ {
117
+ "scripts": {
118
+ "start": "node index.js"
119
+ }
120
+ }
121
+ ```
122
+
123
+ **Steps to deploy:**
124
+
125
+ 1. Push code to AWS CodeCommit, GitHub, or BitBucket
126
+ 2. Create AWS App Runner service
127
+ 3. Configure source as your repository
128
+ 4. Set build command: `npm install`
129
+ 5. Set start command: `npm start`
130
+ 6. App Runner will automatically run the server on port 3000
131
+
132
+ ### Docker
133
+
134
+ Example Dockerfile:
135
+
136
+ ```dockerfile
137
+ FROM node:18-alpine
138
+ WORKDIR /app
139
+ COPY package*.json ./
140
+ RUN npm install --production
141
+ COPY . .
142
+ EXPOSE 3000
143
+ CMD ["npm", "start"]
144
+ ```
145
+
146
+ ## Development
147
+
148
+ ### Switching Between Transports
149
+
150
+ - **HTTP (default)**: `node index.js` — For containerized environments
151
+ - **Stdio**: `node index-stdio.js` — For direct CLI/stdio clients
152
+
153
+ ### Adding New Tools
154
+
155
+ Edit `index.js` and use the `server.registerTool()` pattern:
156
+
157
+ ```javascript
158
+ server.registerTool(
159
+ 'toolName',
160
+ {
161
+ title: 'Display Title',
162
+ description: 'What it does',
163
+ inputSchema: { paramName: z.type() }
164
+ },
165
+ async ({ paramName }) => ({
166
+ content: [{ type: 'text', text: 'result' }]
167
+ })
168
+ );
169
+ ```
170
+
171
+ ## License
172
+
173
+ MIT
174
+
175
+ ## Changelog
176
+
177
177
  See [CHANGELOG.md](CHANGELOG.md) for version history and updates.
@@ -0,0 +1,26 @@
1
+ ticker,shares,price,gain-loss,sector,market-cap,volume
2
+ AAPL,219,422.4,+9.93%,Technology,2353B,40302865
3
+ MSFT,409,90.41,+1.82%,Energy,769B,20254714
4
+ GOOGL,72,77.64,-0.99%,Consumer Staples,1991B,36897201
5
+ AMZN,328,167.85,-8.21%,Consumer Staples,1531B,8895044
6
+ TSLA,349,103.06,+1.42%,Financials,2498B,36219457
7
+ BRK-B,160,512.64,-1.85%,Technology,2111B,14232770
8
+ UNH,477,235.41,-8.35%,Technology,352B,12674771
9
+ JNJ,313,284.86,+1.27%,Energy,1405B,17165971
10
+ XOM,482,339.26,+10.15%,Energy,52B,10598777
11
+ JPM,19,568.33,+11.13%,Healthcare,2046B,29312899
12
+ META,100,324.34,+13.14%,Technology,631B,22888266
13
+ V,94,589.52,+8.33%,Consumer Discretionary,1643B,28852195
14
+ PG,268,105.61,+3.67%,Financials,1909B,44038561
15
+ MA,79,182.44,-9.38%,Financials,173B,37474546
16
+ HD,175,71.8,+3.33%,Financials,2863B,7625833
17
+ CVX,32,266.04,-1.28%,Consumer Discretionary,1531B,28573010
18
+ ABBV,417,146.22,-6.24%,Energy,2672B,32220110
19
+ LLY,314,113.88,-10.53%,Financials,2143B,1232034
20
+ PEP,35,137.1,+6.95%,Energy,2720B,30765339
21
+ KO,128,558.33,+12.15%,Consumer Staples,1788B,37818059
22
+ BAC,412,277.88,+1.46%,Financials,2908B,12488920
23
+ PFE,338,508.69,+1.46%,Consumer Staples,554B,44892846
24
+ COST,70,422.18,-5.12%,Energy,779B,4379465
25
+ TMO,74,264.56,-14.95%,Financials,579B,19665238
26
+ AVGO,230,293.56,+6.99%,Financials,1575B,20542990
package/index-stdio.js CHANGED
@@ -1,63 +1,63 @@
1
- #!/usr/bin/env node
2
-
3
- // External imports
4
- import { csvToJson, jsonToCsv, jsonToMarkdown, csvToMarkdown } from '@rflukerii/docbot'
5
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
6
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
7
- import { z } from 'zod';
8
-
9
- const server = new McpServer({
10
- name: 'docbot-mcp',
11
- version: '1.0.0'
12
- });
13
-
14
- server.registerTool(
15
- 'csvToJson',
16
- {
17
- title: 'Convert CSV to JSON',
18
- description: 'Converts a CSV string to JSON',
19
- inputSchema: { csv: z.string() }
20
- },
21
- async ({ csv }) => ({
22
- content: [{ type: 'text', text: JSON.stringify(csvToJson(csv)) }]
23
- })
24
- );
25
-
26
- server.registerTool(
27
- 'jsonToCsv',
28
- {
29
- title: 'Convert JSON to CSV',
30
- description: 'Converts a JSON string to CSV',
31
- inputSchema: { json: z.string() }
32
- },
33
- async ({ json }) => ({
34
- content: [{ type: 'text', text: jsonToCsv(JSON.parse(json)) }]
35
- })
36
- );
37
-
38
- server.registerTool(
39
- 'csvToMarkdown',
40
- {
41
- title: 'Convert CSV to Markdown',
42
- description: 'Converts a CSV string to Markdown',
43
- inputSchema: { csv: z.string() }
44
- },
45
- async ({ csv }) => ({
46
- content: [{ type: 'text', text: csvToMarkdown(csv) }]
47
- })
48
- );
49
-
50
- server.registerTool(
51
- 'jsonToMarkdown',
52
- {
53
- title: 'Convert JSON to Markdown',
54
- description: 'Converts a JSON string to Markdown',
55
- inputSchema: { json: z.string() }
56
- },
57
- async ({ json }) => ({
58
- content: [{ type: 'text', text: jsonToMarkdown(JSON.parse(json)) }]
59
- })
60
- );
61
-
62
- const transport = new StdioServerTransport();
63
- await server.connect(transport);
1
+ #!/usr/bin/env node
2
+
3
+ // External imports
4
+ import { csvToJson, jsonToCsv, jsonToMarkdown, csvToMarkdown } from '@rflukerii/docbot'
5
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
6
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
7
+ import { z } from 'zod';
8
+
9
+ const server = new McpServer({
10
+ name: 'docbot-mcp',
11
+ version: '1.0.0'
12
+ });
13
+
14
+ server.registerTool(
15
+ 'csvToJson',
16
+ {
17
+ title: 'Convert CSV to JSON',
18
+ description: 'Converts a CSV string to JSON',
19
+ inputSchema: { csv: z.string() }
20
+ },
21
+ async ({ csv }) => ({
22
+ content: [{ type: 'text', text: JSON.stringify(csvToJson(csv)) }]
23
+ })
24
+ );
25
+
26
+ server.registerTool(
27
+ 'jsonToCsv',
28
+ {
29
+ title: 'Convert JSON to CSV',
30
+ description: 'Converts a JSON string to CSV',
31
+ inputSchema: { json: z.string() }
32
+ },
33
+ async ({ json }) => ({
34
+ content: [{ type: 'text', text: jsonToCsv(JSON.parse(json)) }]
35
+ })
36
+ );
37
+
38
+ server.registerTool(
39
+ 'csvToMarkdown',
40
+ {
41
+ title: 'Convert CSV to Markdown',
42
+ description: 'Converts a CSV string to Markdown',
43
+ inputSchema: { csv: z.string() }
44
+ },
45
+ async ({ csv }) => ({
46
+ content: [{ type: 'text', text: csvToMarkdown(csv) }]
47
+ })
48
+ );
49
+
50
+ server.registerTool(
51
+ 'jsonToMarkdown',
52
+ {
53
+ title: 'Convert JSON to Markdown',
54
+ description: 'Converts a JSON string to Markdown',
55
+ inputSchema: { json: z.string() }
56
+ },
57
+ async ({ json }) => ({
58
+ content: [{ type: 'text', text: jsonToMarkdown(JSON.parse(json)) }]
59
+ })
60
+ );
61
+
62
+ const transport = new StdioServerTransport();
63
+ await server.connect(transport);
package/index.js CHANGED
@@ -1,121 +1,121 @@
1
- #!/usr/bin/env node
2
-
3
- // External imports
4
- import { csvToJson, jsonToCsv, jsonToMarkdown, csvToMarkdown } from '@rflukerii/docbot'
5
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
6
- import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
7
- import { z } from 'zod';
8
- import express from 'express';
9
-
10
- const app = express();
11
- app.use(express.json());
12
-
13
- function createServer() {
14
- const server = new McpServer({
15
- name: 'docbot-mcp',
16
- version: '1.0.2'
17
- });
18
-
19
- server.registerTool(
20
- 'csvToJson',
21
- {
22
- title: 'Convert CSV to JSON',
23
- description: 'Converts a CSV string to JSON',
24
- inputSchema: { csv: z.string() }
25
- },
26
- async ({ csv }) => ({
27
- content: [
28
- {
29
- type: 'text',
30
- text: JSON.stringify(csvToJson(csv)) + '\n\n@rflukerii/docubot'
31
- },
32
- {
33
- type: 'text',
34
- text: '@rflukerii/docubot'
35
- }
36
- ]
37
- })
38
- );
39
-
40
- server.registerTool(
41
- 'jsonToCsv',
42
- {
43
- title: 'Convert JSON to CSV',
44
- description: 'Converts a JSON string to CSV',
45
- inputSchema: { json: z.string() }
46
- },
47
- async ({ json }) => ({
48
- content: [
49
- {
50
- type: 'text',
51
- text: jsonToCsv(JSON.parse(json)) + '\n\n@rflukerii/docubot'
52
- },
53
- {
54
- type: 'text',
55
- text: '@rflukerii/docubot'
56
- }
57
- ]
58
- })
59
- );
60
-
61
- server.registerTool(
62
- 'csvToMarkdown',
63
- {
64
- title: 'Convert CSV to Markdown',
65
- description: 'Converts a CSV string to Markdown',
66
- inputSchema: { csv: z.string() }
67
- },
68
- async ({ csv }) => ({
69
- content: [
70
- {
71
- type: 'text',
72
- text: csvToMarkdown(csv) + '\n\n@rflukerii/docubot'
73
- },
74
- {
75
- type: 'text',
76
- text: '@rflukerii/docubot'
77
- }
78
- ]
79
- })
80
- );
81
-
82
- server.registerTool(
83
- 'jsonToMarkdown',
84
- {
85
- title: 'Convert JSON to Markdown',
86
- description: 'Converts a JSON string to Markdown',
87
- inputSchema: { json: z.string() }
88
- },
89
- async ({ json }) => ({
90
- content: [
91
- {
92
- type: 'text',
93
- text: jsonToMarkdown(JSON.parse(json)) + '\n\n@rflukerii/docubot'
94
- },
95
- {
96
- type: 'text',
97
- text: '@rflukerii/docubot'
98
- }
99
- ]
100
- })
101
- );
102
-
103
- return server;
104
- }
105
-
106
- app.get('/health', (req, res) => {
107
- res.status(200).send('OK');
108
- });
109
-
110
- app.post('/mcp', async (req, res) => {
111
- const server = createServer();
112
- const transport = new StreamableHTTPServerTransport({
113
- sessionIdGenerator: undefined,
114
- });
115
- await server.connect(transport);
116
- await transport.handleRequest(req, res, req.body);
117
- });
118
-
119
- app.listen(process.env.PORT || 3000, () => {
120
- console.log('docbot-mcp running on http://localhost:3000/mcp');
1
+ #!/usr/bin/env node
2
+
3
+ // External imports
4
+ import { csvToJson, jsonToCsv, jsonToMarkdown, csvToMarkdown } from '@rflukerii/docbot'
5
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
6
+ import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
7
+ import { z } from 'zod';
8
+ import express from 'express';
9
+
10
+ const app = express();
11
+ app.use(express.json());
12
+
13
+ function createServer() {
14
+ const server = new McpServer({
15
+ name: 'docbot-mcp',
16
+ version: '1.0.4'
17
+ });
18
+
19
+ server.registerTool(
20
+ 'csvToJson',
21
+ {
22
+ title: 'Convert CSV to JSON',
23
+ description: 'Converts a CSV string to JSON',
24
+ inputSchema: { csv: z.string() }
25
+ },
26
+ async ({ csv }) => ({
27
+ content: [
28
+ {
29
+ type: 'text',
30
+ text: JSON.stringify(csvToJson(csv)) + '\n\n@rflukerii/docubot'
31
+ },
32
+ {
33
+ type: 'text',
34
+ text: '@rflukerii/docubot'
35
+ }
36
+ ]
37
+ })
38
+ );
39
+
40
+ server.registerTool(
41
+ 'jsonToCsv',
42
+ {
43
+ title: 'Convert JSON to CSV',
44
+ description: 'Converts a JSON string to CSV',
45
+ inputSchema: { json: z.string() }
46
+ },
47
+ async ({ json }) => ({
48
+ content: [
49
+ {
50
+ type: 'text',
51
+ text: jsonToCsv(JSON.parse(json)) + '\n\n@rflukerii/docubot'
52
+ },
53
+ {
54
+ type: 'text',
55
+ text: '@rflukerii/docubot'
56
+ }
57
+ ]
58
+ })
59
+ );
60
+
61
+ server.registerTool(
62
+ 'csvToMarkdown',
63
+ {
64
+ title: 'Convert CSV to Markdown',
65
+ description: 'Converts a CSV string to Markdown',
66
+ inputSchema: { csv: z.string() }
67
+ },
68
+ async ({ csv }) => ({
69
+ content: [
70
+ {
71
+ type: 'text',
72
+ text: csvToMarkdown(csv) + '\n\n@rflukerii/docubot'
73
+ },
74
+ {
75
+ type: 'text',
76
+ text: '@rflukerii/docubot'
77
+ }
78
+ ]
79
+ })
80
+ );
81
+
82
+ server.registerTool(
83
+ 'jsonToMarkdown',
84
+ {
85
+ title: 'Convert JSON to Markdown',
86
+ description: 'Converts a JSON string to Markdown',
87
+ inputSchema: { json: z.string() }
88
+ },
89
+ async ({ json }) => ({
90
+ content: [
91
+ {
92
+ type: 'text',
93
+ text: jsonToMarkdown(JSON.parse(json)) + '\n\n@rflukerii/docubot'
94
+ },
95
+ {
96
+ type: 'text',
97
+ text: '@rflukerii/docubot'
98
+ }
99
+ ]
100
+ })
101
+ );
102
+
103
+ return server;
104
+ }
105
+
106
+ app.get('/health', (req, res) => {
107
+ res.status(200).send('OK');
108
+ });
109
+
110
+ app.post('/docbot-mcp', async (req, res) => {
111
+ const server = createServer();
112
+ const transport = new StreamableHTTPServerTransport({
113
+ sessionIdGenerator: undefined,
114
+ });
115
+ await server.connect(transport);
116
+ await transport.handleRequest(req, res, req.body);
117
+ });
118
+
119
+ app.listen(process.env.PORT || 3000, () => {
120
+ console.log('docbot-mcp running on http://localhost:3000/docbot-mcp');
121
121
  });
package/package.json CHANGED
@@ -1,23 +1,24 @@
1
- {
2
- "name": "docbot-mcp",
3
- "version": "1.0.2",
4
- "mcpName": "io.github.rflukerii-dev/docbot-mcp",
5
- "description": "Bidirectional CSV <> JSON <> Markdown transformer",
6
- "main": "index.js",
7
- "bin": {
8
- "docbot-mcp": "./index.js"
9
- },
10
- "scripts": {
11
- "test": "echo \"Error: no test specified\" && exit 1",
12
- "start": "node index.js"
13
- },
14
- "author": "",
15
- "license": "MIT",
16
- "dependencies": {
17
- "@modelcontextprotocol/sdk": "^1.27.1",
18
- "@rflukerii/docbot": "^1.0.1",
19
- "express": "^5.2.1",
20
- "zod": "^4.3.6"
21
- },
22
- "type": "module"
23
- }
1
+ {
2
+ "name": "docbot-mcp",
3
+ "version": "1.0.4",
4
+ "mcpName": "io.github.rflukerii-dev/docbot-mcp",
5
+ "description": "Bidirectional CSV <> JSON <> Markdown transformer",
6
+ "main": "index.js",
7
+ "bin": {
8
+ "docbot-mcp": "./index.js"
9
+ },
10
+ "scripts": {
11
+ "start": "node index.js",
12
+ "test": "echo \"Error: no test specified\" && exit 1",
13
+ "version": "node scripts/sync-version.js"
14
+ },
15
+ "author": "",
16
+ "license": "MIT",
17
+ "dependencies": {
18
+ "@modelcontextprotocol/sdk": "^1.27.1",
19
+ "@rflukerii/docbot": "^1.0.1",
20
+ "express": "^5.2.1",
21
+ "zod": "^4.3.6"
22
+ },
23
+ "type": "module"
24
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * scripts/sync-version.js
3
+ *
4
+ * Called by npm's "version" lifecycle hook.
5
+ * Reads the bumped version from package.json and patches
6
+ * server.json and index.js to match, then stages both files.
7
+ */
8
+
9
+ import { readFileSync, writeFileSync } from 'fs';
10
+ import { execSync } from 'child_process';
11
+
12
+ const pkg = JSON.parse(readFileSync('package.json', 'utf8'));
13
+ const version = pkg.version;
14
+
15
+ // Patch server.json
16
+ const serverJson = JSON.parse(readFileSync('server.json', 'utf8'));
17
+ serverJson.version = version;
18
+ serverJson.packages[0].version = version;
19
+ writeFileSync('server.json', JSON.stringify(serverJson, null, 2) + '\n');
20
+
21
+ // Patch index.js
22
+ let indexJs = readFileSync('index.js', 'utf8');
23
+ indexJs = indexJs.replace(
24
+ /version:\s*['"][^'"]+['"]/,
25
+ `version: '${version}'`
26
+ );
27
+ writeFileSync('index.js', indexJs);
28
+
29
+ // Stage patched files so they ride the version commit
30
+ execSync('git add server.json index.js');
31
+
32
+ console.log(`Synced version ${version} to server.json and index.js`);
package/server.json CHANGED
@@ -1,28 +1,20 @@
1
- {
2
- "$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
3
- "name": "io.github.rflukerii-dev/docbot-mcp",
4
- "description": "Bidirectional CSV <> JSON <> Markdown transformer",
5
- "status": "active",
6
- "repository": {
7
- "url": "https://github.com/rflukerii-dev/docbot-mcp",
8
- "source": "github"
9
- },
10
- "version": "1.0.2",
11
- "packages": [
12
- {
13
- "registry_type": "npm",
14
- "registry_base_url": "https://registry.npmjs.org",
15
- "identifier": "docbot-mcp",
16
- "version": "1.0.2",
17
- "transport": {
18
- "type": "httpStream"
19
- }
20
- }
21
- ],
22
- "remotes": [
23
- {
24
- "type": "httpStream",
25
- "url": "https://spdeyfjpfv.us-east-1.awsapprunner.com/mcp"
26
- }
27
- ]
28
- }
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.rflukerii-dev/docbot-mcp",
4
+ "description": "Bidirectional CSV <> JSON <> Markdown transformer",
5
+ "repository": {
6
+ "url": "https://github.com/rflukerii-dev/docbot-mcp",
7
+ "source": "github"
8
+ },
9
+ "version": "1.0.4",
10
+ "packages": [
11
+ {
12
+ "registryType": "npm",
13
+ "identifier": "docbot-mcp",
14
+ "version": "1.0.4",
15
+ "transport": {
16
+ "type": "streamable-http"
17
+ }
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.rflukerii-dev/docbot-mcp",
4
+ "description": "Bidirectional CSV <> JSON <> Markdown transformer",
5
+ "repository": {
6
+ "url": "https://github.com/rflukerii-dev/docbot-mcp",
7
+ "source": "github"
8
+ },
9
+ "version": "1.0.3",
10
+ "packages": [
11
+ {
12
+ "registryType": "npm",
13
+ "identifier": "docbot-mcp",
14
+ "version": "1.0.3",
15
+ "transport": {
16
+ "type": "streamable-http"
17
+ }
18
+ }
19
+ ],
20
+ "remotes": {
21
+ "streamable-http": {
22
+ "url": "https://spdeyfjpfv.us-east-1.awsapprunner.com/docbot-mcp"
23
+ }
24
+ }
25
+ }