geonode-mcp
Copilot instructions1 starsChanged 8 months agoMITView on GitHub
Use the local project environment and lockfile-managed dependencies: Run the MCP server locally:
- Reads credentials
The file
We split this copilot-instructions.md into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Use the local project environment and lockfile-managed dependencies:
- Distinctive: line 30
Run the MCP server locally:
- Very specific: line 49
Keep new MCP tools in mcp_geonode/server.py and register them with @mcp.tool().
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Copilot instructions for mcp-geonode
Build, test, and lint commands
Use the local project environment and lockfile-managed dependencies:
uv sync --extra dev --extra envRun checks:
# tests (full suite)
uv run pytest -q
# single test
uv run pytest test_env_config.py::test_env_configuration -q
# lint
uv run ruff check .
# formatting check
uv run black --check .
# package build
uv buildRun the MCP server locally:
uv run python main.py
# or
uv run python cli.pyHigh-level architecture
- The implementation is centralized in
mcp_geonode/server.py. main.pyis a thin entrypoint (from mcp_geonode.server import main), andcli.pywraps startup/transport flags but currently falls back to stdio by calling the samemain().GeoNodeConfig(Pydantic model) is responsible for reading and validating environment-based configuration (GEONODE_*vars).GeoNodeClientwraps all HTTP access to GeoNode API v2 through one asyncrequest()method, including auth header setup and upload-specific header handling.- A module-global
geonode_clientis initialized via_auto_configure_from_env()at import time; all MCP tools callget_client()and fail early if config is missing. - Each MCP capability is exposed as
@mcp.tool()function in this same module (resources, uploads, users, permissions, upload-status, linked resources).
Key codebase conventions
- Keep new MCP tools in
mcp_geonode/server.pyand register them with@mcp.tool(). - Tool handlers generally return JSON-like dictionaries (
Dict[str, Any]) and convert operational failures to{"error": "...message..."}instead of propagating exceptions to the MCP layer. - Reuse
get_client()+GeoNodeClient.request()for all API calls; endpoints are passed relative to/api/v2. - Authentication precedence in
GeoNodeClient: bearer token (GEONODE_TOKEN) first, then basic auth (GEONODE_USERNAME/GEONODE_PASSWORD). - Environment-first configuration is the active runtime path (
.envvia optionalpython-dotenv+GEONODE_*vars). Keep any new config flow consistent with this startup behavior. - For shapefile uploads, follow existing sidecar-file behavior (
.dbf,.shx,.prj,.sld) when extending upload logic.
Known current baseline (important for future sessions)
uv run pytest -qcurrently errors during collection becausetest_server.pyimportsconfigure_geonodefrommcp_geonode.server, but that symbol is not present in the current server module.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

