Skip to main content

A modern MCP server for TCP ping testing via pingloc.com

Project description

tcpping MCP Server (stdio)

Minimal TCP latency probe server for MCP clients (e.g. GitHub Copilot Agents) using Playwright + FastMCP.

0.1.4: Added resilient fallback parsing (summary pattern search + heuristic row scan) and debug artifacts when structure changes on pingloc.com.

1. Add to your MCP client config

Example (mcp.json / Copilot Agents user settings):

"tcpping-mcp-server": {
	"type": "stdio",
	"command": "uvx",
	"args": [
		"tcpping-mcp-server"
	]
}

uvx will fetch & run the published script (or local cache) by name. You can also swap for python -m tcpping_mcp_stdio.modern_server if installed in a venv.

2. Available tool

Tool name: tcpping_run

Parameters (all optional unless noted):

  • target (str, required) – domain or URL (scheme optional)
  • port (int, default 443)
  • timeout (float, default 120)
  • retries (int, default 1)
  • headless (bool, default true)
  • browser_channel (str, default "msedge")
  • debug (bool, default false) – dump HTML/screenshot if no rows
  • summary_only (bool, default false) – return compact summary

3. Example call (conceptual JSON-RPC)

{
	"jsonrpc": "2.0",
	"id": "1",
	"method": "tools/call",
	"params": {
		"name": "tcpping_run",
		"arguments": { "target": "example.com", "summary_only": true }
	}
}

4. Local install (optional)

pip install tcpping-mcp-server
tcpping-mcp-server  # or: python -m tcpping_mcp_stdio.modern_server

5. Playwright browser dependency

First run will auto-download browsers when using uvx or after pip install. If needed manually:

playwright install chromium

6. Output

Returns a JSON string (you may need to parse once):

{
	"host": "example.com:443",
	"summary": { ... },
	"probes": [ ... ],
	"probe_count": 25,
	"timeouts": 0,
	"duration_sec": 12.34
}

7. Debugging

Set debug=true to dump HTML + screenshot into tcpping/debug/ when no probe rows captured.


Concise goal: drop the snippet above into your MCP client config and start using tcpping_run.

8. Release / Publish (maintainers)

Workflow using uv:

  1. Bump version in pyproject.toml and src/tcpping_mcp_stdio/modern_server.py (the VERSION constant). Use semver.
  2. Clean previous builds (optional):
    Remove-Item dist -Recurse -Force -ErrorAction SilentlyContinue
    
  3. Build artifacts:
    uv build
    
  4. (Optional) TestPyPI dry run:
    $Env:TEST_PYPI_API_TOKEN = 'pypi-AgENdGVzdC4uLg=='  # your TestPyPI token
    uv publish --repository testpypi --token $Env:TEST_PYPI_API_TOKEN
    
  5. Publish to PyPI:
    $Env:PYPI_API_TOKEN = 'pypi-AgEN...'   # never commit this
    uv publish --token $Env:PYPI_API_TOKEN
    
  6. Verify installation:
    uvx tcpping-mcp-server --help
    
  7. Tag in git (optional but recommended):
    git tag v<version>
    git push origin v<version>
    

If uv publish reports missing token, ensure the environment variable name matches the one you pass after --token.

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

tcpping_mcp_server-0.1.4.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

tcpping_mcp_server-0.1.4-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tcpping_mcp_server-0.1.4.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for tcpping_mcp_server-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1ee2c74448d1c140d5cef3ab0d791b6b9518fd5809d6d33b1439bb0fcae56c83
MD5 8aad37aace015b4c74d8a0b2fe967026
BLAKE2b-256 4454bf87c3717845b915f98028bbfc97b302b0762eb244de689b100a3a083380

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tcpping_mcp_server-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c0b7291d2810ac164b331fe68ca92ead30d66bfa5bd2097c8cde829e0c0d32e7
MD5 b90a7550de0ead9e0a864d276205fde7
BLAKE2b-256 82c403ebf537422b850f13a0bad9349f99c94ddcb69848b07d9ee2000b279a52

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