Skip to content

OMD Go MCP Service

The omd-go-service is a FastMCP server that exposes OMD Go OData data and operations as MCP tools over Streamable HTTP.


Overview

Property Value
Default port 8050
Transport Streamable HTTP (/mcp)
Authentication JWT Bearer (RS256)
Source omd-mcp/omd-go-service/

Tools

get_odata_schema

Retrieve the schema for one or more OData entities. Must be called before querying an entity.

Parameters:

Name Type Description
entities list[str] Entity names to retrieve schemas for

Supported entities: Task, Customer, Resource, TaskAttachment, Territory, ContractType, ContractLine, Contract, Status, AttachmentType, SubType, Trip


get_odata_entity

Query an OData entity.

Parameters:

Name Type Description
entity_name str Entity to query (must be in the supported list)
query str OData query string (unencoded, e.g. $filter=Territory/name eq 'Neuss')
config_id int OMD configuration ID
reduce bool If true, strip internal fields from the response

Returns: { error, data, count, message }

Query tips: - Use $select to request only the fields you need. - Use $expand to inline related entities (e.g. $expand=Territory). - Use DateTimeOffset format for date filters: scheduled gt 2025-01-01T16:00:00.000Z. - Do not encode the query string — encoding is applied automatically.


create_odata_entity

Create a new entity.

Parameters:

Name Type Description
entity_name str Entity type to create
config_id int OMD configuration ID
entity_data dict Field values for the new entity

Required fields per entity are indicated by "required": true in the schema returned by get_odata_schema.


update_odata_entity

Update fields on an existing entity.

Parameters:

Name Type Description
entity_name str Entity type
entity_id str ID of the entity to update
config_id int OMD configuration ID
entity_data dict Fields to update

delete_odata_entity

Delete an entity.

Parameters:

Name Type Description
entity_name str Entity type
entity_id str ID of the entity to delete
config_id int OMD configuration ID

Running locally

# From omd-mcp root
uv sync --project omd-go-service
uv run --project omd-go-service --directory omd-go-service/src python main.py

The server listens on port 8050.


Environment variables

Copy .env.example to .env in the omd-go-service/ directory:

Variable Description
OMD_JWKS_URI JWKS endpoint of the OMD identity provider
OMD_JWT_ISSUER Expected JWT issuer
OMD_API_BASE_URL Base URL of the OMD Go OData API
OMD_USE_LOCAL_AUTH_SERVER Set to 1 to use the dev auth-server instead of the production IdP
OMD_MCP_PUBLIC_BASE_URL Public URL of this MCP service (required when using local auth server)
OMD_AUTH_SERVER_ISSUER Issuer URL of the dev auth-server

Testing

A Jupyter notebook (omd-mcp/testing.ipynb) is provided for interactive testing. Start the service, open the notebook, set token to a valid Bearer token, and run the cells.

If you receive a 401 response, decode the JWT payload and verify that the iss claim and JWKS URL match the JWTVerifier configuration in src/main.py.