Developers

Use Lexeris MCP server in ChatGPT Responses API

With OpenAI's Responses API, you can plug external MCP servers – including the Lexeri MCP server – into your own applications as a tool. The model autonomously calls the relevant Lexeri features (term search, term checks, creating or proposing new terms, managing topics, and many more) whenever they are needed to answer a request. This makes it easy to integrate the Lexeri terminology directly into OpenAI-based assistants, chatbots, or automations without having to implement the individual API calls yourself.

This guide shows the basic structure of such a call in Python. A complete description of the MCP integration in the OpenAI API – including authentication, the approval mechanism, tool filtering, and supported models – can be found in OpenAI's documentation: https://developers.openai.com/api/docs/guides/tools-connectors-mcp

Example call

from openai import OpenAIclient = OpenAI()resp = client.responses.create(  model="gpt-5",  input="Check the following text for correct terminology...",  tools=[    {      "type": "mcp",      "server_label": "lexeri",      "server_description": "Lexeri terminology server – search terms, run term checks, propose or create terms.",      "server_url": "https://mcp.lexeri.com/mcp",      "authorization": "$LEXERI_API_TOKEN",      "require_approval": "never"    }  ])print(resp.output_text)

The Lexeri API token is passed in the authorization field directly in the tool entry (no longer as a headers dictionary). OpenAI does not store this value; it must be sent with every request, for example from an environment variable or a secrets manager.

Approval workflow

By default, OpenAI requests an approval before every tool call to an MCP server. In the example above, this is disabled with "require_approval": "never", because the Lexeri MCP server is a trusted server under your own control.

If you want to keep the approval flow or skip it only for selected tools, the OpenAI documentation describes the exact mechanism using mcp_approval_request and mcp_approval_response items as well as the granular form "require_approval": { "never": { "tool_names": ["..."] } }.

Optional: restricting the available tools

The allowed_tools field lets you specify which Lexeri tools the model is allowed to call at all. This is useful, for example, to allow read-only access or to reduce the number of imported tool definitions (and therefore the cost):

"allowed_tools": [  "search_for_terms",  "get_details_of_a_term",  "check_text_for_term_matches"]