Setup Guide

Connect lexicalpy to ChatGPT in five steps

Vocabulary NER and embedding-based semantic search, exposed as a Custom GPT action. The same server speaks MCP at /mcp/ for MCP clients.

Checking server
1

Get your API key

The server admin has set a bearer token. ChatGPT sends it on every call. If you don't have a key, ask your admin.

2

Create a Custom GPT

  1. Go to chat.openai.com/gpts/editor (Plus plan required).
  2. In the Configure tab, name your GPT and add a short description.
  3. Scroll to the bottom and click Create new action.
3

Import the OpenAPI schema

In the action editor, click Import from URL and paste this:

ChatGPT will load the schema and list three operations: ner, lookup, semantic_search.

4

Set authentication

  1. Click the gear icon next to Authentication.
  2. Choose API Key.
  3. Auth Type: Bearer.
  4. Paste your API key from Step 1.
5

Try it in your GPT

Save the GPT and send it a message like:

What MeSH terms match "opioid antagonist"? Use semantic_search.

The GPT calls /search-records and returns ranked vocabulary candidates with similarity scores.

Test the API directly

Paste your API key and a query to verify the endpoint before configuring ChatGPT.

Connect from other clients

The same server speaks MCP at . Any client that supports Streamable HTTP transport can use it.

Codex CLI MCP

Edit ~/.codex/config.toml and add:

Save the file and restart Codex. Verify by asking it to call semantic_search for a vocabulary query. See Codex docs for the latest MCP config schema.