## 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):
```jsonc
"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)
```json
{
"jsonrpc": "2.0",
"id": "1",
"method": "tools/call",
"params": {
"name": "tcpping_run",
"arguments": { "target": "example.com", "summary_only": true }
}
}
```
### 4. Local install (optional)
```bash
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:
```bash
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):
```powershell
Remove-Item dist -Recurse -Force -ErrorAction SilentlyContinue
```
3. Build artifacts:
```powershell
uv build
```
4. (Optional) TestPyPI dry run:
```powershell
$Env:TEST_PYPI_API_TOKEN = 'pypi-AgENdGVzdC4uLg==' # your TestPyPI token
uv publish --repository testpypi --token $Env:TEST_PYPI_API_TOKEN
```
5. Publish to PyPI:
```powershell
$Env:PYPI_API_TOKEN = 'pypi-AgEN...' # never commit this
uv publish --token $Env:PYPI_API_TOKEN
```
6. Verify installation:
```powershell
uvx tcpping-mcp-server --help
```
7. Tag in git (optional but recommended):
```powershell
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`.
Raw data
{
"_id": null,
"home_page": null,
"name": "tcpping-mcp-server",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "tcp, ping, latency, mcp, model context protocol, playwright",
"author": null,
"author_email": "chenxizhang <ares@xizhang.com>",
"download_url": "https://files.pythonhosted.org/packages/bc/6c/d01cf04fdc0c7b279cb7c69f92c48d4973a159d6a329587364d188dfe28d/tcpping_mcp_server-0.1.5.tar.gz",
"platform": null,
"description": "## tcpping MCP Server (stdio)\r\n\r\nMinimal TCP latency probe server for MCP clients (e.g. GitHub Copilot Agents) using Playwright + FastMCP.\r\n\r\n> 0.1.4: Added resilient fallback parsing (summary pattern search + heuristic row scan) and debug artifacts when structure changes on pingloc.com.\r\n\r\n### 1. Add to your MCP client config\r\nExample (`mcp.json` / Copilot Agents user settings):\r\n```jsonc\r\n\"tcpping-mcp-server\": {\r\n\t\"type\": \"stdio\",\r\n\t\"command\": \"uvx\",\r\n\t\"args\": [\r\n\t\t\"tcpping-mcp-server\"\r\n\t]\r\n}\r\n```\r\n`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.\r\n\r\n### 2. Available tool\r\nTool name: `tcpping_run`\r\n\r\nParameters (all optional unless noted):\r\n- target (str, required) \u2013 domain or URL (scheme optional)\r\n- port (int, default 443)\r\n- timeout (float, default 120)\r\n- retries (int, default 1)\r\n- headless (bool, default true)\r\n- browser_channel (str, default \"msedge\")\r\n- debug (bool, default false) \u2013 dump HTML/screenshot if no rows\r\n- summary_only (bool, default false) \u2013 return compact summary\r\n\r\n### 3. Example call (conceptual JSON-RPC)\r\n```json\r\n{\r\n\t\"jsonrpc\": \"2.0\",\r\n\t\"id\": \"1\",\r\n\t\"method\": \"tools/call\",\r\n\t\"params\": {\r\n\t\t\"name\": \"tcpping_run\",\r\n\t\t\"arguments\": { \"target\": \"example.com\", \"summary_only\": true }\r\n\t}\r\n}\r\n```\r\n\r\n### 4. Local install (optional)\r\n```bash\r\npip install tcpping-mcp-server\r\ntcpping-mcp-server # or: python -m tcpping_mcp_stdio.modern_server\r\n```\r\n\r\n### 5. Playwright browser dependency\r\nFirst run will auto-download browsers when using `uvx` or after pip install. If needed manually:\r\n```bash\r\nplaywright install chromium\r\n```\r\n\r\n### 6. Output\r\nReturns a JSON string (you may need to parse once):\r\n```\r\n{\r\n\t\"host\": \"example.com:443\",\r\n\t\"summary\": { ... },\r\n\t\"probes\": [ ... ],\r\n\t\"probe_count\": 25,\r\n\t\"timeouts\": 0,\r\n\t\"duration_sec\": 12.34\r\n}\r\n```\r\n\r\n### 7. Debugging\r\nSet `debug=true` to dump HTML + screenshot into `tcpping/debug/` when no probe rows captured.\r\n\r\n---\r\nConcise goal: drop the snippet above into your MCP client config and start using `tcpping_run`.\r\n\r\n### 8. Release / Publish (maintainers)\r\nWorkflow using `uv`:\r\n\r\n1. Bump version in `pyproject.toml` and `src/tcpping_mcp_stdio/modern_server.py` (the `VERSION` constant). Use semver.\r\n2. Clean previous builds (optional):\r\n\t```powershell\r\n\tRemove-Item dist -Recurse -Force -ErrorAction SilentlyContinue\r\n\t```\r\n3. Build artifacts:\r\n\t```powershell\r\n\tuv build\r\n\t```\r\n4. (Optional) TestPyPI dry run:\r\n\t```powershell\r\n\t$Env:TEST_PYPI_API_TOKEN = 'pypi-AgENdGVzdC4uLg==' # your TestPyPI token\r\n\tuv publish --repository testpypi --token $Env:TEST_PYPI_API_TOKEN\r\n\t```\r\n5. Publish to PyPI:\r\n\t```powershell\r\n\t$Env:PYPI_API_TOKEN = 'pypi-AgEN...' # never commit this\r\n\tuv publish --token $Env:PYPI_API_TOKEN\r\n\t```\r\n6. Verify installation:\r\n\t```powershell\r\n\tuvx tcpping-mcp-server --help\r\n\t```\r\n7. Tag in git (optional but recommended):\r\n\t```powershell\r\n\tgit tag v<version>\r\n\tgit push origin v<version>\r\n\t```\r\n\r\nIf `uv publish` reports missing token, ensure the environment variable name matches the one you pass after `--token`.\r\n",
"bugtrack_url": null,
"license": null,
"summary": "A modern MCP server for TCP ping testing via pingloc.com",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://github.com/chenxizhang/devbox",
"Issues": "https://github.com/chenxizhang/devbox/issues",
"Repository": "https://github.com/chenxizhang/devbox",
"Source (Subdir)": "https://github.com/chenxizhang/devbox/tree/master/tcpping/mcp/stdio"
},
"split_keywords": [
"tcp",
" ping",
" latency",
" mcp",
" model context protocol",
" playwright"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b516513e11ffaf6451cb611806a2a4455e626196045d486d3c113bbc00f2b988",
"md5": "ee9999845ad83ce1a0c5ec7439e1a805",
"sha256": "b030aad1c02a04861fa5cd982f62e6534d14f7d388c1f373bfcada566d216f84"
},
"downloads": -1,
"filename": "tcpping_mcp_server-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ee9999845ad83ce1a0c5ec7439e1a805",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 11173,
"upload_time": "2025-09-20T06:15:59",
"upload_time_iso_8601": "2025-09-20T06:15:59.603423Z",
"url": "https://files.pythonhosted.org/packages/b5/16/513e11ffaf6451cb611806a2a4455e626196045d486d3c113bbc00f2b988/tcpping_mcp_server-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bc6cd01cf04fdc0c7b279cb7c69f92c48d4973a159d6a329587364d188dfe28d",
"md5": "6888a565fc5a44c969fd5c2e314fce70",
"sha256": "f43c7cc476035b06cc23db4def19bf072a0294460c66f8707df89ee78853ed0e"
},
"downloads": -1,
"filename": "tcpping_mcp_server-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "6888a565fc5a44c969fd5c2e314fce70",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 10293,
"upload_time": "2025-09-20T06:16:00",
"upload_time_iso_8601": "2025-09-20T06:16:00.856720Z",
"url": "https://files.pythonhosted.org/packages/bc/6c/d01cf04fdc0c7b279cb7c69f92c48d4973a159d6a329587364d188dfe28d/tcpping_mcp_server-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-20 06:16:00",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "chenxizhang",
"github_project": "devbox",
"github_not_found": true,
"lcname": "tcpping-mcp-server"
}