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.6.tar.gz (15.4 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.6-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apitest_mcp-0.1.6.tar.gz
  • Upload date:
  • Size: 15.4 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.6.tar.gz
Algorithm Hash digest
SHA256 f8a1b4464ffed92e2592f66b76950f377b0a752c37c434ad3d6c1e6694719d42
MD5 a03ca754d6d13f230b443d3677a5d456
BLAKE2b-256 8f7889b8c2db809702ab9dea876c1b5ea3c91c011cffb81e66b9d2d0d45f66e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apitest_mcp-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 12.6 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 586aa8d1455964988accef61a16a7b3e663511442faa029c75bc265d55ed9bb2
MD5 08ab2901b06e5b72d449adb50525d16e
BLAKE2b-256 68f79f9efc434b4dec67a2b808261a57842b6b3e161896d0e153f5b5b36c21d5

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