Connect PMI to OpenAI in three ways: the Responses API for developers, a Custom GPT inside ChatGPT for everyone, or the OpenAI Agents SDK for production agents. Pick the one that fits.
MCP endpointhttps://api.propertymarketintel.com/mcp
OpenAPI spec/v1/openapi.json (for Custom GPT)
AuthBearer pmi_live_…
Free tier100 credits/month, all 28 tools.
Pick your flavour
Three integration paths, depending on whether you're a developer, an end user, or building production agents.
Option A · Recommended for devs
Native MCP support. Same URL, same Bearer token, same 28 tools. The fastest path if you’re writing server-side agent code.
Option B · For end users
Build a PMI-powered GPT inside the consumer ChatGPT app. Uses our OpenAPI spec, no MCP, no code.
Option C · For agent builders
If you’re building with OpenAI’s Python or TypeScript Agents framework. MCP is first-class.
See it in action
If you've never set up MCP or a Custom GPT before, these official walkthroughs from OpenAI show what the experience looks like. PMI works the same way.
OpenAI · Official
OpenAI’s developer guide to connecting MCP servers like PMI. Same JSON shape, just our URL.
OpenAI · Support
OpenAI’s help-centre article on creating GPTs with Actions. Same Actions panel where you’ll plug in PMI’s OpenAPI spec.
Option A: OpenAI Responses API
OpenAI's Responses API supports MCP servers natively. Direct connection, same URL, same Bearer token, same 28 tools. This is the recommended path for developers.
1
Get your PMI API key
Find yours under Account → API Keys in the dashboard. Free tier comes with 100 credits/month, enough to try every tool.
2
Drop PMI into your tools array
Pick your language:
PythonTypeScript
Python \u00B7 openai SDK
from openai import OpenAI client = OpenAI() # OPENAI_API_KEY from env response = client.responses.create( model="gpt-4.1", tools=[{ "type": "mcp", "server_label": "pmi", "server_url": "https://api.propertymarketintel.com/mcp", "headers": { "Authorization": "Bearer pmi_live_c9ef932f5845ec16cf747ed8c1a95d0e29bd74aedb6b7118af7c8722980e6160" }, # Don't require approval for each call, let the model run end-to-end "require_approval": "never" }], input="What's the rental yield in LS6, and is the area growing in demand?", ) print(response.output_text)3
Run it
The model picks the right PMI tools, calls them, and returns a synthesized answer. Each tool call appears in response.output as a typed block, useful if you want to log what was called.
Restricting which tools the model sees
By default the model sees all 28 tools. To narrow it down (e.g. only valuation tools for a valuation-only chatbot):
"allowed_tools": ["pmi_valuation_sale", "pmi_valuation_rental", "pmi_valuation_hmo"]
Add this inside the MCP tool config block. Reduces token cost and stops the model wandering into unrelated tools.
Approval flows for expensive tools
For interactive UIs where the user should confirm expensive calls (the STR estimate is 50 credits a pop):
"require_approval": "always"
The model returns control after every tool call so you can show a “Confirm spending 50 credits on STR estimate?” prompt. For server-side agents, leave it "never".
Option B: Custom GPT in ChatGPT
ChatGPT (the consumer product, including ChatGPT Plus, Team, and Enterprise) supports custom integrations through Actions. Actions use OpenAPI specs, not MCP, so we point your Custom GPT at the REST API directly.
This works well for end users who want to chat with their property data. They don't need to know what MCP is.
1
Create a Custom GPT
In ChatGPT, click your name → My GPTs → Create a GPT. Click Configure.
2
Set the basics
Name: e.g. “Property Market Intel”
Description: “Ask anything about UK property: valuations, comparables, planning, yields, rents, STR revenue.”
Instructions: see suggested system prompt below
Conversation starters: a few prompts to seed users
3
Add Actions (this is where the API plugs in)
Scroll to Actions → Create new action. Three fields to fill:
Authentication
Authentication type: API Key
API Key:
pmi_live_c9ef932f5845ec16cf747ed8c1a95d0e29bd74aedb6b7118af7c8722980e6160Auth Type: Bearer
Schema
Paste your OpenAPI spec. We auto-generate one from the live API:
https://api.propertymarketintel.com/v1/openapi.json
Or copy-paste the JSON directly into the schema box (ChatGPT will validate it).
Privacy policy
Set to: https://www.propertymarketintel.co.uk/privacy
4
Suggested system prompt
Copy this into the Instructions field. It primes the model to use the right endpoints and quote stats correctly.
System prompt
You are a property market intelligence assistant for the UK. You have direct access to the Property Market Intel API for live data. When the user asks anything about a UK property or area: 1. If they give an address, first call POST /addresses/match to resolve to a UPRN. 2. Use UPRN-based endpoints (/valuations/{uprn}/sale, /risks/{uprn}, etc.) for property-specific questions. 3. Use location-based endpoints (/prices/market, /rents/yields, /str/market) for area questions. Accept postcode, outcode, lat+lng+radius_m, or polygon. 4. Always quote the median (not mean) when discussing prices and rents, it's more robust to outliers. 5. Currency is always GBP. Cite confidence levels when the API provides them. 6. If the API returns a 402 (credits exhausted), tell the user politely. 7. Never guess data, if you don't have a tool that answers something, say so. For SA revenue projections, use POST /valuations/str-estimate with the property's UPRN or postcode + bedrooms.
5
Save, test, and distribute
Click Update, then Test. Ask: “What's the rental yield in LS6?”. ChatGPT should hit /v1/rents/yields?outcode=LS6 and return the answer.
If you have ChatGPT Team or Enterprise, you can publish the GPT to your workspace. For public Custom GPTs, set Sharing to Anyone with a link in the publish dialog.
Don't ship a Custom GPT with your master key. Anyone using the GPT will burn credits against that key. Best practice: create a sub-key with a hard credit cap dedicated to the Custom GPT.
Option C: OpenAI Agents SDK
If you're building with the Agents SDK (Python or TypeScript), MCP is first-class. Same URL, same headers.
Python
Python \u00B7 agents SDK
from agents import Agent from agents.mcp import MCPServerStreamableHttp pmi = MCPServerStreamableHttp( url="https://api.propertymarketintel.com/mcp", headers={"Authorization": "Bearer pmi_live_c9ef932f5845ec16cf747ed8c1a95d0e29bd74aedb6b7118af7c8722980e6160"}, ) agent = Agent( name="PropertyAnalyst", instructions="You are a UK property market analyst. Use PMI tools.", mcp_servers=[pmi], ) result = await agent.run("Compare STR vs long-let yields for SW1.") print(result.final_output)TypeScript
TypeScript \u00B7 @openai/agents
import { Agent } from "@openai/agents"; import { MCPServerStreamableHttp } from "@openai/agents-mcp"; const pmi = new MCPServerStreamableHttp({ url: "https://api.propertymarketintel.com/mcp", headers: { Authorization: "Bearer pmi_live_c9ef932f5845ec16cf747ed8c1a95d0e29bd74aedb6b7118af7c8722980e6160" }, }); const agent = new Agent({ name: "PropertyAnalyst", instructions: "You are a UK property market analyst. Use PMI tools.", mcpServers: [pmi], }); const result = await agent.run("Compare STR vs long-let yields for SW1."); console.log(result.finalOutput);Which one should I pick?
Use case | Pick this |
You’re a developer writing an agent that runs on a server | Option A · Responses API |
You’re a non-developer who wants PMI inside ChatGPT itself | Option B · Custom GPT |
You’re building with OpenAI’s Agents SDK | Option C · Agents SDK |
You want a chatbot for your customers on your own website | Option C, with our key behind your backend (don't expose |
You need approval flows on expensive tools | Option A or C with |
Best practices
Use sub-keys, not your master key. One per integration. Cap each one’s monthly credits.
Filter tool exposure, when the agent's purpose is narrow. A pure rental-yield bot doesn't need access to
pmi_planning_applications.For public-facing Custom GPTs, gate via
require_approvalon the expensive tools (pmi_str_revenue_estimateis 50 credits, can drain a key fast).Server-side proxy for browser apps. Never put
pmi_live_…in client-side JavaScript. Build a thin endpoint on your backend that talks to OpenAI with PMI keys living in env vars.Cache responses by UPRN, for 24h+ in your own layer. Most user-flow patterns re-request the same property within a session.
Troubleshooting
“Tool not found” / “I don’t have access to that tool”
MCP block missing or allowed_tools excluded it. Confirm the tools list in the request, or remove allowed_tools.
Custom GPT returns 401
API key not set correctly in Actions auth. Re-paste the key in Actions → Authentication → API Key.
OpenAI Responses API returns “MCP server unreachable”
URL typo or trailing slash. Must be exactly …/mcp, no trailing slash.
Calls succeed but credits aren’t deducted
You're using a pmi_test_… key. Test keys don't deduct credits. Switch to pmi_live_… for production.
ChatGPT Custom GPT shows “ChatGPT could not call this Action”
OpenAPI spec validation failure. Re-fetch from /v1/openapi.json, we update it on every release.