Build Your Own PUBLICMCP Server

PUBLICMCP is an open standard for a small, public, read-only server that tells AI agents who a business is, what it offers, what it costs and where it works. AI assistants can then get those facts straight from the business, instead of guessing from web pages. It's free and open source (Apache 2.0).


Read the spec on GitLab · Get the reference package on PyPI


Read the spec on GitLab →

Get the reference package on PyPI →

What You're Building

PUBLICMCP doesn't invent a new protocol. It builds on the Model Context Protocol (MCP), the open protocol AI assistants use to call outside tools. PUBLICMCP is a standard profile on top of MCP: the tools your server must offer, the shape of their answers, and how agents find it.


Your server must be:

  • Public. No login or API key to call any tool.
  • Read-only. Agents can look, never change anything.
  • JSON only. Every answer is JSON, never markdown, HTML or plain text.
  • Safe. No personal information, internal data, credentials or non-public pricing.
  • Separate. It can run alongside your private systems, but never shares ports, logins, tools or data with them.


It runs over streamable HTTP (recommended) or stdio.

Quickstart

You need Python 3.10 or newer.

 pip install publicmcp
publicmcp init     # creates business.json, the one file you edit
publicmcp serve    # starts the server on port 8000 


Point any MCP client at http://localhost:8000/mcp to test it.


Fill in business.json. At minimum: name, services and locations. Add description and website too, because get_info must return them to be compliant. Optional fields include tagline, contact, hours, social profiles, price range and portfolio. Give services real descriptions and price ranges, since vague entries make AI fill in details.


What the Reference Package Covers

The publicmcp package is a quick way to get started. It isn't fully v0.4 compliant yet.

Included Not yet included
get_info , get_services , get_location (required) get_markets , get_products
get_portfolio (recommended) search_site_content , get_page_content , list_site_pages
get_sales_context , qualify_prospect (extensions) check_project_fit
/.well-known/publicmcp.json /.well-known/agents.json (use the DNS record below instead)

It also still reports publicmcp_version: "0.2" and names itself publicmcp-server. For full v0.4 compliance, add the missing pieces yourself or build your own server against the spec.

Going Live

Run the server behind a web server with HTTPS, on a subdomain such as mcp.yourdomain.com. This Caddy setup adds the CORS headers the spec requires. It strips the package's own copies so browsers don't receive the headers twice, which makes them reject the response:

 mcp.yourdomain.com {
	@options method OPTIONS
	handle @options {
		header Access-Control-Allow-Origin "*"
		header Access-Control-Allow-Methods "GET, POST, OPTIONS"
		header Access-Control-Allow-Headers "Content-Type, Mcp-Session-Id"
		respond "" 204
	}
	header Access-Control-Allow-Origin "*"
	header Access-Control-Allow-Methods "GET, POST, OPTIONS"
	header Access-Control-Allow-Headers "Content-Type, Mcp-Session-Id"
	reverse_proxy 127.0.0.1:8000 {
		header_down -Access-Control-Allow-Origin
		header_down -Access-Control-Allow-Methods
		header_down -Access-Control-Allow-Headers
	}
} 
 publicmcp serve --business business.json --host 127.0.0.1 --port 8000 --domain mcp.yourdomain.com 

Always pass --domain in production. It sets the address your discovery files advertise, and without it the package guesses from your website address.

Help Agents Find Your Server

Publish both discovery files where you can. Use a DNS record as the fallback. Agents check agents.json first, then DNS.


1. /.well-known/publicmcp.json is your PUBLICMCP fingerprint. The reference package provides it.


2. /.well-known/agents.json is an open discovery file (its own spec, v0.1). It lists the domain, last-updated date, each MCP server you run, and your agent policy (whether agents are allowed, and a rate limit). The reference package doesn't provide it yet.


3. DNS TXT record: for when you can't serve agents.json, including sites on Duda, Shopify, Wix or Squarespace. It's only a pointer (255 characters max, and changes wait for DNS to update):

 _agents.yourdomain.com.  TXT  "v=agents0.1; type=publicmcp; endpoint=https://mcp.yourdomain.com/mcp; version=0.4" 

All discovery endpoints must be public, with open CORS headers (Access-Control-Allow-Origin: *). agents.json works alongside robots.txt (crawling) and llms.txt (AI training); it doesn't replace them.

