Skip to main content

OpenAI function calling testing helpers for MCP Test Harness

Project description

mcp-test-harness-openai

OpenAI function calling testing helpers for MCP Test Harness.

Author: Vaquar Khan -- https://github.com/vaquarkhan

Install

pip install mcp-test-harness-openai

This automatically installs mcp-test-harness as a dependency.

Usage

from mcp_test_harness_openai import assert_openai_tool, mcp_tools_to_openai_functions, create_openai_test_config

async def test_tool(mcp_server):
    await assert_openai_tool(mcp_server, "my_tool", {}, expected_text="ok")

def test_schema_bridge(mcp_tools):
    # mcp_tools from list_tools — convert for OpenAI SDKs
    return mcp_tools_to_openai_functions(mcp_tools)

cfg = create_openai_test_config("python server.py", timeout=45)

Helpers

  • Tool call assertion with optional text check
  • MCP tool → OpenAI schema converter
  • mcp-test.yaml-shaped config builder

License

Non-commercial use only with mandatory attribution. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_test_harness_openai-4.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_test_harness_openai-4.0.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file mcp_test_harness_openai-4.0.1.tar.gz.

File metadata

  • Download URL: mcp_test_harness_openai-4.0.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mcp_test_harness_openai-4.0.1.tar.gz
Algorithm Hash digest
SHA256 02431cf6ad1919088af2c24e1f62fc7bbca88fa332e068b5bfacd196ce811708
MD5 63013033e8e5517580a923e120d34b5a
BLAKE2b-256 b5c1a88816721bbc13227e32e6b635700a2445ffd8276b01fd87f7095b7b7b92

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_test_harness_openai-4.0.1.tar.gz:

Publisher: publish-packages.yml on vaquarkhan/mcp-test-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_test_harness_openai-4.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_test_harness_openai-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97c1738dced654095182e0f4cba0f9135c9ad13e94e5210b04af984a40d44e5e
MD5 864f89792a53cc2519e1687574f61289
BLAKE2b-256 4c801b6da8f8af0672925cd26dc68f7dc76460df9c0f060cc30adb62aed19cdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_test_harness_openai-4.0.1-py3-none-any.whl:

Publisher: publish-packages.yml on vaquarkhan/mcp-test-harness

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page