Skip to main content
Glama
zikriyamgull-bit

UK Intelligence MCP Agent

README.md
# UK Intelligence MCP Agent

6 high-demand tools. Deploys in 90 minutes. Earns USDC while you sleep.

## Tools

| Tool | What it does | Why it's wanted |
|------|-------------|-----------------|
| `companies_house` | Live UK company lookup by name or number | Every lawyer, accountant, investor needs this |
| `scrape_url` | Fetch any URL → clean text/markdown/summary | #2 most-wanted MCP capability |
| `extract_data` | CSS selector targeting on any page | Structured data extraction without code |
| `search_web` | DuckDuckGo search → structured results | Agents need current info beyond training data |
| `summarise_page` | URL → title + headings + key paragraphs | Most token-efficient page understanding |
| `convert_format` | JSON ↔ CSV ↔ YAML ↔ TOML ↔ XML | Everyday data plumbing |

## Context window design

Every response is hard-capped to stay lean:
- Text responses: 2,000 chars max
- Scrape responses: 3,000 chars max  
- Tool descriptions: under 150 chars each
- Scripts, nav, footer, ads stripped before returning content

This means agents using this MCP server don't burn their context window on noise.

## Deploy (90 minutes, £4/month)

### 1. Get your Base wallet (20 mins)
1. Go to coinbase.com → create account → verify identity
2. Assets → USDC → Receive → Base network → copy address

### 2. Get Companies House API key (5 mins, free)
1. Go to developer.company-information.service.gov.uk/get-started
2. Register → create an application → copy your API key

### 3. Push to GitHub (10 mins)
```bash
git init && git add . && git commit -m "Deploy"
git remote add origin https://github.com/YOU/uk-intelligence.git
git push -u origin main
```

### 4. Deploy on Railway (15 mins, £4/month)
1. railway.app → New Project → Deploy from GitHub repo
2. Add environment variables:
   - `PAYMENT_WALLET` = your Base wallet address
   - `COMPANIES_HOUSE_API_KEY` = your CH key
   - `AGENT_URL` = your Railway URL (shown after first deploy)
3. Redeploy → live in 2 minutes

### 5. List on Smithery (15 mins, free)
1. smithery.ai → submit your MCP URL: `https://YOUR-URL.up.railway.app/mcp`
2. Title: `UK Intelligence MCP Agent`
3. Description: `UK company lookup, web scraping, search, and data tools. 100 requests free, then $0.001 USDC.`
4. Tags: `uk`, `companies-house`, `scraping`, `search`, `data`

Also list on mcp.so — same process, free.

## Add to Claude Desktop

In `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
  "mcpServers": {
    "uk-intelligence": {
      "url": "https://YOUR-URL.up.railway.app/mcp"
    }
  }
}
```

Then ask Claude:
- "Look up Deliveroo on Companies House"
- "Scrape the headlines from bbc.co.uk/news"
- "Search for the latest UK interest rate decision"
- "Summarise this page: https://..."
- "Extract all prices from this URL using selector .price"

## Monetisation

Three streams running simultaneously:

**x402 micro-payments** — After 100 free requests, every call costs $0.001 USDC.
Verified on-chain by Coinbase's free facilitator. USDC lands in your wallet automatically.

**Subscriptions** — Add Stripe for a £15/month flat rate.
50 subscribers = £750/month. Zero marginal cost.

**API keys** — `/auth/provision` gives agents a persistent key.
Offer tiered plans: free (100 calls), starter (£10/mo), pro (£30/mo).

## Running locally

```bash
cp .env.example .env        # add your wallet and API keys
pip install -r requirements.txt
uvicorn main:app --reload
# Server at http://localhost:8000
# Docs at http://localhost:8000/docs
```

## Endpoints

| Endpoint | What |
|----------|------|
| `POST /mcp` | MCP JSON-RPC — for Claude Desktop, Cursor, Windsurf |
| `GET /.well-known/agent-card.json` | Google A2A discovery card |
| `POST /companies_house` | Free tier company lookup |
| `POST /scrape` | Free tier web scrape |
| `POST /search` | Free tier web search |
| `POST /summarise` | Free tier page summary |
| `POST /extract` | Free tier CSS data extraction |
| `POST /convert` | Free tier format conversion |
| `POST /paid/*` | Same tools, x402 payment required |
| `POST /auth/provision` | Get an API key |
| `GET /stats` | Usage stats |
| `GET /docs` | OpenAPI docs (auto-generated) |