capsolver-mcp 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- capsolver_mcp-0.1.0/.gitignore +44 -0
- capsolver_mcp-0.1.0/CHANGELOG.md +19 -0
- capsolver_mcp-0.1.0/CONTRIBUTING.md +41 -0
- capsolver_mcp-0.1.0/LICENSE +15 -0
- capsolver_mcp-0.1.0/PKG-INFO +157 -0
- capsolver_mcp-0.1.0/PUBLISHING.md +118 -0
- capsolver_mcp-0.1.0/README.md +120 -0
- capsolver_mcp-0.1.0/SECURITY.md +32 -0
- capsolver_mcp-0.1.0/SUPPORT.md +25 -0
- capsolver_mcp-0.1.0/docs/mcp-integration.md +269 -0
- capsolver_mcp-0.1.0/pyproject.toml +68 -0
- capsolver_mcp-0.1.0/requirements-dev.txt +18 -0
- capsolver_mcp-0.1.0/requirements.txt +5 -0
- capsolver_mcp-0.1.0/src/capsolver_mcp/__init__.py +9 -0
- capsolver_mcp-0.1.0/src/capsolver_mcp/__main__.py +74 -0
- capsolver_mcp-0.1.0/src/capsolver_mcp/py.typed +0 -0
- capsolver_mcp-0.1.0/src/capsolver_mcp/server.py +351 -0
- capsolver_mcp-0.1.0/tests/__init__.py +0 -0
- capsolver_mcp-0.1.0/tests/test_tools.py +572 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Byte-compiled / optimized
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
*.so
|
|
6
|
+
|
|
7
|
+
# Distribution
|
|
8
|
+
dist/
|
|
9
|
+
build/
|
|
10
|
+
*.egg-info/
|
|
11
|
+
*.egg
|
|
12
|
+
*.whl
|
|
13
|
+
|
|
14
|
+
# Virtual environments
|
|
15
|
+
.venv/
|
|
16
|
+
venv/
|
|
17
|
+
env/
|
|
18
|
+
|
|
19
|
+
# IDE
|
|
20
|
+
.idea/
|
|
21
|
+
.vscode/
|
|
22
|
+
.cursor/
|
|
23
|
+
*.swp
|
|
24
|
+
*.swo
|
|
25
|
+
|
|
26
|
+
# Testing
|
|
27
|
+
.pytest_cache/
|
|
28
|
+
.coverage
|
|
29
|
+
htmlcov/
|
|
30
|
+
.mypy_cache/
|
|
31
|
+
.ruff_cache/
|
|
32
|
+
.dmypy.json
|
|
33
|
+
|
|
34
|
+
# Environment
|
|
35
|
+
.env
|
|
36
|
+
.env.local
|
|
37
|
+
.python-version
|
|
38
|
+
|
|
39
|
+
# Logs
|
|
40
|
+
*.log
|
|
41
|
+
|
|
42
|
+
# OS
|
|
43
|
+
.DS_Store
|
|
44
|
+
Thumbs.db
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
This project follows semantic versioning where practical. Public releases are
|
|
6
|
+
tagged in Git as `vX.Y.Z` and published to PyPI with the same version.
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2026-09-01
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial public release of `capsolver-mcp`.
|
|
13
|
+
- MCP server exposing CapSolver captcha-solving tools.
|
|
14
|
+
- Support for stdio, SSE, and streamable HTTP transports.
|
|
15
|
+
- Optional browser-based tools behind the `browser` extra.
|
|
16
|
+
- Client configuration guide for Claude Desktop, Claude Code, Cursor,
|
|
17
|
+
Windsurf, Cline, and remote HTTP clients.
|
|
18
|
+
- `capsolver-mcp` CLI entry point.
|
|
19
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in `capsolver-mcp`.
|
|
4
|
+
|
|
5
|
+
This repository is maintained by the CapSolver team. Issues and pull requests
|
|
6
|
+
are welcome when they are focused on bugs, documentation, compatibility, or
|
|
7
|
+
small improvements to the public MCP server surface.
|
|
8
|
+
|
|
9
|
+
## Before You Start
|
|
10
|
+
|
|
11
|
+
- Search existing issues before opening a new one.
|
|
12
|
+
- Open an issue before starting a large change or adding support for a new MCP
|
|
13
|
+
client.
|
|
14
|
+
- Do not include real API keys, cookies, private URLs, MCP client configs,
|
|
15
|
+
prompts, tool traces, or customer data in issues, tests, examples, or
|
|
16
|
+
screenshots.
|
|
17
|
+
- Keep examples token-mode focused and use placeholder credentials.
|
|
18
|
+
|
|
19
|
+
## Development
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
uv sync --all-extras
|
|
23
|
+
uv run pytest
|
|
24
|
+
uv run ruff check src tests
|
|
25
|
+
uv run mypy src
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
If you do not use `uv`, install the development dependencies from
|
|
29
|
+
`requirements-dev.txt` and run the equivalent commands with Python.
|
|
30
|
+
|
|
31
|
+
## Pull Requests
|
|
32
|
+
|
|
33
|
+
Pull requests should include:
|
|
34
|
+
|
|
35
|
+
- A clear description of the change.
|
|
36
|
+
- Tests or a short explanation of why tests are not needed.
|
|
37
|
+
- Documentation updates for user-facing behavior.
|
|
38
|
+
|
|
39
|
+
Maintainers may close changes that are outside the public MCP server scope or
|
|
40
|
+
require private service-side details.
|
|
41
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 capsolver-ai
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: capsolver-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MCP Server for CapSolver — expose captcha-solving capabilities to AI agents via Model Context Protocol.
|
|
5
|
+
Project-URL: Homepage, https://capsolver.com
|
|
6
|
+
Project-URL: Repository, https://github.com/capsolver-ai/mcp-capsolver
|
|
7
|
+
Project-URL: Issues, https://github.com/capsolver-ai/mcp-capsolver/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/capsolver-ai/mcp-capsolver/blob/main/docs/mcp-integration.md
|
|
9
|
+
Project-URL: Changelog, https://github.com/capsolver-ai/mcp-capsolver/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Security, https://github.com/capsolver-ai/mcp-capsolver/blob/main/SECURITY.md
|
|
11
|
+
Author-email: capsolver-ai <dev@capsolver.ai>
|
|
12
|
+
License-Expression: ISC
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Keywords: ai-agent,capsolver,captcha,mcp,model-context-protocol
|
|
15
|
+
Classifier: Development Status :: 3 - Alpha
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.10
|
|
27
|
+
Requires-Dist: capsolver-core>=0.1.0
|
|
28
|
+
Requires-Dist: mcp<2,>=1.0.0
|
|
29
|
+
Provides-Extra: browser
|
|
30
|
+
Requires-Dist: playwright>=1.40; extra == 'browser'
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: mypy>=1.10; extra == 'dev'
|
|
33
|
+
Requires-Dist: pytest-asyncio>=1.0; extra == 'dev'
|
|
34
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
35
|
+
Requires-Dist: ruff>=0.4; extra == 'dev'
|
|
36
|
+
Description-Content-Type: text/markdown
|
|
37
|
+
|
|
38
|
+
# capsolver-mcp
|
|
39
|
+
|
|
40
|
+
MCP Server for [CapSolver](https://capsolver.com) — expose captcha-solving capabilities to AI agents via the [Model Context Protocol](https://modelcontextprotocol.io).
|
|
41
|
+
|
|
42
|
+
See the [capsolver-ai](https://github.com/capsolver-ai/capsolver-ai) hub repo for integration examples and the full documentation.
|
|
43
|
+
|
|
44
|
+
For detailed MCP client setup (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, and more), see [docs/mcp-integration.md](docs/mcp-integration.md).
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install capsolver-mcp
|
|
50
|
+
pip install capsolver-mcp[browser] # with Playwright support (for detect/solve_on_page)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
All tools read the API key from the environment:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# bash / zsh
|
|
57
|
+
export CAPSOLVER_API_KEY="your-capsolver-api-key"
|
|
58
|
+
|
|
59
|
+
# PowerShell
|
|
60
|
+
$env:CAPSOLVER_API_KEY = "your-capsolver-api-key"
|
|
61
|
+
|
|
62
|
+
# cmd
|
|
63
|
+
set CAPSOLVER_API_KEY=your-capsolver-api-key
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Usage
|
|
67
|
+
|
|
68
|
+
### CLI
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# stdio (default — for local MCP clients like Claude Desktop)
|
|
72
|
+
capsolver-mcp
|
|
73
|
+
|
|
74
|
+
# SSE (for remote / HTTP access)
|
|
75
|
+
capsolver-mcp --transport sse --host 0.0.0.0 --port 8000
|
|
76
|
+
|
|
77
|
+
# Streamable HTTP (MCP 2025-03-26 spec)
|
|
78
|
+
capsolver-mcp --transport streamable-http --host 0.0.0.0 --port 8000
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### CLI options
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
capsolver-mcp [OPTIONS]
|
|
85
|
+
|
|
86
|
+
--transport {stdio,sse,streamable-http}
|
|
87
|
+
Transport protocol (default: stdio)
|
|
88
|
+
--host HOST Bind host for SSE/HTTP transports (default: 127.0.0.1)
|
|
89
|
+
--port PORT Bind port for SSE/HTTP transports (default: 8000)
|
|
90
|
+
--api-key KEY API key (fallback: CAPSOLVER_API_KEY env)
|
|
91
|
+
--name NAME Server name (default: capsolver)
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Programmatic
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from capsolver_mcp.server import create_server
|
|
98
|
+
|
|
99
|
+
server = create_server(
|
|
100
|
+
api_key="your-key", # or set CAPSOLVER_API_KEY env var
|
|
101
|
+
server_name="capsolver", # name advertised to MCP clients
|
|
102
|
+
host="127.0.0.1", # bind host for SSE / HTTP transports
|
|
103
|
+
port=8000, # bind port for SSE / HTTP transports
|
|
104
|
+
)
|
|
105
|
+
server.run(transport="sse") # or "stdio" or "streamable-http"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
> **Note:** `host` and `port` are constructor parameters on `create_server()`
|
|
109
|
+
> (forwarded to `FastMCP`), matching the MCP Python SDK 1.x API.
|
|
110
|
+
|
|
111
|
+
## Configure in Claude Desktop
|
|
112
|
+
|
|
113
|
+
Add to your `claude_desktop_config.json`:
|
|
114
|
+
|
|
115
|
+
```json
|
|
116
|
+
{
|
|
117
|
+
"mcpServers": {
|
|
118
|
+
"capsolver": {
|
|
119
|
+
"command": "capsolver-mcp",
|
|
120
|
+
"env": {
|
|
121
|
+
"CAPSOLVER_API_KEY": "your-key"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Available tools
|
|
129
|
+
|
|
130
|
+
| Tool | Browser? | Description |
|
|
131
|
+
|---|---|---|
|
|
132
|
+
| `solve_captcha` | No | Solve a captcha by type + site params (token mode) |
|
|
133
|
+
| `detect_captchas` | Yes | Scan a page URL and list present captcha types |
|
|
134
|
+
| `solve_on_page` | Yes | Detect + solve + autofill all captchas on a page |
|
|
135
|
+
| `get_balance` | No | Check account balance and packages |
|
|
136
|
+
| `get_supported_captchas` | No | List all supported captcha types and handlers |
|
|
137
|
+
|
|
138
|
+
Browser-based tools (`detect_captchas`, `solve_on_page`) require the `browser` extra:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
pip install capsolver-mcp[browser]
|
|
142
|
+
playwright install chromium
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Development
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
git clone https://github.com/capsolver-ai/mcp-capsolver.git
|
|
149
|
+
cd mcp-capsolver
|
|
150
|
+
uv sync --all-extras # or: pip install -r requirements-dev.txt
|
|
151
|
+
uv run pytest # run tests
|
|
152
|
+
uv run ruff check src tests # lint
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## License
|
|
156
|
+
|
|
157
|
+
ISC
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Publishing
|
|
2
|
+
|
|
3
|
+
Release target: `capsolver-mcp` version `0.1.0`, prepared for public release on
|
|
4
|
+
2026-09-01.
|
|
5
|
+
|
|
6
|
+
This checklist is for maintainers syncing the prepared public files to the
|
|
7
|
+
official open-source repository, testing the package on TestPyPI, and then
|
|
8
|
+
publishing the final package to PyPI.
|
|
9
|
+
|
|
10
|
+
Publish `capsolver-core==0.1.0` first. This package depends on
|
|
11
|
+
`capsolver-core>=0.1.0`.
|
|
12
|
+
|
|
13
|
+
## Preconditions
|
|
14
|
+
|
|
15
|
+
- The source is the prepared public copy, not a private development checkout.
|
|
16
|
+
- `capsolver-core==0.1.0` has already passed TestPyPI testing before this
|
|
17
|
+
package is tested.
|
|
18
|
+
- `capsolver-core==0.1.0` is already available on PyPI before this package is
|
|
19
|
+
formally published.
|
|
20
|
+
- `pyproject.toml` has `version = "0.1.0"`.
|
|
21
|
+
- `CHANGELOG.md` has `## [0.1.0] - 2026-09-01`.
|
|
22
|
+
- `README.md`, `LICENSE`, `SECURITY.md`, `CONTRIBUTING.md`, and `SUPPORT.md`
|
|
23
|
+
are present.
|
|
24
|
+
- Documentation examples use placeholder credentials only.
|
|
25
|
+
- The tree does not contain `.git`, `.venv`, `uv.lock`, caches, local path
|
|
26
|
+
overrides, real API keys, browser profiles, MCP client configs with secrets,
|
|
27
|
+
prompts, tool traces, or private service data.
|
|
28
|
+
|
|
29
|
+
## Sync to the Official Open-Source Repository
|
|
30
|
+
|
|
31
|
+
Copy this directory into the official `mcp-capsolver` public repository working
|
|
32
|
+
tree, then review the diff before committing.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
git status
|
|
36
|
+
git diff
|
|
37
|
+
git add .
|
|
38
|
+
git commit -m "Release v0.1.0"
|
|
39
|
+
git status
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Do not tag until the build, TestPyPI upload, and install test have passed.
|
|
43
|
+
|
|
44
|
+
## Verify Locally
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
uv sync --all-extras
|
|
48
|
+
uv run pytest
|
|
49
|
+
uv run ruff check src tests
|
|
50
|
+
uv run mypy src
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Build and Check
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
python -m pip install --upgrade build twine
|
|
57
|
+
python -m build
|
|
58
|
+
python -m twine check dist/*
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Inspect the source distribution and wheel before upload. Confirm that no
|
|
62
|
+
private files, local paths, secrets, browser profiles, caches, MCP client
|
|
63
|
+
configs with secrets, prompts, tool traces, or test output are included.
|
|
64
|
+
|
|
65
|
+
## TestPyPI Test Release
|
|
66
|
+
|
|
67
|
+
Upload the exact distribution files to TestPyPI first.
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
python -m twine upload --repository testpypi dist/*
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Install from TestPyPI in a clean environment and smoke-test the CLI import path.
|
|
74
|
+
Use PyPI as an extra index so normal third-party dependencies can still resolve.
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
python -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ capsolver-mcp==0.1.0
|
|
78
|
+
python -c "import capsolver_mcp; print(capsolver_mcp.__version__)"
|
|
79
|
+
capsolver-mcp --help
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
PyPI and TestPyPI distributions cannot be overwritten. If the test upload is
|
|
83
|
+
wrong, fix the issue and publish a new version.
|
|
84
|
+
|
|
85
|
+
## Formal PyPI Release
|
|
86
|
+
|
|
87
|
+
After TestPyPI passes and `capsolver-core==0.1.0` is available from PyPI, upload
|
|
88
|
+
the same checked distribution files to PyPI.
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
python -m twine upload dist/*
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Then verify installation from PyPI.
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
python -m pip install capsolver-mcp==0.1.0
|
|
98
|
+
python -c "import capsolver_mcp; print(capsolver_mcp.__version__)"
|
|
99
|
+
capsolver-mcp --help
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Tag and GitHub Release
|
|
103
|
+
|
|
104
|
+
When the PyPI release is verified, create the release tag and push it from the
|
|
105
|
+
official public repository.
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
git tag v0.1.0
|
|
109
|
+
git push origin main
|
|
110
|
+
git push origin v0.1.0
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Create a GitHub Release for `v0.1.0` using the `CHANGELOG.md` entry.
|
|
114
|
+
|
|
115
|
+
Prefer PyPI Trusted Publishing from the official public GitHub repository for
|
|
116
|
+
future releases. If manual upload is used, use a project-scoped PyPI API token
|
|
117
|
+
instead of an account password.
|
|
118
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# capsolver-mcp
|
|
2
|
+
|
|
3
|
+
MCP Server for [CapSolver](https://capsolver.com) — expose captcha-solving capabilities to AI agents via the [Model Context Protocol](https://modelcontextprotocol.io).
|
|
4
|
+
|
|
5
|
+
See the [capsolver-ai](https://github.com/capsolver-ai/capsolver-ai) hub repo for integration examples and the full documentation.
|
|
6
|
+
|
|
7
|
+
For detailed MCP client setup (Claude Desktop, Claude Code, Cursor, Windsurf, Cline, and more), see [docs/mcp-integration.md](docs/mcp-integration.md).
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pip install capsolver-mcp
|
|
13
|
+
pip install capsolver-mcp[browser] # with Playwright support (for detect/solve_on_page)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
All tools read the API key from the environment:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# bash / zsh
|
|
20
|
+
export CAPSOLVER_API_KEY="your-capsolver-api-key"
|
|
21
|
+
|
|
22
|
+
# PowerShell
|
|
23
|
+
$env:CAPSOLVER_API_KEY = "your-capsolver-api-key"
|
|
24
|
+
|
|
25
|
+
# cmd
|
|
26
|
+
set CAPSOLVER_API_KEY=your-capsolver-api-key
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
### CLI
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# stdio (default — for local MCP clients like Claude Desktop)
|
|
35
|
+
capsolver-mcp
|
|
36
|
+
|
|
37
|
+
# SSE (for remote / HTTP access)
|
|
38
|
+
capsolver-mcp --transport sse --host 0.0.0.0 --port 8000
|
|
39
|
+
|
|
40
|
+
# Streamable HTTP (MCP 2025-03-26 spec)
|
|
41
|
+
capsolver-mcp --transport streamable-http --host 0.0.0.0 --port 8000
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### CLI options
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
capsolver-mcp [OPTIONS]
|
|
48
|
+
|
|
49
|
+
--transport {stdio,sse,streamable-http}
|
|
50
|
+
Transport protocol (default: stdio)
|
|
51
|
+
--host HOST Bind host for SSE/HTTP transports (default: 127.0.0.1)
|
|
52
|
+
--port PORT Bind port for SSE/HTTP transports (default: 8000)
|
|
53
|
+
--api-key KEY API key (fallback: CAPSOLVER_API_KEY env)
|
|
54
|
+
--name NAME Server name (default: capsolver)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Programmatic
|
|
58
|
+
|
|
59
|
+
```python
|
|
60
|
+
from capsolver_mcp.server import create_server
|
|
61
|
+
|
|
62
|
+
server = create_server(
|
|
63
|
+
api_key="your-key", # or set CAPSOLVER_API_KEY env var
|
|
64
|
+
server_name="capsolver", # name advertised to MCP clients
|
|
65
|
+
host="127.0.0.1", # bind host for SSE / HTTP transports
|
|
66
|
+
port=8000, # bind port for SSE / HTTP transports
|
|
67
|
+
)
|
|
68
|
+
server.run(transport="sse") # or "stdio" or "streamable-http"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> **Note:** `host` and `port` are constructor parameters on `create_server()`
|
|
72
|
+
> (forwarded to `FastMCP`), matching the MCP Python SDK 1.x API.
|
|
73
|
+
|
|
74
|
+
## Configure in Claude Desktop
|
|
75
|
+
|
|
76
|
+
Add to your `claude_desktop_config.json`:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"mcpServers": {
|
|
81
|
+
"capsolver": {
|
|
82
|
+
"command": "capsolver-mcp",
|
|
83
|
+
"env": {
|
|
84
|
+
"CAPSOLVER_API_KEY": "your-key"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Available tools
|
|
92
|
+
|
|
93
|
+
| Tool | Browser? | Description |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| `solve_captcha` | No | Solve a captcha by type + site params (token mode) |
|
|
96
|
+
| `detect_captchas` | Yes | Scan a page URL and list present captcha types |
|
|
97
|
+
| `solve_on_page` | Yes | Detect + solve + autofill all captchas on a page |
|
|
98
|
+
| `get_balance` | No | Check account balance and packages |
|
|
99
|
+
| `get_supported_captchas` | No | List all supported captcha types and handlers |
|
|
100
|
+
|
|
101
|
+
Browser-based tools (`detect_captchas`, `solve_on_page`) require the `browser` extra:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install capsolver-mcp[browser]
|
|
105
|
+
playwright install chromium
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Development
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
git clone https://github.com/capsolver-ai/mcp-capsolver.git
|
|
112
|
+
cd mcp-capsolver
|
|
113
|
+
uv sync --all-extras # or: pip install -r requirements-dev.txt
|
|
114
|
+
uv run pytest # run tests
|
|
115
|
+
uv run ruff check src tests # lint
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## License
|
|
119
|
+
|
|
120
|
+
ISC
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Security fixes are provided for the latest public release line.
|
|
6
|
+
|
|
7
|
+
| Version | Supported |
|
|
8
|
+
| ------- | --------- |
|
|
9
|
+
| 0.1.x | Yes |
|
|
10
|
+
|
|
11
|
+
## Reporting a Vulnerability
|
|
12
|
+
|
|
13
|
+
Please do not open public issues for vulnerabilities, leaked credentials, or
|
|
14
|
+
reports that include private target URLs, API keys, MCP client configuration,
|
|
15
|
+
tool traces, or customer data.
|
|
16
|
+
|
|
17
|
+
Report security issues by emailing `dev@capsolver.ai` with:
|
|
18
|
+
|
|
19
|
+
- The affected package and version.
|
|
20
|
+
- A concise description of the issue.
|
|
21
|
+
- Reproduction steps or a minimal proof of concept.
|
|
22
|
+
- The impact you believe the issue has.
|
|
23
|
+
|
|
24
|
+
We will acknowledge valid reports as soon as possible and coordinate a fix or
|
|
25
|
+
mitigation before public disclosure.
|
|
26
|
+
|
|
27
|
+
## Handling API Keys and MCP Configuration
|
|
28
|
+
|
|
29
|
+
Never commit real `CAPSOLVER_API_KEY` values, MCP client configs containing
|
|
30
|
+
secrets, browser profiles, cookies, or captured tokens. Documentation examples
|
|
31
|
+
must use placeholder values only.
|
|
32
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Support
|
|
2
|
+
|
|
3
|
+
Use the right channel for the type of help you need.
|
|
4
|
+
|
|
5
|
+
## Package Bugs and Documentation
|
|
6
|
+
|
|
7
|
+
Open a GitHub issue for:
|
|
8
|
+
|
|
9
|
+
- Installation problems.
|
|
10
|
+
- Runtime errors in this package.
|
|
11
|
+
- Documentation mistakes.
|
|
12
|
+
- Compatibility issues with supported Python versions, MCP clients, or optional
|
|
13
|
+
browser tooling.
|
|
14
|
+
|
|
15
|
+
Include the package version, Python version, operating system, MCP client name
|
|
16
|
+
and version, transport mode, and a minimal reproduction when possible.
|
|
17
|
+
|
|
18
|
+
## CapSolver Account or API Service Issues
|
|
19
|
+
|
|
20
|
+
For account access, billing, API key, balance, or service availability issues,
|
|
21
|
+
use the support options available from `https://capsolver.com`.
|
|
22
|
+
|
|
23
|
+
Do not post API keys, account identifiers, cookies, browser profiles, MCP client
|
|
24
|
+
configuration with secrets, or target site credentials in public issues.
|
|
25
|
+
|