Skip to content

OpenAI ​

You can give OpenAI's Responses API access to TKP's MCP tools, or connect a ChatGPT client through OAuth. These are separate setup paths.

Responses API ​

You need two credentials: an OpenAI API key for requests to OpenAI and a TKP Personal Access Token with MCP and read access to a library. OpenAI's servers must be able to reach TKP; a local .test address will not work.

Use the following body for POST https://api.openai.com/v1/responses, authenticated with your OpenAI API key. Replace {APP_URL} with the TKP application address and <token> with the TKP token:

json
{
  "model": "gpt-5",
  "input": "Search the knowledge base for ...",
  "tools": [
    {
      "type": "mcp",
      "server_label": "tkp",
      "server_url": "{APP_URL}/mcp",
      "headers": {
        "Authorization": "Bearer <token>"
      },
      "allowed_tools": ["list_libraries", "search_resources", "inspect_resource", "resolve_citations"],
      "require_approval": "always"
    }
  ]
}

This example exposes four read-only tools. Replace the input with a question about your documents and use a model available to your OpenAI project.

The response can contain an mcp_approval_request instead of a tool result. Your application must show that request to the user and submit their decision as mcp_approval_response before execution continues. Follow the official approval flow to implement that continuation. Do not treat an approval request as a completed search. Keep approval handling when you later enable writes or costly analysis.

ChatGPT with OAuth ​

In a ChatGPT client supporting remote MCP, configure {APP_URL}/mcp and complete TKP's browser authorization. The available controls depend on your client and workspace policy. Follow the official MCP setup for that client. Then confirm the connection by asking it to list your TKP libraries.

Traceable Knowledge Platform