The Tools

Required: Every Compliant Server

Tool Returns
get_info name , description , website and publicmcp_version (required), plus optional tagline, contact, hours, social profiles, price range
get_services A non-empty list of services, each with name and description , plus optional price range, category and delivery (remote / on-site / both)
get_location headquarters and remote_capable (required), plus optional offices, service areas and coordinates

Recommended

Tool Returns
get_portfolio Work examples, filterable by industry
get_markets Geographic markets and industry verticals served
get_products Products. Shopify stores get live pricing and stock from the public store feed (up to 250 products)
search_site_content Full-text search across your website's pages
get_page_content The full text of one page
list_site_pages Every indexed page, with title and URL

Optional extension: check_project_fit scores how well a described project fits the business. It needs an AI model to run. You can add your own tools as long as their names don't clash with the standard ones.

Compliance Checklist (v0.4)

- serverInfo.name follows {business-slug}-publicmcp (e.g. acme-plumbing-publicmcp)

- get_info returns valid JSON with publicmcp_version: "0.4", name, description and website

- get_services returns a non-empty array with name and description on each service

- get_location returns headquarters and remote_capable

- /.well-known/publicmcp.json is public and declares 0.4

- /.well-known/agents.json lists the server with type: "publicmcp" and agents_version: "0.1", OR the _agents.{domain} TXT record exists with v=agents0.1 and a valid endpoint

- Open CORS headers on all endpoints

- All responses are valid JSON

- No authentication on any tool

- No write or change operations

- Runs on a separate port or endpoint from any private MCP systems


Servers declare "0.4". Spec 0.4.1 is a clarification and doesn't change what a server declares. Only claim a spec version your server fully implements.

Example Deployment

Salt Creative self-hosts its own server at https://mcp.sltcreative.com/mcp, using the reference package.

About the Standard

- Status: DRAFT, v0.4.1 (2026-10-25). Pre-1.0 versions may include announced breaking changes. Versions follow semantic versioning.

- Maintainer: Salt Creative, which created PUBLICMCP. Decisions are informed by community input and real deployments. Changes are announced on this page.

- Contribute: open a GitLab issue to propose a change, or a merge request for clarifications. Breaking changes to required tools need a public discussion issue open for at least 14 days.

- License: Apache 2.0, commercial use included. Copyright 2026 Salt Creative.


Coming from publicmcp.org? PUBLICMCP now lives here. The former library, directory and verification program have been retired. The standard is self-hosted only.

Links

What Where
Spec and reference package source gitlab.com/salt-creative-group/publicmcp
Python package pypi.org/project/publicmcp
Model Context Protocol modelcontextprotocol.io

Frequently Asked Questions

  • Is PUBLICMCP free?

    Yes. The spec and the reference package are free and open source under the Apache 2.0 license, including commercial use.

  • Does Salt Creative host or set up PUBLICMCP servers?

    No. PUBLICMCP is self-hosted only. You run your own server, using the reference package or your own build against the spec.

  • Do I need a developer to set this up?

    You need some server experience. The reference package installs with one command and runs from a single file, business.json. To go live, you also need a server with HTTPS, a subdomain and a few discovery settings.

  • Will this work with AI assistants?

    PUBLICMCP is built on the Model Context Protocol (MCP), the open protocol AI assistants use to call outside tools. Any MCP client can connect to a PUBLICMCP server.

  • How do AI agents find my server?

    Publish a /.well-known/publicmcp.json file, and an /.well-known/agents.json file where you can. If your site can't serve agents.json, add a DNS TXT record at _agents.yourdomain.com that points to your server. Agents check agents.json first, then DNS.

  • Is my business data secure?

    Your server only shares what you put in business.json. It's public and read-only, with no logins, no write actions and no personal or internal data. It must also stay separate from any private systems you run.

  • Is there a directory or registry of PUBLICMCP servers?

    No. There is no registry or verification. Agents find servers through each business's own discovery files or DNS record.

  • Which version should my server declare?

    Declare "0.4". Spec 0.4.1 is a clarification and doesn't change what a server declares. Only claim a version your server fully implements.


    The MD file's notes say to add FAQPage schema if the page has an FAQ. I can write it to go with the schema already in the file.