ghostfolio-mcp 1.1.0__tar.gz
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.
- ghostfolio_mcp-1.1.0/.dockerignore +32 -0
- ghostfolio_mcp-1.1.0/.env.example +50 -0
- ghostfolio_mcp-1.1.0/.github/workflows/docker-publish.yml +103 -0
- ghostfolio_mcp-1.1.0/.github/workflows/publish.yml +33 -0
- ghostfolio_mcp-1.1.0/.github/workflows/release.yml +37 -0
- ghostfolio_mcp-1.1.0/.github/workflows/test.yml +35 -0
- ghostfolio_mcp-1.1.0/.gitignore +236 -0
- ghostfolio_mcp-1.1.0/.pre-commit-config.yaml +25 -0
- ghostfolio_mcp-1.1.0/CHANGELOG.md +19 -0
- ghostfolio_mcp-1.1.0/Dockerfile +56 -0
- ghostfolio_mcp-1.1.0/Dockerfile.mcpo +54 -0
- ghostfolio_mcp-1.1.0/LICENSE +617 -0
- ghostfolio_mcp-1.1.0/MANIFEST.in +3 -0
- ghostfolio_mcp-1.1.0/PKG-INFO +1070 -0
- ghostfolio_mcp-1.1.0/README.md +425 -0
- ghostfolio_mcp-1.1.0/fastmcp.json +18 -0
- ghostfolio_mcp-1.1.0/pyproject.toml +133 -0
- ghostfolio_mcp-1.1.0/run_server.py +9 -0
- ghostfolio_mcp-1.1.0/src/ghostfolio_mcp/__init__.py +5 -0
- ghostfolio_mcp-1.1.0/src/ghostfolio_mcp/ghostfolio_client.py +200 -0
- ghostfolio_mcp-1.1.0/src/ghostfolio_mcp/ghostfolio_tools.py +662 -0
- ghostfolio_mcp-1.1.0/src/ghostfolio_mcp/middlewares.py +328 -0
- ghostfolio_mcp-1.1.0/src/ghostfolio_mcp/models.py +41 -0
- ghostfolio_mcp-1.1.0/src/ghostfolio_mcp/sentry_init.py +88 -0
- ghostfolio_mcp-1.1.0/src/ghostfolio_mcp/server.py +145 -0
- ghostfolio_mcp-1.1.0/src/ghostfolio_mcp/utils.py +17 -0
- ghostfolio_mcp-1.1.0/tests/__init__.py +3 -0
- ghostfolio_mcp-1.1.0/tests/test_utils.py +30 -0
- ghostfolio_mcp-1.1.0/uv.lock +2161 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Docker ignore file to reduce build context size
|
|
2
|
+
**/__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
.Python
|
|
7
|
+
*.so
|
|
8
|
+
.git
|
|
9
|
+
.gitignore
|
|
10
|
+
.github
|
|
11
|
+
.vscode
|
|
12
|
+
.idea
|
|
13
|
+
*.md
|
|
14
|
+
!README.md
|
|
15
|
+
.env
|
|
16
|
+
.env.*
|
|
17
|
+
!.env.example
|
|
18
|
+
*.log
|
|
19
|
+
.coverage
|
|
20
|
+
.pytest_cache
|
|
21
|
+
.mypy_cache
|
|
22
|
+
dist/
|
|
23
|
+
build/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
screenshots/
|
|
26
|
+
docker-compose.yml
|
|
27
|
+
Dockerfile*
|
|
28
|
+
*.tar
|
|
29
|
+
*.zip
|
|
30
|
+
.venv/
|
|
31
|
+
venv/
|
|
32
|
+
.ruff_cache/
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Ghostfolio MCP Server Environment Configuration
|
|
2
|
+
|
|
3
|
+
# Ghostfolio Connection Details
|
|
4
|
+
GHOSTFOLIO_URL=https://domain.tld:3333
|
|
5
|
+
GHOSTFOLIO_TOKEN=your-ghostfolio-token
|
|
6
|
+
|
|
7
|
+
# SSL Configuration
|
|
8
|
+
GHOSTFOLIO_VERIFY_SSL=true
|
|
9
|
+
GHOSTFOLIO_TIMEOUT=30
|
|
10
|
+
|
|
11
|
+
# Read-Only Mode
|
|
12
|
+
# Set READ_ONLY_MODE true to disable all write operations (put, post, delete)
|
|
13
|
+
READ_ONLY_MODE=false
|
|
14
|
+
|
|
15
|
+
# Disabled Tags
|
|
16
|
+
# Comma-separated list of tags to disable tools for (empty by default)
|
|
17
|
+
# Example: GHOSTFOLIO_DISABLED_TAGS=portfolio,symbol
|
|
18
|
+
GHOSTFOLIO_DISABLED_TAGS=
|
|
19
|
+
|
|
20
|
+
# Logging Configuration
|
|
21
|
+
LOG_LEVEL=INFO
|
|
22
|
+
|
|
23
|
+
# Rate Limiting (requests per minute)
|
|
24
|
+
# Set RATE_LIMIT_ENABLED true to enable rate limiting
|
|
25
|
+
RATE_LIMIT_ENABLED=false
|
|
26
|
+
RATE_LIMIT_MAX_REQUESTS=100
|
|
27
|
+
RATE_LIMIT_WINDOW_MINUTES=1
|
|
28
|
+
|
|
29
|
+
# Set SENTRY_DSN to enable error tracking and performance monitoring
|
|
30
|
+
# SENTRY_DSN=https://your-key@o12345.ingest.us.sentry.io/6789
|
|
31
|
+
# Optional Sentry configuration
|
|
32
|
+
# SENTRY_TRACES_SAMPLE_RATE=1.0
|
|
33
|
+
# SENTRY_SEND_DEFAULT_PII=true
|
|
34
|
+
# SENTRY_ENVIRONMENT=production
|
|
35
|
+
# SENTRY_RELEASE=1.2.3
|
|
36
|
+
# SENTRY_PROFILE_SESSION_SAMPLE_RATE=1.0
|
|
37
|
+
# SENTRY_PROFILE_LIFECYCLE=trace
|
|
38
|
+
# SENTRY_ENABLE_LOGS=true
|
|
39
|
+
|
|
40
|
+
# MCP Transport Configuration
|
|
41
|
+
# Transport type: 'stdio' (default), 'sse' (Server-Sent Events), or 'http' (HTTP Streamable)
|
|
42
|
+
MCP_TRANSPORT=stdio
|
|
43
|
+
|
|
44
|
+
# HTTP Transport Settings (used when MCP_TRANSPORT=sse or MCP_TRANSPORT=http)
|
|
45
|
+
# Host to bind the HTTP server (default: 0.0.0.0 for all interfaces)
|
|
46
|
+
MCP_HTTP_HOST=0.0.0.0
|
|
47
|
+
# Port to bind the HTTP server (default: 8000)
|
|
48
|
+
MCP_HTTP_PORT=8000
|
|
49
|
+
# Optional bearer token for authentication (leave empty for no auth)
|
|
50
|
+
MCP_HTTP_BEARER_TOKEN=
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
name: Docker Multi-arch Build and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["main"]
|
|
6
|
+
tags: ["v*.*.*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
branches: ["main"]
|
|
9
|
+
|
|
10
|
+
env:
|
|
11
|
+
REGISTRY: ghcr.io
|
|
12
|
+
IMAGE_NAME: ${{ github.repository }}
|
|
13
|
+
IMAGE_NAME_MCPO: ${{ github.repository }}o
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build-and-push:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
packages: write
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- name: Checkout repository
|
|
24
|
+
uses: actions/checkout@v5
|
|
25
|
+
|
|
26
|
+
- name: Set up QEMU
|
|
27
|
+
uses: docker/setup-qemu-action@v3
|
|
28
|
+
|
|
29
|
+
- name: Set up Docker Buildx
|
|
30
|
+
uses: docker/setup-buildx-action@v3
|
|
31
|
+
|
|
32
|
+
- name: Log in to GitHub Container Registry
|
|
33
|
+
if: github.event_name != 'pull_request'
|
|
34
|
+
uses: docker/login-action@v3
|
|
35
|
+
with:
|
|
36
|
+
registry: ${{ env.REGISTRY }}
|
|
37
|
+
username: ${{ github.actor }}
|
|
38
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
39
|
+
|
|
40
|
+
- name: Extract metadata for Docker
|
|
41
|
+
id: meta
|
|
42
|
+
uses: docker/metadata-action@v5
|
|
43
|
+
with:
|
|
44
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
45
|
+
tags: |
|
|
46
|
+
# Set latest tag for main branch
|
|
47
|
+
type=raw,value=latest,enable={{is_default_branch}}
|
|
48
|
+
# Tag with branch name (e.g., main, develop)
|
|
49
|
+
type=ref,event=branch
|
|
50
|
+
# Tag with PR number (e.g., pr-2)
|
|
51
|
+
type=ref,event=pr
|
|
52
|
+
# Tag with semver - v1.2.3 -> 1.2.3
|
|
53
|
+
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
54
|
+
# Tag with major.minor - v1.2.3 -> 1.2
|
|
55
|
+
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
56
|
+
# Tag with major - v1.2.3 -> 1
|
|
57
|
+
type=semver,pattern={{major}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
58
|
+
# Tag with git sha
|
|
59
|
+
type=sha,format=short
|
|
60
|
+
|
|
61
|
+
- name: Build and push Docker image
|
|
62
|
+
uses: docker/build-push-action@v6
|
|
63
|
+
with:
|
|
64
|
+
context: .
|
|
65
|
+
platforms: linux/amd64,linux/arm64
|
|
66
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
67
|
+
tags: ${{ steps.meta.outputs.tags }}
|
|
68
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
69
|
+
cache-from: type=gha
|
|
70
|
+
cache-to: type=gha,mode=max
|
|
71
|
+
|
|
72
|
+
- name: Extract metadata for MCPO Docker
|
|
73
|
+
id: meta-mcpo
|
|
74
|
+
uses: docker/metadata-action@v5
|
|
75
|
+
with:
|
|
76
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_MCPO }}
|
|
77
|
+
tags: |
|
|
78
|
+
# Set latest tag for main branch
|
|
79
|
+
type=raw,value=latest,enable={{is_default_branch}}
|
|
80
|
+
# Tag with branch name
|
|
81
|
+
type=ref,event=branch
|
|
82
|
+
# Tag with PR number
|
|
83
|
+
type=ref,event=pr
|
|
84
|
+
# Tag with semver
|
|
85
|
+
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
86
|
+
# Tag with major.minor
|
|
87
|
+
type=semver,pattern={{major}}.{{minor}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
88
|
+
# Tag with major
|
|
89
|
+
type=semver,pattern={{major}},enable=${{ startsWith(github.ref, 'refs/tags/v') }}
|
|
90
|
+
# Tag with git sha
|
|
91
|
+
type=sha,format=short
|
|
92
|
+
|
|
93
|
+
- name: Build and push Docker MCPO image
|
|
94
|
+
uses: docker/build-push-action@v6
|
|
95
|
+
with:
|
|
96
|
+
context: .
|
|
97
|
+
file: Dockerfile.mcpo
|
|
98
|
+
platforms: linux/amd64,linux/arm64
|
|
99
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
100
|
+
tags: ${{ steps.meta-mcpo.outputs.tags }}
|
|
101
|
+
labels: ${{ steps.meta-mcpo.outputs.labels }}
|
|
102
|
+
cache-from: type=gha
|
|
103
|
+
cache-to: type=gha,mode=max
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment:
|
|
12
|
+
name: pypi
|
|
13
|
+
url: https://pypi.org/p/ghostfolio-mcp
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write # Mandatory for Trusted Publishing
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v6
|
|
20
|
+
|
|
21
|
+
- name: Install the latest version of uv and set the python version
|
|
22
|
+
uses: astral-sh/setup-uv@v7
|
|
23
|
+
with:
|
|
24
|
+
python-version: '3.13'
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: uv sync --locked --all-extras --no-dev
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: uv build
|
|
31
|
+
|
|
32
|
+
- name: Publish package distributions to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
create-release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
outputs:
|
|
14
|
+
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
15
|
+
tag_name: ${{ steps.get_version.outputs.tag_name }}
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout code
|
|
19
|
+
uses: actions/checkout@v5
|
|
20
|
+
|
|
21
|
+
- name: Get version from tag
|
|
22
|
+
id: get_version
|
|
23
|
+
run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
|
|
24
|
+
|
|
25
|
+
- name: Create Release
|
|
26
|
+
id: create_release
|
|
27
|
+
uses: softprops/action-gh-release@v2
|
|
28
|
+
with:
|
|
29
|
+
tag_name: ${{ steps.get_version.outputs.tag_name }}
|
|
30
|
+
name: ${{ steps.get_version.outputs.tag_name }}
|
|
31
|
+
generate_release_notes: true
|
|
32
|
+
append_body: true
|
|
33
|
+
body: |
|
|
34
|
+
## Docker Images
|
|
35
|
+
- `ghcr.io/${{ github.repository }}:${{ steps.get_version.outputs.tag_name }}`
|
|
36
|
+
- `ghcr.io/${{ github.repository }}o:${{ steps.get_version.outputs.tag_name }}`
|
|
37
|
+
prerelease: ${{ contains(steps.get_version.outputs.tag_name, '-') }}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Test & Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
- push
|
|
5
|
+
- pull_request
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: read
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v5
|
|
19
|
+
|
|
20
|
+
- name: Install the latest version of uv and set the python version
|
|
21
|
+
uses: astral-sh/setup-uv@v7
|
|
22
|
+
with:
|
|
23
|
+
python-version: ${{ matrix.python-version }}
|
|
24
|
+
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: uv sync --locked --all-extras --dev
|
|
27
|
+
|
|
28
|
+
- name: Run ruff linter
|
|
29
|
+
run: uv run ruff check .
|
|
30
|
+
|
|
31
|
+
- name: Run ruff formatter
|
|
32
|
+
run: uv run ruff format --check .
|
|
33
|
+
|
|
34
|
+
- name: Run pytest
|
|
35
|
+
run: uv run pytest tests/ -v --cov=src/
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be added to the global gitignore or merged into this project gitignore. For a JetBrains IDE
|
|
158
|
+
# it is recommended to use a global gitignore:
|
|
159
|
+
# https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
160
|
+
# JetBrains IDEs
|
|
161
|
+
.idea/
|
|
162
|
+
|
|
163
|
+
# VS Code
|
|
164
|
+
.vscode/
|
|
165
|
+
!.vscode/tasks.json
|
|
166
|
+
!.vscode/launch.json
|
|
167
|
+
!.vscode/extensions.json
|
|
168
|
+
!.vscode/settings.json
|
|
169
|
+
|
|
170
|
+
# Project specific
|
|
171
|
+
# Environment files
|
|
172
|
+
.env.local
|
|
173
|
+
.env.production
|
|
174
|
+
.env.development
|
|
175
|
+
|
|
176
|
+
# Logs
|
|
177
|
+
*.log
|
|
178
|
+
logs/
|
|
179
|
+
|
|
180
|
+
# Temporary files
|
|
181
|
+
*.tmp
|
|
182
|
+
*.temp
|
|
183
|
+
temp/
|
|
184
|
+
tmp/
|
|
185
|
+
|
|
186
|
+
# Backup files
|
|
187
|
+
*.backup
|
|
188
|
+
*.bak
|
|
189
|
+
backups/
|
|
190
|
+
|
|
191
|
+
# SSL Certificates (if stored locally)
|
|
192
|
+
*.pem
|
|
193
|
+
*.key
|
|
194
|
+
*.crt
|
|
195
|
+
*.cert
|
|
196
|
+
certificates/
|
|
197
|
+
|
|
198
|
+
# Test outputs
|
|
199
|
+
test_results/
|
|
200
|
+
test_output/
|
|
201
|
+
|
|
202
|
+
# Documentation builds
|
|
203
|
+
docs/_build/
|
|
204
|
+
docs/build/
|
|
205
|
+
|
|
206
|
+
# MacOS
|
|
207
|
+
.DS_Store
|
|
208
|
+
.AppleDouble
|
|
209
|
+
.LSOverride
|
|
210
|
+
|
|
211
|
+
# Windows
|
|
212
|
+
Thumbs.db
|
|
213
|
+
ehthumbs.db
|
|
214
|
+
Desktop.ini
|
|
215
|
+
|
|
216
|
+
# Linux
|
|
217
|
+
*~
|
|
218
|
+
|
|
219
|
+
# UV specific
|
|
220
|
+
.uv/
|
|
221
|
+
|
|
222
|
+
# Runtime files
|
|
223
|
+
*.pid
|
|
224
|
+
*.sock
|
|
225
|
+
|
|
226
|
+
# Database files (if any)
|
|
227
|
+
*.db
|
|
228
|
+
*.sqlite
|
|
229
|
+
*.sqlite3
|
|
230
|
+
|
|
231
|
+
# Cache directories
|
|
232
|
+
.cache/
|
|
233
|
+
cache/
|
|
234
|
+
|
|
235
|
+
# ruff cache
|
|
236
|
+
.ruff_cache/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.14.10
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff-check
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/commitizen-tools/commitizen
|
|
10
|
+
rev: v4.10.0
|
|
11
|
+
hooks:
|
|
12
|
+
- id: commitizen
|
|
13
|
+
- id: commitizen-branch
|
|
14
|
+
stages:
|
|
15
|
+
- pre-push
|
|
16
|
+
|
|
17
|
+
- repo: local
|
|
18
|
+
hooks:
|
|
19
|
+
- id: pytest
|
|
20
|
+
name: pytest
|
|
21
|
+
entry: uv run pytest
|
|
22
|
+
language: system
|
|
23
|
+
types: [python]
|
|
24
|
+
pass_filenames: false
|
|
25
|
+
always_run: true
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
## v1.1.0 (2025-12-22)
|
|
2
|
+
|
|
3
|
+
### Feat
|
|
4
|
+
|
|
5
|
+
- **docker**: update docker images, change default transport to http
|
|
6
|
+
- **sentry**: add optional Sentry integration for error tracking and performance monitoring
|
|
7
|
+
- **docker**: add Docker usage instructions for easy deployment
|
|
8
|
+
- add fastmcp.json configuration
|
|
9
|
+
- **sentry**: add optional Sentry integration for error tracking and performance monitoring
|
|
10
|
+
- add publish workflow to PyPI and update project metadata
|
|
11
|
+
- **deps**: add commitizen for conventional commits
|
|
12
|
+
|
|
13
|
+
### Fix
|
|
14
|
+
|
|
15
|
+
- update license classifier to AGPLv3+
|
|
16
|
+
- **server**: remove unnecessary dependencies from FastMCP initialization
|
|
17
|
+
- **workflows**: update actions/checkout and change MCPO docker image
|
|
18
|
+
|
|
19
|
+
## v1.0.0 (2025-08-29)
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
FROM python:3.13-alpine3.23 AS builder
|
|
2
|
+
|
|
3
|
+
RUN pip install --root-user-action=ignore --no-cache-dir --upgrade pip \
|
|
4
|
+
&& pip install --root-user-action=ignore --no-cache-dir uv
|
|
5
|
+
|
|
6
|
+
ENV UV_LINK_MODE=copy
|
|
7
|
+
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
11
|
+
--mount=type=bind,source=uv.lock,target=uv.lock \
|
|
12
|
+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
13
|
+
uv sync --locked --all-extras --no-install-project --no-dev
|
|
14
|
+
|
|
15
|
+
COPY pyproject.toml uv.lock LICENSE README.md run_server.py ./
|
|
16
|
+
COPY src/ ./src/
|
|
17
|
+
|
|
18
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
19
|
+
uv sync --locked --all-extras --no-dev
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
FROM python:3.13-alpine3.23
|
|
23
|
+
LABEL org.opencontainers.image.title="Ghostfolio MCP Server" \
|
|
24
|
+
org.opencontainers.image.description="MCP server for Ghostfolio management" \
|
|
25
|
+
org.opencontainers.image.url="https://github.com/mhajder/ghostfolio-mcp" \
|
|
26
|
+
org.opencontainers.image.source="https://github.com/mhajder/ghostfolio-mcp" \
|
|
27
|
+
org.opencontainers.image.vendor="Mateusz Hajder" \
|
|
28
|
+
org.opencontainers.image.licenses="AGPL-3.0"
|
|
29
|
+
ENV PYTHONUNBUFFERED=1
|
|
30
|
+
|
|
31
|
+
RUN apk add --no-cache ca-certificates \
|
|
32
|
+
&& addgroup -g 1000 appuser \
|
|
33
|
+
&& adduser -D -u 1000 -G appuser appuser
|
|
34
|
+
|
|
35
|
+
COPY --from=builder --chown=appuser:appuser /app /app
|
|
36
|
+
|
|
37
|
+
WORKDIR /app
|
|
38
|
+
|
|
39
|
+
USER appuser
|
|
40
|
+
|
|
41
|
+
ENV PATH="/app/.venv/bin:$PATH"
|
|
42
|
+
|
|
43
|
+
HEALTHCHECK \
|
|
44
|
+
--interval=30s \
|
|
45
|
+
--timeout=10s \
|
|
46
|
+
--start-period=30s \
|
|
47
|
+
--retries=3 \
|
|
48
|
+
CMD wget -q -O - --post-data='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"health-check","version":"1.0.0"}}}' --header='Content-Type: application/json' --header='Accept: application/json, text/event-stream' http://127.0.0.1:8000/mcp > /dev/null 2>&1 || exit 1
|
|
49
|
+
|
|
50
|
+
ENV MCP_TRANSPORT=http
|
|
51
|
+
ENV MCP_HTTP_HOST=0.0.0.0
|
|
52
|
+
ENV MCP_HTTP_PORT=8000
|
|
53
|
+
|
|
54
|
+
EXPOSE 8000
|
|
55
|
+
|
|
56
|
+
CMD ["python", "-u", "run_server.py"]
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
FROM python:3.13-alpine3.23 AS builder
|
|
2
|
+
|
|
3
|
+
RUN pip install --root-user-action=ignore --no-cache-dir --upgrade pip \
|
|
4
|
+
&& pip install --root-user-action=ignore --no-cache-dir uv
|
|
5
|
+
|
|
6
|
+
ENV UV_LINK_MODE=copy
|
|
7
|
+
|
|
8
|
+
WORKDIR /app
|
|
9
|
+
|
|
10
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
11
|
+
--mount=type=bind,source=uv.lock,target=uv.lock \
|
|
12
|
+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
13
|
+
uv sync --locked --all-extras --no-install-project --no-dev \
|
|
14
|
+
&& uv pip install mcpo
|
|
15
|
+
|
|
16
|
+
COPY pyproject.toml uv.lock LICENSE README.md run_server.py ./
|
|
17
|
+
COPY src/ ./src/
|
|
18
|
+
|
|
19
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
20
|
+
uv sync --locked --all-extras --no-dev \
|
|
21
|
+
&& uv pip install mcpo
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
FROM python:3.13-alpine3.23
|
|
25
|
+
LABEL org.opencontainers.image.title="Ghostfolio MCP Server (MCPO)" \
|
|
26
|
+
org.opencontainers.image.description="MCP server for Ghostfolio management with MCPO" \
|
|
27
|
+
org.opencontainers.image.url="https://github.com/mhajder/ghostfolio-mcp" \
|
|
28
|
+
org.opencontainers.image.source="https://github.com/mhajder/ghostfolio-mcp" \
|
|
29
|
+
org.opencontainers.image.vendor="Mateusz Hajder" \
|
|
30
|
+
org.opencontainers.image.licenses="AGPL-3.0"
|
|
31
|
+
ENV PYTHONUNBUFFERED=1
|
|
32
|
+
|
|
33
|
+
RUN apk add --no-cache ca-certificates \
|
|
34
|
+
&& addgroup -g 1000 appuser \
|
|
35
|
+
&& adduser -D -u 1000 -G appuser appuser
|
|
36
|
+
|
|
37
|
+
COPY --from=builder --chown=appuser:appuser /app /app
|
|
38
|
+
|
|
39
|
+
WORKDIR /app
|
|
40
|
+
|
|
41
|
+
USER appuser
|
|
42
|
+
|
|
43
|
+
ENV PATH="/app/.venv/bin:$PATH"
|
|
44
|
+
|
|
45
|
+
HEALTHCHECK \
|
|
46
|
+
--interval=30s \
|
|
47
|
+
--timeout=10s \
|
|
48
|
+
--start-period=30s \
|
|
49
|
+
--retries=3 \
|
|
50
|
+
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:8000/openapi.json || exit 1
|
|
51
|
+
|
|
52
|
+
EXPOSE 8000
|
|
53
|
+
|
|
54
|
+
CMD ["sh", "-c", "if [ -n \"$MCPO_API_KEY\" ]; then exec mcpo --api-key \"$MCPO_API_KEY\" -- python -u run_server.py; else exec mcpo -- python -u run_server.py; fi"]
|