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.0.tar.gz (5.5 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.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apitest_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 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.0.tar.gz
Algorithm Hash digest
SHA256 6c3a3f0aef78a20facc64e14119b40859608bb19702a66b04547082d01bb3c71
MD5 3224b39d05a10fce2b788cadfc3bdad1
BLAKE2b-256 176c6a30f57b4bfb5671bb6b0572e30a37a12556d70a19effd8256e9f9a5d790

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apitest_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f07f0577b6a51812b22531100a7866fe561853684baa54de582052bd8934733e
MD5 eb9fe49ebf00fd922cf350ae8983bf40
BLAKE2b-256 98c87ef91a431ab1af4eca373c7978734337c5cefb7df15f0aadcca8ed06f3e4

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