geopera-mcp 0.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.
- geopera_mcp-0.1.0/.github/workflows/publish.yml +55 -0
- geopera_mcp-0.1.0/.gitignore +9 -0
- geopera_mcp-0.1.0/LICENSE +21 -0
- geopera_mcp-0.1.0/PKG-INFO +108 -0
- geopera_mcp-0.1.0/README.md +73 -0
- geopera_mcp-0.1.0/geopera_mcp/__init__.py +13 -0
- geopera_mcp-0.1.0/geopera_mcp/kernel_openapi.json +35547 -0
- geopera_mcp-0.1.0/geopera_mcp/refresh_snapshot.py +63 -0
- geopera_mcp-0.1.0/geopera_mcp/server.py +447 -0
- geopera_mcp-0.1.0/pyproject.toml +71 -0
- geopera_mcp-0.1.0/tests/test_server.py +258 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Publish MCP server (geopera-mcp)
|
|
2
|
+
|
|
3
|
+
# Publishes geopera-mcp to PyPI on a tag like `v0.1.0`.
|
|
4
|
+
# Uses PyPI Trusted Publishing (OIDC) — no stored token.
|
|
5
|
+
#
|
|
6
|
+
# One-time PyPI setup: pypi.org -> the geopera-mcp project -> Publishing -> add a GitHub
|
|
7
|
+
# Actions publisher (repo geo-pera/geopera-mcp, workflow publish.yml, environment "pypi").
|
|
8
|
+
# First publish uses PyPI's "pending publisher" flow.
|
|
9
|
+
#
|
|
10
|
+
# Release: bump `version` in pyproject.toml (and geopera_mcp/__init__.py), then:
|
|
11
|
+
# git tag vX.Y.Z && git push origin vX.Y.Z
|
|
12
|
+
|
|
13
|
+
on:
|
|
14
|
+
push:
|
|
15
|
+
tags:
|
|
16
|
+
- "v*"
|
|
17
|
+
workflow_dispatch: {}
|
|
18
|
+
|
|
19
|
+
permissions:
|
|
20
|
+
contents: read
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
build-and-publish:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
environment: pypi
|
|
26
|
+
permissions:
|
|
27
|
+
id-token: write # OIDC token for PyPI Trusted Publishing
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: "3.11"
|
|
34
|
+
|
|
35
|
+
- name: Build sdist + wheel
|
|
36
|
+
run: |
|
|
37
|
+
python -m pip install --upgrade build twine
|
|
38
|
+
python -m build
|
|
39
|
+
twine check dist/*
|
|
40
|
+
|
|
41
|
+
- name: Sanity-check the wheel (console script + bundled snapshot)
|
|
42
|
+
run: |
|
|
43
|
+
python - <<'PY'
|
|
44
|
+
import glob, zipfile
|
|
45
|
+
whl = glob.glob("dist/*.whl")[0]
|
|
46
|
+
names = zipfile.ZipFile(whl).namelist()
|
|
47
|
+
assert any(n.endswith("geopera_mcp/kernel_openapi.json") for n in names), "snapshot not bundled in wheel"
|
|
48
|
+
entry = [n for n in names if n.endswith("entry_points.txt")]
|
|
49
|
+
txt = zipfile.ZipFile(whl).read(entry[0]).decode() if entry else ""
|
|
50
|
+
assert "geopera-mcp" in txt and "geopera_mcp.server:main" in txt, f"missing console script: {txt!r}"
|
|
51
|
+
print("ok: wheel bundles the snapshot and declares the `geopera-mcp` console script")
|
|
52
|
+
PY
|
|
53
|
+
|
|
54
|
+
- name: Publish to PyPI (Trusted Publishing)
|
|
55
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Geopera
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: geopera-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Model Context Protocol (MCP) server for the Geopera geospatial data platform
|
|
5
|
+
Project-URL: Homepage, https://docs.geopera.com
|
|
6
|
+
Project-URL: Documentation, https://docs.geopera.com/api-reference/sdks/mcp
|
|
7
|
+
Project-URL: Source, https://github.com/geo-pera/geopera-mcp
|
|
8
|
+
Author-email: Geopera <support@geopera.com>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: ai-agents,claude,earth-observation,geopera,geospatial,mcp,model-context-protocol,satellite,stac
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
24
|
+
Classifier: Topic :: Utilities
|
|
25
|
+
Requires-Python: >=3.11
|
|
26
|
+
Requires-Dist: fastmcp==3.4.2
|
|
27
|
+
Requires-Dist: httpx==0.28.1
|
|
28
|
+
Requires-Dist: mcp==1.27.2
|
|
29
|
+
Requires-Dist: pydantic==2.13.4
|
|
30
|
+
Requires-Dist: starlette==1.3.0
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
34
|
+
Description-Content-Type: text/markdown
|
|
35
|
+
|
|
36
|
+
# geopera-mcp
|
|
37
|
+
|
|
38
|
+
The official [Model Context Protocol](https://modelcontextprotocol.io) server for the
|
|
39
|
+
[Geopera](https://geopera.com) geospatial data platform. It exposes Geopera operations
|
|
40
|
+
as MCP tools so an AI agent (Claude Desktop, Claude Code, or your own MCP client) can
|
|
41
|
+
discover imagery, place and read back orders, run analytics, and more — with the same
|
|
42
|
+
auth, scopes, and provenance as any other Geopera client.
|
|
43
|
+
|
|
44
|
+
Each tool is named after its operation id (e.g. `orders.archive.place`) and proxies the
|
|
45
|
+
call to `POST /v1/op/{operation_id}`. The server imports nothing from the backend; it is
|
|
46
|
+
a standalone client of the same typed surface the Python/TypeScript SDKs and CLI consume.
|
|
47
|
+
|
|
48
|
+
## Install
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
pip install geopera-mcp
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
This installs the `geopera-mcp` console command, which speaks the `stdio` transport that
|
|
55
|
+
MCP clients attach to. Requires Python 3.11+.
|
|
56
|
+
|
|
57
|
+
## Run
|
|
58
|
+
|
|
59
|
+
The server is configured through environment variables. At minimum:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
export GEOPERA_API_URL="https://api.geopera.com"
|
|
63
|
+
export GEOPERA_API_TOKEN="gpra_..." # a Geopera API key, or a session token
|
|
64
|
+
geopera-mcp
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`geopera-mcp` runs over stdio by default — your MCP client launches it as a subprocess.
|
|
68
|
+
Set `MCP_TRANSPORT=http` to serve the streamable-HTTP transport instead (for a hosted
|
|
69
|
+
deployment).
|
|
70
|
+
|
|
71
|
+
## Wire it into an MCP client
|
|
72
|
+
|
|
73
|
+
Add a `geopera` entry under `mcpServers`. For Claude Desktop
|
|
74
|
+
(`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"geopera": {
|
|
80
|
+
"command": "geopera-mcp",
|
|
81
|
+
"env": {
|
|
82
|
+
"GEOPERA_API_URL": "https://api.geopera.com",
|
|
83
|
+
"GEOPERA_API_TOKEN": "gpra_your_api_key"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Restart the client and the Geopera tools appear. The agent's reach is exactly the scopes
|
|
91
|
+
on the token — it can do nothing the token could not do directly.
|
|
92
|
+
|
|
93
|
+
## Environment variables
|
|
94
|
+
|
|
95
|
+
| Variable | Purpose |
|
|
96
|
+
| --- | --- |
|
|
97
|
+
| `GEOPERA_API_URL` | Geopera API base URL. Default `https://api.geopera.com`. |
|
|
98
|
+
| `GEOPERA_API_TOKEN` | A `gpra_` API key or a session token, sent upstream as `Authorization: Bearer`. |
|
|
99
|
+
| `MCP_TRANSPORT` | `stdio` (default) or `http`. |
|
|
100
|
+
| `PORT` | Port for the `http` transport. |
|
|
101
|
+
|
|
102
|
+
## Documentation
|
|
103
|
+
|
|
104
|
+
Full docs: [docs.geopera.com/api-reference/sdks/mcp](https://docs.geopera.com/api-reference/sdks/mcp).
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
MIT
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# geopera-mcp
|
|
2
|
+
|
|
3
|
+
The official [Model Context Protocol](https://modelcontextprotocol.io) server for the
|
|
4
|
+
[Geopera](https://geopera.com) geospatial data platform. It exposes Geopera operations
|
|
5
|
+
as MCP tools so an AI agent (Claude Desktop, Claude Code, or your own MCP client) can
|
|
6
|
+
discover imagery, place and read back orders, run analytics, and more — with the same
|
|
7
|
+
auth, scopes, and provenance as any other Geopera client.
|
|
8
|
+
|
|
9
|
+
Each tool is named after its operation id (e.g. `orders.archive.place`) and proxies the
|
|
10
|
+
call to `POST /v1/op/{operation_id}`. The server imports nothing from the backend; it is
|
|
11
|
+
a standalone client of the same typed surface the Python/TypeScript SDKs and CLI consume.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install geopera-mcp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
This installs the `geopera-mcp` console command, which speaks the `stdio` transport that
|
|
20
|
+
MCP clients attach to. Requires Python 3.11+.
|
|
21
|
+
|
|
22
|
+
## Run
|
|
23
|
+
|
|
24
|
+
The server is configured through environment variables. At minimum:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
export GEOPERA_API_URL="https://api.geopera.com"
|
|
28
|
+
export GEOPERA_API_TOKEN="gpra_..." # a Geopera API key, or a session token
|
|
29
|
+
geopera-mcp
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`geopera-mcp` runs over stdio by default — your MCP client launches it as a subprocess.
|
|
33
|
+
Set `MCP_TRANSPORT=http` to serve the streamable-HTTP transport instead (for a hosted
|
|
34
|
+
deployment).
|
|
35
|
+
|
|
36
|
+
## Wire it into an MCP client
|
|
37
|
+
|
|
38
|
+
Add a `geopera` entry under `mcpServers`. For Claude Desktop
|
|
39
|
+
(`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"mcpServers": {
|
|
44
|
+
"geopera": {
|
|
45
|
+
"command": "geopera-mcp",
|
|
46
|
+
"env": {
|
|
47
|
+
"GEOPERA_API_URL": "https://api.geopera.com",
|
|
48
|
+
"GEOPERA_API_TOKEN": "gpra_your_api_key"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Restart the client and the Geopera tools appear. The agent's reach is exactly the scopes
|
|
56
|
+
on the token — it can do nothing the token could not do directly.
|
|
57
|
+
|
|
58
|
+
## Environment variables
|
|
59
|
+
|
|
60
|
+
| Variable | Purpose |
|
|
61
|
+
| --- | --- |
|
|
62
|
+
| `GEOPERA_API_URL` | Geopera API base URL. Default `https://api.geopera.com`. |
|
|
63
|
+
| `GEOPERA_API_TOKEN` | A `gpra_` API key or a session token, sent upstream as `Authorization: Bearer`. |
|
|
64
|
+
| `MCP_TRANSPORT` | `stdio` (default) or `http`. |
|
|
65
|
+
| `PORT` | Port for the `http` transport. |
|
|
66
|
+
|
|
67
|
+
## Documentation
|
|
68
|
+
|
|
69
|
+
Full docs: [docs.geopera.com/api-reference/sdks/mcp](https://docs.geopera.com/api-reference/sdks/mcp).
|
|
70
|
+
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
MIT
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""geopera-mcp — Model Context Protocol server for the Geopera platform.
|
|
2
|
+
|
|
3
|
+
Exposes Geopera operations as MCP tools so an AI agent (e.g. Claude) can discover
|
|
4
|
+
imagery, place orders, read results back, and run analytics with the same auth,
|
|
5
|
+
scopes, and provenance as any other client.
|
|
6
|
+
|
|
7
|
+
Run the ``geopera-mcp`` console command over stdio (the default) and point your MCP
|
|
8
|
+
client at it, or set ``MCP_TRANSPORT=http`` to serve the streamable-HTTP transport.
|
|
9
|
+
Configuration is via environment variables — at minimum ``GEOPERA_API_URL`` and
|
|
10
|
+
``GEOPERA_API_TOKEN`` (a ``gpra_`` API key or a session token).
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
__version__ = "0.1.0"
|