Skip to main content

publicmcp

Build and self-host a PUBLICMCP business identity MCP server.

PyPI License Spec

PUBLICMCP is an open standard for public-facing business identity MCP servers: structured, read-only business data that any AI agent or MCP client can query. This repository holds the specification (SPEC.md) and a reference Python package.

PUBLICMCP is self-hosted only. Each business runs its own server. There is no central registry, hosted service, or verification program.


What's new in 0.4.1 (2026-10-25)

  • Self-hosted only. The central registry, directory, verification badges, hosted service and public library are retired. publicmcp.org is no longer used. The standard's home is sltcreative.com/publicmcp.
  • Spec 0.4.1 is an editorial revision of v0.4: the registry section is removed, the spec URL now points to SPEC.md on GitLab, and Appendix A covers self-hosting. Servers still declare publicmcp_version: "0.4".
  • Package: the publicmcp router command and its registry tools are removed. init and serve are unchanged.

Quickstart

Requires Python 3.10+.

pip install publicmcp
publicmcp init          # create business.json
publicmcp serve         # start server on :8000

Point your MCP client at http://localhost:8000/mcp.


What the reference package does

publicmcp serve starts a FastMCP server that exposes your business.json as read-only MCP tools. Browsers that open /mcp (or any path other than /, /info and /.well-known/publicmcp.json) are redirected to the publicmcp_page set in business.json; AI agents get MCP.

Tool In spec Description
get_info Required Name, tagline, description, contact, hours, social profiles
get_services Required Services with pricing and details
get_location Required Headquarters, offices, service areas
get_portfolio Recommended Portfolio items, filterable by market and category
get_sales_context Extension Objection handling, pain points, ideal client profile (needs sales_agent in business.json)
qualify_prospect Extension Fit score and service recommendation (needs primary_markets in business.json)

Plus one prompt: sales_workflow, a tool-chaining guide for sales agents.

Not yet in the package: get_markets, get_products, search_site_content, get_page_content, list_site_pages, check_project_fit and /.well-known/agents.json. The package also still declares an earlier publicmcp_version, names itself publicmcp-server (spec 3.1 expects {business-slug}-publicmcp), sends no server instructions (3.2), and its get_portfolio filters and response shape differ from spec 5.1. For full v0.4 compliance, add these yourself or build your own server against SPEC.md.


CLI reference

publicmcp init [--output business.json] [--force]
    Create a starter business.json template.

publicmcp serve [--business business.json] [--host 0.0.0.0] [--port 8000] [--domain your.domain.com]
    Start the server. --domain sets the URL in the discovery endpoint. Always pass it in
    production: the default comes from the business.json website field, without www.

Endpoints

Path Method Description
/mcp POST MCP (streamable HTTP), for AI agents
/.well-known/publicmcp.json GET PUBLICMCP compliance fingerprint
/info GET Plain-text server summary
/ GET Discovery payload (JSON)

Discovery

Servers should publish /.well-known/publicmcp.json and /.well-known/agents.json (spec section 11). Sites on hosted platforms (Duda, Shopify, Wix, Squarespace) that can't serve files can use a DNS TXT record instead:

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

Production deployment

Run behind a reverse proxy with TLS on a dedicated subdomain. With Caddy:

mcp.yourdomain.com {
    reverse_proxy 127.0.0.1:8000
}
publicmcp serve --business business.json --host 127.0.0.1 --port 8000 --domain mcp.yourdomain.com

Add CORS headers (Access-Control-Allow-Origin: *) at the proxy so browser-based agents can read your endpoints.

Example deployment: Salt Creative self-hosts its server at https://mcp.sltcreative.com/mcp.



License

Apache 2.0. See LICENSE.

Metadata

Release files for publicmcp 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for publicmcp 0.4.1
File Interpreter ABI Platform Actions
publicmcp-0.4.1-py3-none-any.whl Python 3 none any Details for publicmcp-0.4.1-py3-none-any.whl

Release files / publicmcp-0.4.1-py3-none-any.whl

Download URL publicmcp-0.4.1-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eac8a1938a102f038e3264398dfcfb14d2d28b55e4365e5b269233ebe3ace7e8
BLAKE2b-256 checksum
How to use checksums
078b0a5ef02f33339a04790f2c1e02b507814a044e47a638f9e29824c24e1217
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for publicmcp 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page