flopsindex-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,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: flopsindex-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for the FLOPS Compute Intelligence Platform — gives Claude / Cursor / Windsurf agents direct access to GPU compute price indices, methodology, and per-index verification.
5
+ Author-email: Ash Chary <ash@flopsindex.com>
6
+ License: Proprietary
7
+ Keywords: mcp,flops,gpu,compute,pricing,claude,agents
8
+ Requires-Python: >=3.11
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: mcp>=1.0.0
11
+ Requires-Dist: httpx>=0.26.0
12
+ Provides-Extra: dev
13
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
14
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
15
+
16
+ # flopsindex-mcp
17
+
18
+ Model Context Protocol server for the **FLOPS Compute Intelligence Platform**.
19
+
20
+ Gives AI agents (Claude Code, Cursor, Windsurf, ChatGPT desktop, any MCP host) direct access to live FLOPS GPU-compute price indices with verifiable provenance.
21
+
22
+ ## Tools
23
+
24
+ | Tool | Description |
25
+ |---|---|
26
+ | `list_indices` | Enumerate all public FLOPS indices. Optional `family_filter` substring (e.g. `FLOPS-H100`). |
27
+ | `verify` | Fetch the latest published value + audit receipt for a given `index_id`. |
28
+
29
+ More tools (`get_methodology`, `get_forward_curve`, `get_settlement`) are tracked in the FLOPS Track D roadmap.
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ uv tool install flopsindex-mcp
35
+ # or
36
+ pip install flopsindex-mcp
37
+ ```
38
+
39
+ ## Wire into Claude Code
40
+
41
+ ```bash
42
+ claude mcp add flopsindex -- flopsindex-mcp
43
+ ```
44
+
45
+ ## Wire into Cursor / Windsurf
46
+
47
+ Add to your MCP config (`~/.cursor/mcp.json` or equivalent):
48
+
49
+ ```json
50
+ {
51
+ "mcpServers": {
52
+ "flopsindex": {
53
+ "command": "flopsindex-mcp"
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ ## Environment
60
+
61
+ | Var | Default | Purpose |
62
+ |---|---|---|
63
+ | `FLOPS_API_URL` | `https://app.flopsindex.com` | Override for staging / self-host |
64
+
65
+ ## Example agent prompts
66
+
67
+ > "Use the flopsindex MCP server to list all H100 on-demand indices and report their latest values."
68
+
69
+ > "Verify FLOPS-B300-OD-T1 and cite the receipt."
70
+
71
+ ## Status
72
+
73
+ **v0.1.0** — MVP. Scaffolded 2026-05-12. Not yet published to PyPI / smithery.ai / glama.ai.
74
+
75
+ ## License
76
+
77
+ Proprietary. © 2026 FLOPS Index.
@@ -0,0 +1,62 @@
1
+ # flopsindex-mcp
2
+
3
+ Model Context Protocol server for the **FLOPS Compute Intelligence Platform**.
4
+
5
+ Gives AI agents (Claude Code, Cursor, Windsurf, ChatGPT desktop, any MCP host) direct access to live FLOPS GPU-compute price indices with verifiable provenance.
6
+
7
+ ## Tools
8
+
9
+ | Tool | Description |
10
+ |---|---|
11
+ | `list_indices` | Enumerate all public FLOPS indices. Optional `family_filter` substring (e.g. `FLOPS-H100`). |
12
+ | `verify` | Fetch the latest published value + audit receipt for a given `index_id`. |
13
+
14
+ More tools (`get_methodology`, `get_forward_curve`, `get_settlement`) are tracked in the FLOPS Track D roadmap.
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ uv tool install flopsindex-mcp
20
+ # or
21
+ pip install flopsindex-mcp
22
+ ```
23
+
24
+ ## Wire into Claude Code
25
+
26
+ ```bash
27
+ claude mcp add flopsindex -- flopsindex-mcp
28
+ ```
29
+
30
+ ## Wire into Cursor / Windsurf
31
+
32
+ Add to your MCP config (`~/.cursor/mcp.json` or equivalent):
33
+
34
+ ```json
35
+ {
36
+ "mcpServers": {
37
+ "flopsindex": {
38
+ "command": "flopsindex-mcp"
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ ## Environment
45
+
46
+ | Var | Default | Purpose |
47
+ |---|---|---|
48
+ | `FLOPS_API_URL` | `https://app.flopsindex.com` | Override for staging / self-host |
49
+
50
+ ## Example agent prompts
51
+
52
+ > "Use the flopsindex MCP server to list all H100 on-demand indices and report their latest values."
53
+
54
+ > "Verify FLOPS-B300-OD-T1 and cite the receipt."
55
+
56
+ ## Status
57
+
58
+ **v0.1.0** — MVP. Scaffolded 2026-05-12. Not yet published to PyPI / smithery.ai / glama.ai.
59
+
60
+ ## License
61
+
62
+ Proprietary. © 2026 FLOPS Index.
@@ -0,0 +1,10 @@
1
+ """FLOPS Compute Intelligence Platform — MCP server.
2
+
3
+ Exposes the public FLOPS index catalog + verification endpoints as
4
+ Model Context Protocol tools so AI agents (Claude Code, Cursor,
5
+ Windsurf, etc.) can cite live FLOPS indices directly during sessions.
6
+
7
+ Per Track D LLM-discoverability plan: one ship = FLOPS inside every
8
+ Claude / Cursor / Windsurf session that installs this server.
9
+ """
10
+ __version__ = "0.1.0"
@@ -0,0 +1,171 @@
1
+ """FLOPS MCP server.
2
+
3
+ Tools (MVP):
4
+ list_indices — Enumerate all public FLOPS indices (id, family, cadence)
5
+ get_index — Fetch a single index's current value + methodology pointer
6
+ verify — Cryptographic / receipt verification for a published value
7
+ get_catalog — Full reference catalog (paginated)
8
+
9
+ Backed by the dashboard's auth-free endpoints:
10
+ GET /v2/catalog/public
11
+ GET /v1/verify?index_id=...
12
+ GET /demo/all-indices (requires basic auth; not exposed via MCP yet)
13
+
14
+ Run locally:
15
+ uv tool install flopsindex-mcp
16
+ flopsindex-mcp
17
+
18
+ Or wire into Claude Code:
19
+ claude mcp add flopsindex -- flopsindex-mcp
20
+ """
21
+ from __future__ import annotations
22
+
23
+ import json
24
+ import os
25
+ from typing import Any
26
+
27
+ import httpx
28
+ from mcp.server import Server
29
+ from mcp.server.stdio import stdio_server
30
+ from mcp.types import TextContent, Tool
31
+
32
+ DEFAULT_BASE_URL = "https://app.flopsindex.com"
33
+ BASE_URL = os.environ.get("FLOPS_API_URL", DEFAULT_BASE_URL).rstrip("/")
34
+ HTTP_TIMEOUT_S = 15.0
35
+ USER_AGENT = "flopsindex-mcp/0.1.0"
36
+
37
+ server: Server = Server("flopsindex")
38
+
39
+
40
+ # ---------------------------------------------------------------------------
41
+ # Tool declarations (MCP `list_tools`)
42
+ # ---------------------------------------------------------------------------
43
+
44
+ @server.list_tools()
45
+ async def list_tools() -> list[Tool]:
46
+ return [
47
+ Tool(
48
+ name="list_indices",
49
+ description=(
50
+ "List all public FLOPS compute-price indices. "
51
+ "Returns a JSON array of {index_id, family, cadence, unit}. "
52
+ "Use this to discover available indices before calling "
53
+ "get_index or verify. No auth required."
54
+ ),
55
+ inputSchema={
56
+ "type": "object",
57
+ "properties": {
58
+ "family_filter": {
59
+ "type": "string",
60
+ "description": (
61
+ "Optional family prefix to filter by "
62
+ "(e.g. 'FLOPS-H100' or 'FLOPS-B300'). "
63
+ "Case-sensitive substring match."
64
+ ),
65
+ },
66
+ },
67
+ },
68
+ ),
69
+ Tool(
70
+ name="verify",
71
+ description=(
72
+ "Verify a FLOPS index value: returns the latest published "
73
+ "value, methodology pointer, source-count, and audit "
74
+ "receipt for the given index_id. Use to cite a FLOPS "
75
+ "index with provenance."
76
+ ),
77
+ inputSchema={
78
+ "type": "object",
79
+ "properties": {
80
+ "index_id": {
81
+ "type": "string",
82
+ "description": (
83
+ "FLOPS index identifier "
84
+ "(e.g. 'FLOPS-H100-OD-T1', 'FLOPS-B300-SPOT')."
85
+ ),
86
+ },
87
+ },
88
+ "required": ["index_id"],
89
+ },
90
+ ),
91
+ ]
92
+
93
+
94
+ # ---------------------------------------------------------------------------
95
+ # Tool implementations (MCP `call_tool`)
96
+ # ---------------------------------------------------------------------------
97
+
98
+ async def _get_json(path: str, params: dict[str, Any] | None = None) -> Any:
99
+ async with httpx.AsyncClient(
100
+ timeout=HTTP_TIMEOUT_S,
101
+ headers={"User-Agent": USER_AGENT, "Accept": "application/json"},
102
+ ) as c:
103
+ r = await c.get(f"{BASE_URL}{path}", params=params)
104
+ r.raise_for_status()
105
+ return r.json()
106
+
107
+
108
+ async def _tool_list_indices(args: dict[str, Any]) -> str:
109
+ family = (args.get("family_filter") or "").strip() or None
110
+ data = await _get_json("/v2/catalog/public")
111
+ indices = data.get("indices") if isinstance(data, dict) else data
112
+ if not isinstance(indices, list):
113
+ indices = []
114
+ if family:
115
+ indices = [i for i in indices if family in (i.get("index_id") or "")]
116
+ return json.dumps({
117
+ "count": len(indices),
118
+ "family_filter": family,
119
+ "indices": indices,
120
+ "source": f"{BASE_URL}/v2/catalog/public",
121
+ }, indent=2)
122
+
123
+
124
+ async def _tool_verify(args: dict[str, Any]) -> str:
125
+ index_id = (args.get("index_id") or "").strip()
126
+ if not index_id:
127
+ return json.dumps({"error": "index_id is required"})
128
+ data = await _get_json("/v1/verify", params={"index_id": index_id})
129
+ return json.dumps(data, indent=2)
130
+
131
+
132
+ @server.call_tool()
133
+ async def call_tool(name: str, args: dict[str, Any]) -> list[TextContent]:
134
+ try:
135
+ if name == "list_indices":
136
+ out = await _tool_list_indices(args)
137
+ elif name == "verify":
138
+ out = await _tool_verify(args)
139
+ else:
140
+ out = json.dumps({"error": f"unknown tool: {name}"})
141
+ except httpx.HTTPStatusError as exc:
142
+ out = json.dumps({
143
+ "error": "upstream_http_error",
144
+ "status": exc.response.status_code,
145
+ "url": str(exc.request.url),
146
+ })
147
+ except Exception as exc: # noqa: BLE001
148
+ out = json.dumps({"error": "tool_failed", "detail": str(exc)})
149
+ return [TextContent(type="text", text=out)]
150
+
151
+
152
+ # ---------------------------------------------------------------------------
153
+ # Entry point
154
+ # ---------------------------------------------------------------------------
155
+
156
+ async def _run() -> None:
157
+ async with stdio_server() as (read_stream, write_stream):
158
+ await server.run(
159
+ read_stream,
160
+ write_stream,
161
+ server.create_initialization_options(),
162
+ )
163
+
164
+
165
+ def main() -> None:
166
+ import asyncio
167
+ asyncio.run(_run())
168
+
169
+
170
+ if __name__ == "__main__":
171
+ main()
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: flopsindex-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for the FLOPS Compute Intelligence Platform — gives Claude / Cursor / Windsurf agents direct access to GPU compute price indices, methodology, and per-index verification.
5
+ Author-email: Ash Chary <ash@flopsindex.com>
6
+ License: Proprietary
7
+ Keywords: mcp,flops,gpu,compute,pricing,claude,agents
8
+ Requires-Python: >=3.11
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: mcp>=1.0.0
11
+ Requires-Dist: httpx>=0.26.0
12
+ Provides-Extra: dev
13
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
14
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
15
+
16
+ # flopsindex-mcp
17
+
18
+ Model Context Protocol server for the **FLOPS Compute Intelligence Platform**.
19
+
20
+ Gives AI agents (Claude Code, Cursor, Windsurf, ChatGPT desktop, any MCP host) direct access to live FLOPS GPU-compute price indices with verifiable provenance.
21
+
22
+ ## Tools
23
+
24
+ | Tool | Description |
25
+ |---|---|
26
+ | `list_indices` | Enumerate all public FLOPS indices. Optional `family_filter` substring (e.g. `FLOPS-H100`). |
27
+ | `verify` | Fetch the latest published value + audit receipt for a given `index_id`. |
28
+
29
+ More tools (`get_methodology`, `get_forward_curve`, `get_settlement`) are tracked in the FLOPS Track D roadmap.
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ uv tool install flopsindex-mcp
35
+ # or
36
+ pip install flopsindex-mcp
37
+ ```
38
+
39
+ ## Wire into Claude Code
40
+
41
+ ```bash
42
+ claude mcp add flopsindex -- flopsindex-mcp
43
+ ```
44
+
45
+ ## Wire into Cursor / Windsurf
46
+
47
+ Add to your MCP config (`~/.cursor/mcp.json` or equivalent):
48
+
49
+ ```json
50
+ {
51
+ "mcpServers": {
52
+ "flopsindex": {
53
+ "command": "flopsindex-mcp"
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ ## Environment
60
+
61
+ | Var | Default | Purpose |
62
+ |---|---|---|
63
+ | `FLOPS_API_URL` | `https://app.flopsindex.com` | Override for staging / self-host |
64
+
65
+ ## Example agent prompts
66
+
67
+ > "Use the flopsindex MCP server to list all H100 on-demand indices and report their latest values."
68
+
69
+ > "Verify FLOPS-B300-OD-T1 and cite the receipt."
70
+
71
+ ## Status
72
+
73
+ **v0.1.0** — MVP. Scaffolded 2026-05-12. Not yet published to PyPI / smithery.ai / glama.ai.
74
+
75
+ ## License
76
+
77
+ Proprietary. © 2026 FLOPS Index.
@@ -0,0 +1,10 @@
1
+ README.md
2
+ pyproject.toml
3
+ flopsindex_mcp/__init__.py
4
+ flopsindex_mcp/server.py
5
+ flopsindex_mcp.egg-info/PKG-INFO
6
+ flopsindex_mcp.egg-info/SOURCES.txt
7
+ flopsindex_mcp.egg-info/dependency_links.txt
8
+ flopsindex_mcp.egg-info/entry_points.txt
9
+ flopsindex_mcp.egg-info/requires.txt
10
+ flopsindex_mcp.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ flopsindex-mcp = flopsindex_mcp.server:main
@@ -0,0 +1,6 @@
1
+ mcp>=1.0.0
2
+ httpx>=0.26.0
3
+
4
+ [dev]
5
+ pytest>=8.0.0
6
+ pytest-asyncio>=0.23.0
@@ -0,0 +1 @@
1
+ flopsindex_mcp
@@ -0,0 +1,31 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "flopsindex-mcp"
7
+ version = "0.1.0"
8
+ description = "MCP server for the FLOPS Compute Intelligence Platform — gives Claude / Cursor / Windsurf agents direct access to GPU compute price indices, methodology, and per-index verification."
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = {text = "Proprietary"}
12
+ authors = [{name = "Ash Chary", email = "ash@flopsindex.com"}]
13
+ keywords = ["mcp", "flops", "gpu", "compute", "pricing", "claude", "agents"]
14
+
15
+ dependencies = [
16
+ "mcp>=1.0.0",
17
+ "httpx>=0.26.0",
18
+ ]
19
+
20
+ [project.optional-dependencies]
21
+ dev = [
22
+ "pytest>=8.0.0",
23
+ "pytest-asyncio>=0.23.0",
24
+ ]
25
+
26
+ [project.scripts]
27
+ flopsindex-mcp = "flopsindex_mcp.server:main"
28
+
29
+ [tool.setuptools.packages.find]
30
+ where = ["."]
31
+ include = ["flopsindex_mcp*"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+