Connect an MCP client#
Connect an agent harness to the GeoNeMo MCP server to give it catalog, knowledge, retrieval and pack tools, plus the reviewed skills as resources.
The server uses authenticated HTTPS for the REST API and for HTTP MCP, with separate credential audiences. Authentication does not establish tenant isolation, and a working connection does not authorize production jobs or publication.
Prerequisites#
A harness that supports MCP: Codex, Cursor, Claude Code or another.
For HTTP, the MCP URL
https://geonemo.example.com/mcp(discovery returns it asendpoints.mcp) and either the harness’s OAuth login or an MCP personal token (Sign in and tokens).For stdio, the
geonemo-mcppackage (Python 3.12 or later) andgeonemo login. From a checkout:pip install ./contracts/client ./core/mcp.
Choose a transport#
HTTP |
stdio |
|
|---|---|---|
Command |
none; the harness connects to the URL (operators run |
|
Credential |
MCP OAuth or MCP personal token |
API sign-in from |
Server URL from |
the MCP URL |
|
Tool limits |
Set by the server operator |
Set by your scope file |
Configure one connection only. It serves both the tools and the skills.
Local stack, no sign-in#
The local stack (Run the local stack) serves MCP at http://127.0.0.1:8201/mcp.
It runs without sign-in, but the MCP endpoint still expects a bearer token and accepts
any value. These lines send local:
Run export GEONEMO_MCP_TOKEN=local, then add to ~/.codex/config.toml:
[mcp_servers.geonemo]
url = "http://127.0.0.1:8201/mcp"
bearer_token_env_var = "GEONEMO_MCP_TOKEN"
claude mcp add --transport http geonemo \
http://127.0.0.1:8201/mcp \
--header "Authorization: Bearer local"
In ~/.cursor/mcp.json:
{"mcpServers": {"geonemo": {
"url": "http://127.0.0.1:8201/mcp",
"headers": {"Authorization": "Bearer local"}}}}
Then ask the agent, for example:
Which collections does GeoNeMo have? Find the records in
preview-imagery and show me the first one.
It calls catalog_list_collections, then catalog_search and catalog_get_record on the
seeded collection. Tutorial: an agent question, end to end shows each call and its result.
HTTP with OAuth#
codex mcp add geonemo --url https://geonemo.example.com/mcp
codex mcp login geonemo
claude mcp add --transport http geonemo \
https://geonemo.example.com/mcp
In ~/.cursor/mcp.json:
{"mcpServers": {"geonemo": {
"url": "https://geonemo.example.com/mcp"}}}
A generic client needs the equivalent of
{"name":"geonemo","transport":"streamable-http","url":"https://geonemo.example.com/mcp"}.
HTTP with a personal token#
Put an MCP personal token in the environment of the harness process as GEONEMO_MCP_TOKEN,
never in a file.
In ~/.codex/config.toml:
[mcp_servers.geonemo]
url = "https://geonemo.example.com/mcp"
bearer_token_env_var = "GEONEMO_MCP_TOKEN"
claude mcp add --transport http geonemo \
https://geonemo.example.com/mcp \
--header "Authorization: Bearer $GEONEMO_MCP_TOKEN"
{"mcpServers": {"geonemo": {
"url": "https://geonemo.example.com/mcp",
"headers": {
"Authorization": "Bearer ${env:GEONEMO_MCP_TOKEN}"}}}}
stdio with a scope file#
Tutorial: find ships off a port uses this connection, with a scope file that its serve step writes.
The stdio bridge calls the REST API with your API credentials and refuses any call outside
its scope file. Save this as geonemo-scope.json:
{
"services_endpoint": "https://geonemo.example.com",
"project_id": "default",
"allowed_collections": ["preview-imagery"],
"allowed_tools": [
"catalog_list_collections",
"catalog_search",
"catalog_get_record"
],
"allowed_gkb_projects": [],
"capabilities": []
}
Key |
Meaning |
|---|---|
|
Required server origin, HTTP or HTTPS, no credentials |
|
Project sent with requests |
|
Collections tools may read; |
|
Datasets tools may read |
|
Tool names the connection may call; see MCP tools |
|
Extra GKB projects beyond |
|
Extra grants, such as |
The file must be a regular file under 64 KiB. Unknown keys are rejected. Then configure the harness:
[mcp_servers.geonemo]
command = "geonemo-mcp"
args = ["--scope-file", "/path/to/geonemo-scope.json"]
{"mcpServers": {"geonemo": {
"type": "stdio",
"command": "geonemo-mcp",
"args": ["--scope-file", "/path/to/geonemo-scope.json"]}}}
The stdio bridge takes the scope file only from --scope-file. (GEONEMO_MCP_SCOPE_FILE
sets the scope of the HTTP server, geonemo-services-mcp.) Without a scope file the bridge
reads GEONEMO_SERVICES_API_ENDPOINT and GEONEMO_MCP_PROJECT_ID.
Skills as resources#
The server lists each reviewed skill as skill://<skill>/SKILL.md and serves supporting
files at skill://<skill>/<path>. A harness that reads MCP resources can load them without a
checkout. See Install and use skills.
Verify#
Check that the harness completes initialize and tools/list. Saved configuration alone
does not prove the sign-in works. The list shows every tool the server has installed; the
scope is checked when a tool is called. A call outside it fails with tool is outside the deployment scope or collection is outside the deployment scope. Do not work around a
refusal with raw REST calls.
Result#
The harness lists the server’s tools (MCP tools) and the skill resources, and can call the tools and collections its scope allows.