Skip to content

Commit 24c05be

Browse files
new: Mindmap MCP server implementation (#61)
Co-authored-by: Jiri Spilka <[email protected]>
1 parent 21786ec commit 24c05be

File tree

14 files changed

+1146
-0
lines changed

14 files changed

+1146
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"actorSpecification": 1,
3+
"name": "mindmap-mcp-server",
4+
"title": "Python MCP server",
5+
"description": "Python Model Context Protocol (MCP) server.",
6+
"version": "0.0",
7+
"buildTag": "latest",
8+
"usesStandbyMode": true,
9+
"meta": {
10+
"templateId": "python-mcp-server"
11+
},
12+
"dockerfile": "../Dockerfile",
13+
"webServerMcpPath": "/mcp"
14+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"convert_markdown_to_mindmap": {
3+
"eventTitle": "Convert Markdown to Mindmap",
4+
"eventDescription": "Fee for converting a Markdown document to a mindmap",
5+
"eventPriceUsd": 0.01
6+
}
7+
}

mindmap-mcp-server/.gitignore

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
.mise.toml
2+
.nvim.lua
3+
storage
4+
5+
# The rest is copied from https://github.com/github/gitignore/blob/main/Python.gitignore
6+
7+
# Byte-compiled / optimized / DLL files
8+
__pycache__/
9+
*.py[cod]
10+
*$py.class
11+
12+
# C extensions
13+
*.so
14+
15+
# Distribution / packaging
16+
.Python
17+
build/
18+
develop-eggs/
19+
dist/
20+
downloads/
21+
eggs/
22+
.eggs/
23+
lib/
24+
lib64/
25+
parts/
26+
sdist/
27+
var/
28+
wheels/
29+
share/python-wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
MANIFEST
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
*.py,cover
56+
.hypothesis/
57+
.pytest_cache/
58+
cover/
59+
60+
# Translations
61+
*.mo
62+
*.pot
63+
64+
# Django stuff:
65+
*.log
66+
local_settings.py
67+
db.sqlite3
68+
db.sqlite3-journal
69+
70+
# Flask stuff:
71+
instance/
72+
.webassets-cache
73+
74+
# Scrapy stuff:
75+
.scrapy
76+
77+
# Sphinx documentation
78+
docs/_build/
79+
80+
# PyBuilder
81+
.pybuilder/
82+
target/
83+
84+
# Jupyter Notebook
85+
.ipynb_checkpoints
86+
87+
# IPython
88+
profile_default/
89+
ipython_config.py
90+
91+
# pyenv
92+
# For a library or package, you might want to ignore these files since the code is
93+
# intended to run in multiple environments; otherwise, check them in:
94+
.python-version
95+
96+
# pdm
97+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
98+
#pdm.lock
99+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
100+
# in version control.
101+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
102+
.pdm.toml
103+
.pdm-python
104+
.pdm-build/
105+
106+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
107+
__pypackages__/
108+
109+
# Celery stuff
110+
celerybeat-schedule
111+
celerybeat.pid
112+
113+
# SageMath parsed files
114+
*.sage.py
115+
116+
# Environments
117+
.env
118+
.venv
119+
env/
120+
venv/
121+
ENV/
122+
env.bak/
123+
venv.bak/
124+
125+
# Spyder project settings
126+
.spyderproject
127+
.spyproject
128+
129+
# Rope project settings
130+
.ropeproject
131+
132+
# mkdocs documentation
133+
/site
134+
135+
# mypy
136+
.mypy_cache/
137+
.dmypy.json
138+
dmypy.json
139+
140+
# Pyre type checker
141+
.pyre/
142+
143+
# pytype static type analyzer
144+
.pytype/
145+
146+
# Cython debug symbols
147+
cython_debug/
148+
149+
# PyCharm
150+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
151+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
152+
# and can be added to the global gitignore or merged into this file. For a more nuclear
153+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
154+
.idea/
155+
156+
# Visual Studio Code
157+
# Ignores the folder created by VS Code when changing workspace settings, doing debugger
158+
# configuration, etc. Can be commented out to share Workspace Settings within a team
159+
.vscode
160+
161+
# Zed editor
162+
# Ignores the folder created when setting Project Settings in the Zed editor. Can be commented out
163+
# to share Project Settings within a team
164+
.zed
165+
166+
# Added by Apify CLI
167+
node_modules

mindmap-mcp-server/Dockerfile

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# First, specify the base Docker image.
2+
# You can see the Docker images from Apify at https://hub.docker.com/r/apify/.
3+
# You can also use any other image from Docker Hub.
4+
FROM apify/actor-python:3.13
5+
6+
# Second, copy just requirements.txt into the Actor image,
7+
# since it should be the only file that affects the dependency installation in the next step,
8+
# in order to speed up the build.
9+
COPY requirements.txt ./
10+
11+
# Install NPX
12+
RUN apt-get -q update && apt-get -y install npm
13+
14+
# Install markmap-cli globally using npm
15+
RUN npm install -g markmap-cli
16+
17+
# Install the packages specified in requirements.txt,
18+
# print the installed Python version, pip version,
19+
# and all installed packages with their versions for debugging.
20+
RUN echo "Python version:" \
21+
&& python --version \
22+
&& echo "Pip version:" \
23+
&& pip --version \
24+
&& echo "Installing dependencies:" \
25+
&& pip install -r requirements.txt \
26+
&& echo "All installed Python packages:" \
27+
&& pip freeze
28+
29+
# Next, copy the remaining files and directories with the source code.
30+
# Since we do this after installing the dependencies, quick builds will be really fast
31+
# for most source file changes.
32+
COPY . ./
33+
34+
# Use compileall to ensure the runnability of the Actor Python code.
35+
RUN python3 -m compileall -q src/
36+
37+
# Specify how to launch the source code of your Actor.
38+
# By default, the "python3 -m ." command is run.
39+
CMD ["python3", "-m", "src"]

