hasdata-chatgpt-mcp 1.0.0__py3-none-any.whl

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,28 @@
1
+ """Thin launcher for HasData's hosted ChatGPT MCP server.
2
+
3
+ Connects an MCP client to the remote streamable-HTTP endpoint through mcp-proxy.
4
+ The server runs on HasData's infrastructure. This package only proxies stdio to it.
5
+ """
6
+ import os
7
+ import sys
8
+ import subprocess
9
+
10
+ URL = "https://mcp.hasdata.com/mcp?apis=chatgpt"
11
+
12
+
13
+ def main() -> None:
14
+ key = os.environ.get("HASDATA_API_KEY")
15
+ if not key:
16
+ sys.stderr.write(
17
+ "HASDATA_API_KEY is not set. Create a free key at https://app.hasdata.com "
18
+ "and set HASDATA_API_KEY.\n"
19
+ )
20
+ raise SystemExit(1)
21
+ args = [
22
+ sys.executable, "-m", "mcp_proxy", URL,
23
+ "--transport=streamablehttp",
24
+ "--headers", "x-api-key", key,
25
+ ]
26
+ rc = subprocess.call(args)
27
+ # subprocess returns -N when mcp_proxy is killed by signal N; map to 128+N.
28
+ raise SystemExit(rc if rc >= 0 else 128 - rc)
@@ -0,0 +1,267 @@
1
+ Metadata-Version: 2.5
2
+ Name: hasdata-chatgpt-mcp
3
+ Version: 1.0.0
4
+ Summary: MCP server for the ChatGPT Scraper API through HasData's hosted API. No OpenAI account.
5
+ Project-URL: Homepage, https://hasdata.com/apis/chatgpt-api
6
+ Project-URL: Repository, https://github.com/HasData/chatgpt-mcp
7
+ License: MIT
8
+ License-File: LICENSE
9
+ Keywords: ai-search,chatgpt,chatgpt-api,hasdata,llm,mcp,model-context-protocol
10
+ Requires-Python: >=3.10
11
+ Requires-Dist: mcp-proxy>=0.12.0
12
+ Requires-Dist: mcp<2,>=1.28.1
13
+ Description-Content-Type: text/markdown
14
+
15
+ # ChatGPT MCP Server
16
+
17
+ <!-- mcp-name: com.hasdata/chatgpt -->
18
+
19
+ A hosted Model Context Protocol (MCP) server that gives Claude, Cursor, Windsurf and any other MCP client one ChatGPT tool. Send a prompt anonymously and get the answer back as markdown together with the web pages ChatGPT consulted, as structured JSON, with no OpenAI account and no API key of your own.
20
+
21
+ **1,000 free credits every month, no card required**, which is 100 prompts.
22
+
23
+ ```
24
+ https://mcp.hasdata.com/mcp?apis=chatgpt
25
+ ```
26
+
27
+ [![Glama score](https://glama.ai/mcp/servers/HasData/chatgpt-mcp/badges/score.svg)](https://glama.ai/mcp/servers/HasData/chatgpt-mcp)
28
+ [![tool contract](https://github.com/HasData/chatgpt-mcp/actions/workflows/contract.yml/badge.svg)](https://github.com/HasData/chatgpt-mcp/actions/workflows/contract.yml)
29
+ [![MCP](https://img.shields.io/badge/MCP-remote%20%7C%20streamable%20HTTP-6366f1?style=flat-square)](https://modelcontextprotocol.io)
30
+ [![Tools](https://img.shields.io/badge/tools-1-10b981?style=flat-square)](#tools)
31
+ [![npm](https://img.shields.io/npm/v/@hasdata/chatgpt-mcp?style=flat-square&logo=npm&label=npm&color=cb3837)](https://www.npmjs.com/package/@hasdata/chatgpt-mcp)
32
+ [![PyPI](https://img.shields.io/pypi/v/hasdata-chatgpt-mcp?style=flat-square&logo=pypi&logoColor=white&label=PyPI&color=3775a9)](https://pypi.org/project/hasdata-chatgpt-mcp/)
33
+ [![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE)
34
+
35
+ ## Contents
36
+
37
+ - [What you need](#what-you-need)
38
+ - [Quick start](#quick-start)
39
+ - [Example prompts](#example-prompts)
40
+ - [Tools](#tools)
41
+ - [Errors and failure paths](#errors-and-failure-paths)
42
+ - [Pricing, free tier and limits](#pricing-free-tier-and-limits)
43
+ - [How it compares](#how-it-compares)
44
+ - [FAQ](#faq)
45
+ - [HasData links](#hasdata-links)
46
+ - [Development](#development)
47
+ - [Contributing](#contributing)
48
+ - [License](#license)
49
+
50
+ ## What you need
51
+
52
+ An MCP client and a HasData API key from the [dashboard](https://app.hasdata.com/sign-up?utm_source=github&utm_medium=syndication&utm_campaign=chatgpt-mcp), free to create with no card, and the free tier covers 100 calls a month at the 10-credit rate. This is a remote server, so the simplest path is a URL and an `x-api-key` header, with no container to run and no OpenAI billing anywhere in the flow. A client that only speaks stdio reaches it through a thin launcher, published as `@hasdata/chatgpt-mcp` on npm and `hasdata-chatgpt-mcp` on PyPI, shown below.
53
+
54
+ ## Quick start
55
+
56
+ The server URL is the same for every client. We run it hands-on in Claude Code and Claude Desktop. The other blocks follow each client's own documented format for a remote server.
57
+
58
+ | Field | Value |
59
+ | :--- | :--- |
60
+ | URL | `https://mcp.hasdata.com/mcp?apis=chatgpt` |
61
+ | Transport | HTTP, streamable |
62
+ | Auth header | `x-api-key: HASDATA_API_KEY` |
63
+
64
+ Clients with OAuth support can add the same URL as a connector and sign in without putting a key in a config file.
65
+
66
+ <details>
67
+ <summary><b>Claude Code</b></summary>
68
+
69
+ ```bash
70
+ claude mcp add --transport http chatgpt "https://mcp.hasdata.com/mcp?apis=chatgpt" \
71
+ --header "x-api-key: HASDATA_API_KEY"
72
+ ```
73
+
74
+ </details>
75
+
76
+ <details>
77
+ <summary><b>Claude Desktop</b></summary>
78
+
79
+ ```json
80
+ {
81
+ "mcpServers": {
82
+ "chatgpt": {
83
+ "type": "http",
84
+ "url": "https://mcp.hasdata.com/mcp?apis=chatgpt",
85
+ "headers": { "x-api-key": "HASDATA_API_KEY" }
86
+ }
87
+ }
88
+ }
89
+ ```
90
+
91
+ </details>
92
+
93
+ <details>
94
+ <summary><b>Cursor</b></summary>
95
+
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "chatgpt": {
100
+ "type": "streamable-http",
101
+ "url": "https://mcp.hasdata.com/mcp?apis=chatgpt",
102
+ "headers": { "x-api-key": "HASDATA_API_KEY" }
103
+ }
104
+ }
105
+ }
106
+ ```
107
+
108
+ </details>
109
+
110
+ <details>
111
+ <summary><b>VS Code</b></summary>
112
+
113
+ ```json
114
+ {
115
+ "servers": {
116
+ "chatgpt": {
117
+ "type": "http",
118
+ "url": "https://mcp.hasdata.com/mcp?apis=chatgpt",
119
+ "headers": { "x-api-key": "HASDATA_API_KEY" }
120
+ }
121
+ }
122
+ }
123
+ ```
124
+
125
+ </details>
126
+
127
+ ## Example prompts
128
+
129
+ Prompts, not code. Paste one in and the agent picks the tool itself. Each is annotated with the calls it takes, because every successful call costs 10 credits.
130
+
131
+ > Ask ChatGPT what the current state of the Artemis program is, and list the sources it used.
132
+
133
+ *One call, 10 credits. The answer and the sources come back together.*
134
+
135
+ > Ask ChatGPT the same question in German.
136
+
137
+ *One call, 10 credits. The answer follows the language of the prompt, so write the prompt in the language you want back.*
138
+
139
+ > Ask ChatGPT what happened in AI this week, with Berlin as the current date.
140
+
141
+ *One call, 10 credits. `timezone` is what fixes the meaning of "this week".*
142
+
143
+ > Put the same question to ChatGPT three times and show where the answers differ.
144
+
145
+ *Three calls, 30 credits. Each request is a fresh conversation, so there is no carry-over between them.*
146
+
147
+ ## Tools
148
+
149
+ | Tool | What it returns |
150
+ | --- | --- |
151
+ | `hasdata_chatgpt_chat_getChatgptAnswer` | The answer as markdown, the web sources ChatGPT consulted with their domain and title, the conversation title it generated, the model that answered, and whether a web search was used. 10 credits a call |
152
+
153
+ One tool, 10 credits per successful call.
154
+
155
+ ### Ask ChatGPT
156
+
157
+ [`hasdata_chatgpt_chat_getChatgptAnswer`](https://docs.hasdata.com/apis/chatgpt/chat?utm_source=github&utm_medium=syndication&utm_campaign=chatgpt-mcp)
158
+
159
+ | Parameter | Type | Required | Notes |
160
+ | :--- | :--- | :--- | :--- |
161
+ | `prompt` | string | yes | The question or instruction, up to 8000 characters |
162
+ | `timezone` | string | | IANA zone name such as `Europe/Berlin`. It sets what ChatGPT treats as today |
163
+
164
+ Everything lands under `conversation`. The answer is in `answer` as markdown, with `title` holding the name ChatGPT generated for the thread, `model` the model that answered, and `usedWebSearch` saying whether it went to the web at all. `finishReason` and `complete` tell a truncated answer from a finished one.
165
+
166
+ ```json
167
+ {
168
+ "conversation": {
169
+ "answer": "As of **October 5, 2026**, NASA's Artemis program has made substantial progress…",
170
+ "title": "Artemis developments cited",
171
+ "model": "gpt-5-6",
172
+ "usedWebSearch": true,
173
+ "finishReason": "stop",
174
+ "complete": true,
175
+ "sources": [
176
+ { "title": "Artemis News - NASA", "url": "https://www.nasa.gov/artemis-news/", "domain": "www.nasa.gov" }
177
+ ]
178
+ }
179
+ }
180
+ ```
181
+
182
+ ## Errors and failure paths
183
+
184
+ Your client almost never sees an HTTP error code from a tool call. The MCP layer answers 200 and puts the failure inside the result, with `isError` set to `true` and the reason as text.
185
+
186
+ **`sources` is uneven, and partly absent.** In a measured answer carrying twenty sources, every one had `title`, `url` and `domain`, eleven had `publishedDate` and only five had `snippet`. Read each field defensively rather than assuming the shape of the first element holds for the rest.
187
+
188
+ **No web search means no sources.** `usedWebSearch` is false when ChatGPT answers from the model alone, and `sources` is then empty or missing. A prompt about a stable fact often takes that path, so ask for current information when citations are the point.
189
+
190
+ **Every call is a fresh conversation.** There is no memory between requests, so a follow-up has to carry its own context in the prompt. `conversationId` identifies the thread that answered, not a thread you can continue.
191
+
192
+ **A truncated answer still succeeds.** Check `complete` and `finishReason` before treating `answer` as the whole response.
193
+
194
+ Each successful call spends credits from the connected account. A call that fails validation is not billed.
195
+
196
+ ## Pricing, free tier and limits
197
+
198
+ The ChatGPT tool costs **10 credits per successful call**. Answer length does not change the price.
199
+
200
+ The free tier is **1,000 credits every month with no card**, which is 100 prompts.
201
+
202
+ Paid plans start at **$59 a month** for 200,000 credits, which is 20,000 calls. The unit price falls on larger plans. Current numbers are on the [plans page](https://hasdata.com/prices?utm_source=github&utm_medium=syndication&utm_campaign=chatgpt-mcp).
203
+
204
+ ## How it compares
205
+
206
+ | | OpenAI API | This server |
207
+ | :--- | :--- | :--- |
208
+ | Account | Your own OpenAI account and billing | One HasData key |
209
+ | What you get | The model's answer | The answer plus the web sources behind it |
210
+ | Web search | A separate tool you wire up | Included, with `usedWebSearch` reporting whether it ran |
211
+ | Output | Your own schema | Parsed JSON with the sources already split out |
212
+
213
+ The two are not substitutes. The OpenAI API is the right call when you need system prompts, tools, streaming and conversation state. This server is the right call when you want what ChatGPT publicly answers, with its citations, and no account of your own.
214
+
215
+ ## FAQ
216
+
217
+ ### Do I need an OpenAI account or an API key?
218
+
219
+ No. The server answers anonymously through HasData, and the only credential involved is your HasData key.
220
+
221
+ ### Which model answers?
222
+
223
+ Whichever ChatGPT serves anonymously at the time. The response reports it in `model`, so read it rather than assuming. A measured call returned `gpt-5-6`.
224
+
225
+ ### Can I continue a conversation?
226
+
227
+ No. Each request is a fresh thread with no memory of earlier ones. Carry the context in the prompt instead.
228
+
229
+ ### What language will the answer be in?
230
+
231
+ The language of the prompt. Ask in German and the answer comes back in German, or ask explicitly for a language in the prompt.
232
+
233
+ ### Is HasData affiliated with OpenAI?
234
+
235
+ No. HasData is an independent web data provider and is not affiliated with, endorsed by or sponsored by OpenAI. All trademarks belong to their owners.
236
+
237
+ ### Compliance and personal data
238
+
239
+ The server reads what ChatGPT answers publicly to an anonymous visitor. It does not log in, and it does not reach private conversations or account data.
240
+
241
+ ## HasData links
242
+
243
+ | | |
244
+ | :--- | :--- |
245
+ | Product page and request builder | [ChatGPT Scraper API](https://hasdata.com/apis/chatgpt-api?utm_source=github&utm_medium=syndication&utm_campaign=chatgpt-mcp) |
246
+ | Endpoint documentation | [ChatGPT Scraper API docs](https://docs.hasdata.com/apis/chatgpt/chat?utm_source=github&utm_medium=syndication&utm_campaign=chatgpt-mcp) |
247
+ | Server documentation | [MCP server docs](https://docs.hasdata.com/mcp-server?utm_source=github&utm_medium=syndication&utm_campaign=chatgpt-mcp) |
248
+ | Every tool in one server | [HasData/hasdata-mcp](https://github.com/HasData/hasdata-mcp) |
249
+ | Client walkthroughs | [MCP clients and integrations](https://hasdata.com/integrations/mcp?utm_source=github&utm_medium=syndication&utm_campaign=chatgpt-mcp) |
250
+ | Plans and credit costs | [Plans and credit costs](https://hasdata.com/prices?utm_source=github&utm_medium=syndication&utm_campaign=chatgpt-mcp) |
251
+
252
+ ## Development
253
+
254
+ ```bash
255
+ npm install
256
+ npm test
257
+ ```
258
+
259
+ The tests in `test/` assert the tool contract, the part that can break without a commit here. They check that `?apis=chatgpt` returns the one expected tool, that its name and required parameter have not changed, that it carries a description, and that a real call still puts the answer under `conversation`.
260
+
261
+ ## Contributing
262
+
263
+ The parameter table and the sample above were read from the live schema and from real calls rather than from documentation. A correction is welcome when a field or a failure mode has changed. Open an issue with the response you saw.
264
+
265
+ ## License
266
+
267
+ MIT
@@ -0,0 +1,6 @@
1
+ hasdata_chatgpt_mcp/__init__.py,sha256=l9Wgbn9jOREW7OgzQ3xgBiUQvDjwPNtrelnCl_kkUf4,897
2
+ hasdata_chatgpt_mcp-1.0.0.dist-info/METADATA,sha256=y9mbyyGKGzfV7-DFHWD1HGfEdXUZ4xvKpxzBwKLFZPw,11724
3
+ hasdata_chatgpt_mcp-1.0.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
4
+ hasdata_chatgpt_mcp-1.0.0.dist-info/entry_points.txt,sha256=AHMm7dv68W87ht0AUqksvtHbuf5kay5n-x6-ROx-VyA,65
5
+ hasdata_chatgpt_mcp-1.0.0.dist-info/licenses/LICENSE,sha256=wqL-GOnwOXaNiCI77foQPeGbQVP72tJgBHa2vNPMJBo,1064
6
+ hasdata_chatgpt_mcp-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.32.4
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ hasdata-chatgpt-mcp = hasdata_chatgpt_mcp:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 HasData
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.