regintel-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.
@@ -0,0 +1,49 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ *.egg-info/
20
+ .installed.cfg
21
+ *.egg
22
+ MANIFEST
23
+
24
+ # Virtual environments
25
+ .venv/
26
+ .buildvenv/
27
+ venv/
28
+ env/
29
+ ENV/
30
+
31
+ # IDE
32
+ .vscode/
33
+ .idea/
34
+ *.swp
35
+ *.swo
36
+
37
+ # OS
38
+ .DS_Store
39
+ Thumbs.db
40
+
41
+ # Secrets
42
+ .env
43
+ .env.local
44
+ .pypirc
45
+
46
+ # Test
47
+ .pytest_cache/
48
+ .coverage
49
+ htmlcov/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 RegIntel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,80 @@
1
+ Metadata-Version: 2.4
2
+ Name: regintel-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for the RegIntel API — structured regulatory data across 41 jurisdictions and 212 regulations
5
+ Project-URL: Homepage, https://regintelapi.com/
6
+ Project-URL: Documentation, https://regintelapi.com/docs.html
7
+ Project-URL: Repository, https://github.com/ad0750/regintel-mcp
8
+ Project-URL: Issues, https://github.com/ad0750/regintel-mcp/issues
9
+ Author-email: RegIntel <support@regintelapi.com>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: aml,compliance,fintech,gdpr,kyc,mcp,model-context-protocol,regtech,regulatory
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: httpx>=0.27.0
21
+ Requires-Dist: mcp[cli]>=1.2.0
22
+ Description-Content-Type: text/markdown
23
+
24
+ # regintel-mcp
25
+
26
+ MCP server for the [RegIntel API](https://regintelapi.com/) — structured regulatory data across 41 jurisdictions and 212 regulations, accessible to any MCP-compatible LLM client (Claude Desktop, Claude Code, etc.).
27
+
28
+ ## Tools
29
+
30
+ | Tool | Description |
31
+ | --- | --- |
32
+ | `list_jurisdictions` | All 41 supported jurisdictions with codes and regulation counts. Does not consume credits. |
33
+ | `search_regulations` | Filter the catalog by jurisdiction, tag, keyword, category. Paginated. |
34
+ | `get_regulation` | Full record (obligations, penalties, scope, source URL) for one regulation by ID. |
35
+ | `get_recent_updates` | Regulations added or modified since a date. Useful for keeping vector stores in sync. |
36
+ | `check_compliance` | Decision signal (allowed / requires_license / restricted / prohibited) for an activity in a country. |
37
+
38
+ ## Install
39
+
40
+ ```bash
41
+ pip install regintel-mcp
42
+ ```
43
+
44
+ ## Get an API key
45
+
46
+ Free tier includes 100 credits with no expiry and no credit card: https://regintelapi.com/get-key.html
47
+
48
+ ## Configure with Claude Desktop
49
+
50
+ Add to `claude_desktop_config.json`:
51
+
52
+ ```json
53
+ {
54
+ "mcpServers": {
55
+ "regintel": {
56
+ "command": "regintel-mcp",
57
+ "env": {
58
+ "REGINTEL_API_KEY": "your-api-key-here"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ Restart Claude Desktop. The five tools above should appear under the regintel server.
66
+
67
+ ## Configure with Claude Code
68
+
69
+ ```bash
70
+ claude mcp add regintel -e REGINTEL_API_KEY=your-api-key-here -- regintel-mcp
71
+ ```
72
+
73
+ ## Environment variables
74
+
75
+ - `REGINTEL_API_KEY` *(required)* — your API key. Without it, every tool call returns an actionable error message.
76
+ - `REGINTEL_API_BASE` *(optional)* — override the API base URL. Defaults to `https://api.regintelapi.com`.
77
+
78
+ ## License
79
+
80
+ MIT
@@ -0,0 +1,57 @@
1
+ # regintel-mcp
2
+
3
+ MCP server for the [RegIntel API](https://regintelapi.com/) — structured regulatory data across 41 jurisdictions and 212 regulations, accessible to any MCP-compatible LLM client (Claude Desktop, Claude Code, etc.).
4
+
5
+ ## Tools
6
+
7
+ | Tool | Description |
8
+ | --- | --- |
9
+ | `list_jurisdictions` | All 41 supported jurisdictions with codes and regulation counts. Does not consume credits. |
10
+ | `search_regulations` | Filter the catalog by jurisdiction, tag, keyword, category. Paginated. |
11
+ | `get_regulation` | Full record (obligations, penalties, scope, source URL) for one regulation by ID. |
12
+ | `get_recent_updates` | Regulations added or modified since a date. Useful for keeping vector stores in sync. |
13
+ | `check_compliance` | Decision signal (allowed / requires_license / restricted / prohibited) for an activity in a country. |
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pip install regintel-mcp
19
+ ```
20
+
21
+ ## Get an API key
22
+
23
+ Free tier includes 100 credits with no expiry and no credit card: https://regintelapi.com/get-key.html
24
+
25
+ ## Configure with Claude Desktop
26
+
27
+ Add to `claude_desktop_config.json`:
28
+
29
+ ```json
30
+ {
31
+ "mcpServers": {
32
+ "regintel": {
33
+ "command": "regintel-mcp",
34
+ "env": {
35
+ "REGINTEL_API_KEY": "your-api-key-here"
36
+ }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ Restart Claude Desktop. The five tools above should appear under the regintel server.
43
+
44
+ ## Configure with Claude Code
45
+
46
+ ```bash
47
+ claude mcp add regintel -e REGINTEL_API_KEY=your-api-key-here -- regintel-mcp
48
+ ```
49
+
50
+ ## Environment variables
51
+
52
+ - `REGINTEL_API_KEY` *(required)* — your API key. Without it, every tool call returns an actionable error message.
53
+ - `REGINTEL_API_BASE` *(optional)* — override the API base URL. Defaults to `https://api.regintelapi.com`.
54
+
55
+ ## License
56
+
57
+ MIT
@@ -0,0 +1,45 @@
1
+ [project]
2
+ name = "regintel-mcp"
3
+ version = "0.1.0"
4
+ description = "MCP server for the RegIntel API — structured regulatory data across 41 jurisdictions and 212 regulations"
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = { text = "MIT" }
8
+ authors = [{ name = "RegIntel", email = "support@regintelapi.com" }]
9
+ keywords = ["mcp", "model-context-protocol", "regulatory", "compliance", "regtech", "fintech", "gdpr", "kyc", "aml"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "License :: OSI Approved :: MIT License",
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.10",
15
+ "Programming Language :: Python :: 3.11",
16
+ "Programming Language :: Python :: 3.12",
17
+ ]
18
+ dependencies = [
19
+ "mcp[cli]>=1.2.0",
20
+ "httpx>=0.27.0",
21
+ ]
22
+
23
+ [project.urls]
24
+ Homepage = "https://regintelapi.com/"
25
+ Documentation = "https://regintelapi.com/docs.html"
26
+ Repository = "https://github.com/ad0750/regintel-mcp"
27
+ Issues = "https://github.com/ad0750/regintel-mcp/issues"
28
+
29
+ [project.scripts]
30
+ regintel-mcp = "regintel_mcp.server:main"
31
+
32
+ [build-system]
33
+ requires = ["hatchling"]
34
+ build-backend = "hatchling.build"
35
+
36
+ [tool.hatch.build.targets.wheel]
37
+ packages = ["src/regintel_mcp"]
38
+
39
+ [tool.hatch.build.targets.sdist]
40
+ include = [
41
+ "/src",
42
+ "/README.md",
43
+ "/LICENSE",
44
+ "/pyproject.toml",
45
+ ]
@@ -0,0 +1,3 @@
1
+ """MCP server for the RegIntel API."""
2
+
3
+ __version__ = "0.1.0"
@@ -0,0 +1,175 @@
1
+ """RegIntel MCP server — exposes the RegIntel REST API as MCP tools."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import sys
7
+ from typing import Any
8
+
9
+ import httpx
10
+ from mcp.server.fastmcp import FastMCP
11
+
12
+ API_BASE = os.environ.get("REGINTEL_API_BASE", "https://api.regintelapi.com")
13
+ API_KEY = os.environ.get("REGINTEL_API_KEY", "")
14
+ USER_AGENT = "regintel-mcp/0.1.0"
15
+ TIMEOUT_SECONDS = 30.0
16
+
17
+ mcp = FastMCP("regintel")
18
+
19
+
20
+ async def _request(path: str, params: dict[str, Any] | None = None) -> str:
21
+ """GET helper that returns a string ready to hand back to the LLM.
22
+
23
+ Errors are returned as plain-text messages rather than raised so the LLM
24
+ sees an actionable explanation instead of a stack trace.
25
+ """
26
+ if not API_KEY:
27
+ return (
28
+ "Error: REGINTEL_API_KEY environment variable is not set. "
29
+ "Get a free API key at https://regintelapi.com/get-key.html and set "
30
+ "REGINTEL_API_KEY in your MCP client configuration."
31
+ )
32
+
33
+ url = f"{API_BASE}{path}"
34
+ headers = {"x-api-key": API_KEY, "User-Agent": USER_AGENT, "Accept": "application/json"}
35
+ cleaned = {k: v for k, v in (params or {}).items() if v is not None and v != ""}
36
+
37
+ try:
38
+ async with httpx.AsyncClient(timeout=TIMEOUT_SECONDS) as client:
39
+ response = await client.get(url, headers=headers, params=cleaned)
40
+ except httpx.TimeoutException:
41
+ return f"Error: request to {path} timed out after {TIMEOUT_SECONDS}s."
42
+ except httpx.HTTPError as exc:
43
+ return f"Error: network failure calling {path}: {exc}"
44
+
45
+ if response.status_code == 200:
46
+ return response.text
47
+
48
+ try:
49
+ body = response.json()
50
+ message = body.get("message") or body.get("error") or response.text
51
+ except Exception:
52
+ message = response.text
53
+
54
+ if response.status_code == 401:
55
+ return f"Error 401 (unauthorized): {message}. Check that REGINTEL_API_KEY is correct."
56
+ if response.status_code == 403:
57
+ return (
58
+ f"Error 403 (forbidden): {message}. You may be out of credits — "
59
+ "check https://regintelapi.com/dashboard.html or top up at /pricing.html."
60
+ )
61
+ if response.status_code == 404:
62
+ return f"Error 404 (not found): {message}"
63
+ if response.status_code == 429:
64
+ retry_after = response.headers.get("Retry-After", "unknown")
65
+ return f"Error 429 (rate limited): retry after {retry_after}s."
66
+ return f"Error {response.status_code}: {message}"
67
+
68
+
69
+ @mcp.tool()
70
+ async def list_jurisdictions() -> str:
71
+ """List all regulatory jurisdictions supported by RegIntel, with their codes and regulation counts.
72
+
73
+ Use this to discover the universe of supported regions (currently 41) and the canonical
74
+ jurisdiction codes you can pass to other tools like search_regulations or check_compliance.
75
+ This endpoint does not consume API credits.
76
+ """
77
+ return await _request("/jurisdictions")
78
+
79
+
80
+ @mcp.tool()
81
+ async def search_regulations(
82
+ jurisdiction: str | None = None,
83
+ tag: str | None = None,
84
+ q: str | None = None,
85
+ category: str | None = None,
86
+ limit: int | None = None,
87
+ page: int | None = None,
88
+ ) -> str:
89
+ """Search the regulation catalog. Returns a paginated list of regulations matching the filters.
90
+
91
+ Each result includes title, jurisdiction, category, tags, and a summary. To get the full
92
+ obligations/penalties/scope for a specific regulation, follow up with get_regulation(id).
93
+
94
+ Args:
95
+ jurisdiction: ISO-style jurisdiction code, e.g. "EU", "US", "AU", "SG", "UK". Optional.
96
+ tag: Tag filter, e.g. "GDPR", "KYC", "AML", "crypto". Optional.
97
+ q: Free-text keyword search across regulation title and body. Optional.
98
+ category: Category filter (e.g. "data_protection", "payments"). Optional.
99
+ limit: Number of results per page. Optional.
100
+ page: Page number for pagination. Optional.
101
+ """
102
+ params = {
103
+ "jurisdiction": jurisdiction,
104
+ "tag": tag,
105
+ "q": q,
106
+ "category": category,
107
+ "limit": limit,
108
+ "page": page,
109
+ }
110
+ return await _request("/regulations", params=params)
111
+
112
+
113
+ @mcp.tool()
114
+ async def get_regulation(regulation_id: str) -> str:
115
+ """Get the full record for a single regulation by its unique ID.
116
+
117
+ Returns the complete regulation document: title, jurisdiction, obligations, penalties,
118
+ scope, tags, source URL, key articles, and timestamps. Use search_regulations first to
119
+ discover IDs.
120
+
121
+ Args:
122
+ regulation_id: Regulation ID, e.g. "gdpr-2018". Required.
123
+ """
124
+ if not regulation_id:
125
+ return "Error: regulation_id is required."
126
+ return await _request(f"/regulations/{regulation_id}")
127
+
128
+
129
+ @mcp.tool()
130
+ async def get_recent_updates(
131
+ since: str | None = None,
132
+ jurisdiction: str | None = None,
133
+ ) -> str:
134
+ """List regulations added or modified recently. Use this to keep a downstream cache or
135
+ vector store in sync — only re-process what changed.
136
+
137
+ Args:
138
+ since: ISO date (YYYY-MM-DD) lower bound for the modification timestamp, e.g. "2026-01-01".
139
+ If omitted, the API returns the default recent window.
140
+ jurisdiction: Optional jurisdiction code to scope the query, e.g. "EU".
141
+ """
142
+ return await _request("/updates", params={"since": since, "jurisdiction": jurisdiction})
143
+
144
+
145
+ @mcp.tool()
146
+ async def check_compliance(country: str, activity: str) -> str:
147
+ """Check the regulatory status of an activity in a country. Returns a decision signal —
148
+ one of `allowed`, `requires_license`, `restricted`, `prohibited`, or `unknown` — along
149
+ with risk level, penalties, obligations, and the source regulations behind the decision.
150
+
151
+ NOT LEGAL ADVICE. This endpoint provides regulatory intelligence derived from structured
152
+ data; always consult a qualified legal professional before acting on it.
153
+
154
+ Args:
155
+ country: Country code or name, e.g. "AU", "US", "EU", "SG", "UK". Required.
156
+ activity: One of "crypto", "finance", "banking", "payments", "lending", "privacy",
157
+ "data_protection", "aml", "kyc". Required.
158
+ """
159
+ if not country or not activity:
160
+ return "Error: both 'country' and 'activity' are required."
161
+ return await _request("/compliance-check", params={"country": country, "activity": activity})
162
+
163
+
164
+ def main() -> None:
165
+ print(f"regintel-mcp starting (API base: {API_BASE})", file=sys.stderr)
166
+ if not API_KEY:
167
+ print(
168
+ "Warning: REGINTEL_API_KEY is not set; tool calls will return an error until it is.",
169
+ file=sys.stderr,
170
+ )
171
+ mcp.run(transport="stdio")
172
+
173
+
174
+ if __name__ == "__main__":
175
+ main()