mindmap-mcp-server/README.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
## Mindmap MCP Server
2+
3+
A Model Context Protocol (MCP) server for converting Markdown content to interactive mindmaps.
4+
5+
**About this MCP Server:** To understand how to connect to and utilize this MCP server, please refer to the official Model Context Protocol documentation at [mcp.apify.com](https://mcp.apify.com).
6+
7+
## Connection URL
8+
MCP clients can connect to this server at:
9+
10+
```text
11+
https://mcp-servers--mindmap-mcp-server.apify.actor/mcp
12+
```
13+
14+
## Client Configuration
15+
To connect to this MCP server, use the following configuration in your MCP client:
16+
17+
```json
18+
{
19+
"mcpServers": {
20+
"mindmap": {
21+
"url": "https://mcp-servers--mindmap-mcp-server.apify.actor/mcp",
22+
"headers": {
23+
"Authorization": "Bearer YOUR_APIFY_TOKEN"
24+
}
25+
}
26+
}
27+
}
28+
```
29+
30+
**Note:** Replace `YOUR_APIFY_TOKEN` with your actual Apify API token. You can find your token in the [Apify Console](https://console.apify.com/account/integrations).
31+
32+
33+
## 🚩 Claim this MCP server
34+
All credits to the original authors of https://github.com/YuChenSSR/mindmap-mcp-server
35+
To claim this server, please write to [[email protected]](mailto:[email protected]).
36+
37+
---
38+
39+
# Mindmap MCP Server
40+
41+
<p align="center">
42+
<img src="https://raw.githubusercontent.com/YuChenSSR/pics/master/imgs/2025-03-21/JMi7Mn89Hw5ikd9z.jpeg" alt="mindmap_mcp" width="50%">
43+
</p>
44+
45+
A Model Context Protocol (MCP) server for converting Markdown content to interactive mindmaps.
46+
47+
### Available Tools
48+
49+
- `convert_markdown_to_mindmap` - Convert Markdown content to a mindmap mind map.
50+
51+
## License
52+
53+
mindmap-mcp-server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
54+
55+
## Features
56+
57+
This server provides a tool for converting Markdown content to mindmaps using the `markmap-cli` library:
58+
59+
- Convert Markdown to interactive mindmap HTML
60+
- Option to create offline-capable mindmaps
61+
- Option to hide the toolbar
62+
- Return either HTML content or file path
63+
64+
## Example
65+
66+
In Claude, you can ask:
67+
68+
1.
69+
"**give a mindmap for the following markdown code, using a mindmap tool:**
70+
```
71+
# Project Planning
72+
## Research
73+
### Market Analysis
74+
### Competitor Review
75+
## Design
76+
### Wireframes
77+
### Mockups
78+
## Development
79+
### Frontend
80+
### Backend
81+
## Testing
82+
### Unit Tests
83+
### User Testing
84+
```
85+
"
86+
87+
88+
if you want to save the mindmap to a file, and then open it in your browser using the iTerm MCP server:
89+
90+
2.
91+
"**give a mindmap for the following markdown input_code using a mindmap tool,
92+
after that,use iterm to open the generated html file.
93+
input_code:**
94+
```
95+
markdown content
96+
```
97+
"
98+
99+
100+
3.
101+
"**Think about the process of putting an elephant into a refrigerator, and provide a mind map. Open it with a terminal.**"
102+
103+
<details>
104+
105+
<summary>see the result</summary>
106+
107+
![aiworkflow](https://raw.githubusercontent.com/YuChenSSR/pics/master/imgs/2025-03-22/QUjGnpmUcPfd3lBI.png)
108+
109+
![mindmapinbrowser](https://raw.githubusercontent.com/YuChenSSR/pics/master/imgs/2025-03-22/w7DZ4shFhLoQZruq.png)
110+
111+
</details>
112+
113+
114+
**and more**
115+
116+
## References
117+
To learn more about Apify and Actors, take a look at the following resources:
118+
- [MCP Server Calculator](https://github.com/githejie/mcp-server-calculator)
119+
- [Apify SDK for JavaScript documentation](https://docs.apify.com/sdk/js)
120+
- [Apify SDK for Python documentation](https://docs.apify.com/sdk/python)
121+
- [Apify Platform documentation](https://docs.apify.com/platform)
122+
- [Apify MCP Server](https://docs.apify.com/platform/integrations/mcp)
123+
- [Webinar: Building and Monetizing MCP Servers on Apify](https://www.youtube.com/watch?v=w3AH3jIrXXo)
124+
- [Join our developer community on Discord](https://discord.com/invite/jyEM2PRvMU)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Feel free to add your Python dependencies below. For formatting guidelines, see:
2+
# https://pip.pypa.io/en/latest/reference/requirements-file-format/
3+
4+
apify < 3.0.0
5+
apify-client
6+
fastapi==0.116.2
7+
httpx>=0.24.0
8+
mcp==1.13.1
9+
pydantic>=2.0.0
10+
sse-starlette>=3.0.2
11+
uv>=0.7.8
12+
uvicorn>=0.27.0
13+
14+
mindmap-mcp-server==0.1.1

mindmap-mcp-server/src/__init__.py

Whitespace-only changes.

mindmap-mcp-server/src/__main__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import asyncio
2+
3+
from .main import main
4+
5+
# Execute the Actor entry point.
6+
asyncio.run(main())

0 commit comments

Comments
 (0)