Skip to content
Open
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
dist
.venv
.claude
TODO
*.pdf
4 changes: 4 additions & 0 deletions .gitleaksignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Test fixtures contain Bing tracking URLs that trigger false positives
src/sample-data/test_serp.html:facebook-access-token:42
src/sample-data/test_serp.html:facebook-access-token:90
src/sample-data/test_serp.html:facebook-access-token:117
1 change: 0 additions & 1 deletion .python-version

This file was deleted.

14 changes: 4 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
# Base stage will contain python dependencies
FROM oven/bun:debian AS base
WORKDIR /app

# Install dependencies
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-venv bash git && rm -rf /var/lib/apt/lists/*
# Install git for repomix remote repos
RUN apt-get update && apt-get install -y --no-install-recommends git && rm -rf /var/lib/apt/lists/*

# Copy the source code
COPY . .
# Remove the python version, otherwise it won't find python
RUN rm .python-version

# Install Python dependencies
RUN python3 -m venv .venv && .venv/bin/pip install "markitdown>=0.1.5"

# Use a separate stage for building to save space
# Use a separate stage for building
FROM base AS builder

# Install dependencies
Expand All @@ -22,7 +16,7 @@ RUN bun install
# Build the project
RUN bun run build

# Final stage for the image (doing the build separately saves about 100MB)
# Final stage
FROM base AS runner

# Install production dependencies
Expand Down
21 changes: 7 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,42 +28,35 @@ Markdownify is a Model Context Protocol (MCP) server that converts various file
1. Clone this repository
2. Install dependencies:
```
pnpm install
bun install
```

Note: this will also install `uv` and related Python depdencies.

3. Build the project:
```
pnpm run build
bun run build
```
4. Start the server:
```
pnpm start
bun start
```

## Development

- Use `pnpm run dev` to start the TypeScript compiler in watch mode
- Use `bun run dev` to start the TypeScript compiler in watch mode
- Modify `src/server.ts` to customize server behavior
- Add or modify tools in `src/tools.ts`

## Usage with Desktop App

To integrate this server with a desktop app, add the following to your app's server configuration:

```js
```json
{
"mcpServers": {
"markdownify": {
"command": "node",
"args": [
"{ABSOLUTE PATH TO FILE HERE}/dist/index.js"
],
"env": {
// By default, the server will use the default install location of `uv`
"UV_PATH": "/path/to/uv"
}
]
}
}
}
Expand All @@ -82,7 +75,7 @@ To integrate this server with a desktop app, add the following to your app's ser
- `pptx-to-markdown`: Convert PPTX files to Markdown
- `get-markdown-file`: Retrieve an existing Markdown file. File extension must end with: *.md, *.markdown.

OPTIONAL: set `MD_SHARE_DIR` env var to restrict the directory from which files can be retrieved, e.g. `MD_SHARE_DIR=[SOME_PATH] pnpm run start`
OPTIONAL: set `MD_SHARE_DIR` env var to restrict the directory from which files can be retrieved, e.g. `MD_SHARE_DIR=[SOME_PATH] bun start`

## Contributing

Expand Down
179 changes: 178 additions & 1 deletion bun.lock

Large diffs are not rendered by default.

7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,19 @@
"mcp-markdownify-server": "dist/index.js"
},
"files": [
"dist",
"preinstall.js",
"setup.sh",
"setup.bat"
"dist"
],
"scripts": {
"build": "tsc && chmod +x dist/*.js",
"dev": "tsc --watch",
"preinstall": "node preinstall.js",
"prepublishOnly": "bun run build",
"start": "bun dist/index.js",
"test": "bun test",
"test:watch": "bun test --watch"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.27.1",
"markitdown-typescript": "file:../markitdown-ts",
"private-ip": "^3.0.2",
"repomix": "^1.12.0",
"zod": "^4.3.6"
Expand Down
7 changes: 0 additions & 7 deletions preinstall.js

This file was deleted.

9 changes: 0 additions & 9 deletions pyproject.toml

This file was deleted.

5 changes: 0 additions & 5 deletions setup.bat

This file was deleted.

7 changes: 0 additions & 7 deletions setup.sh

This file was deleted.

Loading