Skip to main content

MCP server for testing Oracle-to-PostgreSQL API migrations

Project description

apitest-mcp

MCP server for testing Oracle → PostgreSQL API migrations.

Give it an API URL — it scans your repo for DB credentials, reads the handler code, fetches valid test data from PG, calls the API, and validates the DB state.

Works with Claude Code and Antigravity.


Install

pip install apitest-mcp

Or from source:

git clone https://github.com/your-org/apitest-mcp
cd apitest-mcp
pip install -e .

Setup

Copy .env.example to .env and fill in your values:

cp .env.example .env
REPO_PATH=/path/to/your/repo
EMP_ID=your_emp_id
AK=your_jwt_token
  • REPO_PATH — absolute path to the repo being tested (PHP or Go)
  • EMP_ID — your employee ID for API auth
  • AK — your JWT token for API auth

Register in Claude Code

claude mcp add apitest-mcp -- python /path/to/apitest-mcp/server.py

Or add to ~/.claude/claude.json:

{
  "mcpServers": {
    "apitest-mcp": {
      "command": "python",
      "args": ["/path/to/apitest-mcp/server.py"],
      "env": {
        "REPO_PATH": "/path/to/your/repo",
        "EMP_ID": "your_emp_id",
        "AK": "your_jwt_token"
      }
    }
  }
}

Register in Antigravity

{
  "mcp_servers": [
    {
      "name": "apitest-mcp",
      "command": "python",
      "args": ["/path/to/apitest-mcp/server.py"],
      "env": {
        "REPO_PATH": "/path/to/your/repo",
        "EMP_ID": "your_emp_id",
        "AK": "your_jwt_token"
      }
    }
  ]
}

Usage

Once registered, just tell Claude:

Test this API: POST http://localhost:8080/erp/preovp/preovpdata

Claude will:

  1. Scan repo → find PG credentials
  2. Read handler code → understand params + tables
  3. Query PG → fetch valid test data
  4. Call the API → capture response
  5. Validate DB state → report PASS / FAIL

Tools exposed

Tool Description
scan_repo_config Scan repo to find PG connection details
read_api_code Find and return handler code for an API URL
query_pg Run a SELECT query on the discovered PG database
call_api Call an API endpoint with auth injected automatically
validate_db Run a SELECT and optionally assert expected field values

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

apitest_mcp-0.1.4.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

apitest_mcp-0.1.4-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file apitest_mcp-0.1.4.tar.gz.

File metadata

  • Download URL: apitest_mcp-0.1.4.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for apitest_mcp-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2eac95c1f945287aff00757bd99d21c022987feb89c49e6b975dc9dba64f8d47
MD5 de3328818cd271e171f0b2456ed031ea
BLAKE2b-256 37f686e551d4ebf3e06e33ab695d6c268c762a4bd9a1539ad17a9f78f81f4e92

See more details on using hashes here.

File details

Details for the file apitest_mcp-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: apitest_mcp-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for apitest_mcp-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6fb7435a2d94b27250cfd9e9d572915fa450e44dea790003ddc18a84131aeea8
MD5 3bf04361d4cce7a08ee003e6f4c3d1ee
BLAKE2b-256 83f9a7710c72df0bfd9daa09037c5a6e6ad72337a1863f558b338d035037106f

See more details on using hashes here.

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