---
title: "MCP Developer Documentation and Reference Server | CustomMCP.com"
description: "Set up the reference MCP server, call the public /mcp endpoint, and learn the lifecycle, tool design, transport, auth and testing rules used in this build."
canonical: https://custommcp.com/docs/
updated: 2026-11-29
release_state: APPROVED_FOR_RELEASE
license: content all rights reserved; reference code MIT
generator: CustomMCP static generator 2.1.0
---

# MCP developer documentation

> This documentation covers the reference MCP server in the download bundle, the public /mcp Streamable HTTP endpoint, protocol lifecycle, tool design, authentication guidance, error handling, testing and troubleshooting. The public endpoint supports initialize, tools/list, tools/call, resources and prompts; authenticated tenant tools are not part of this build.

Start with a local Python server over stdio, then call the public stateless endpoint. Both use the same tool contracts and the same deterministic estimator.

## What is implemented

The reference server is a small Python program using the official MCP Python SDK over stdio. It exposes two tools, one resource and one prompt, with no credentials and no external writes.

The public endpoint at /mcp is a stateless Streamable HTTP JSON-RPC endpoint. It implements initialize, notifications/initialized, tools/list, tools/call, resources/list, resources/read, prompts/list and prompts/get. It does not implement tasks, interactive apps or OAuth-protected tenant tools.

| Surface | Status | Where |
| --- | --- | --- |
| stdio reference server | Implemented | Download bundle, mcp/server.py |
| Streamable HTTP /mcp | Implemented, stateless | This site |
| Tools and structured results | Implemented | 7 capabilities |
| Resources and prompts | Implemented | /mcp |
| OAuth-protected tenant tools | Not implemented | Design guidance below |
| MCP Tasks and MCP Apps | Not implemented | Roadmap, not claimed |
| Signed execution receipts | Implemented | X-Evidence-Id on tools/call |

*Implemented surface*

## Quickstart: local stdio server

*Requires Python 3.10+ and a compatible client. Run from the unpacked bundle.*

```bash
python3 -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python server.py
```

## Client configuration

*Use absolute paths. The server must not be exposed publicly when run over stdio.*

```json
{
  "mcpServers": {
    "custommcp-reference": {
      "command": "/absolute/path/.venv/bin/python",
      "args": ["/absolute/path/server.py"]
    }
  }
}
```

## Download the reference server

The bundle contains the server, the catalog module, requirements and unit tests. It has no credentials and no external write path. Install it in an isolated environment and keep it local.

The download is generated from the same source tree as this page, so the documented tool names match the code.

## Call the public endpoint

*Stateless JSON-RPC over POST. Add -i to inspect X-Evidence-Id and Link headers.*

```bash
curl -s https://custommcp.com/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'
curl -s https://custommcp.com/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
curl -s https://custommcp.com/mcp -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"estimate_project","arguments":{"tools":6,"integrations":2}}}'
```

## Tools

| Tool | Purpose | Rate limit |
| --- | --- | --- |
| list_services | Return services with indicative ranges | 120/min per IP |
| estimate_project | Deterministic USD range from tools and integrations | 60/min per IP |
| get_integration_requirements | Prerequisites and limits for github, postgresql or google-drive | 120/min per IP |
| search_knowledge | Search approved public content | 60/min per IP |
| get_page | Return a page as Markdown | 120/min per IP |
| create_inquiry | Store a project brief and return a reference code | 5/hour per IP |
| get_agent_prompt | Return a context-aware handoff prompt | 60/min per IP |

*Public tool surface*

## Tool design rules

One tool should do one job. If a description needs the word and to explain two behaviors, split it. Keep the input schema strict, return a short text summary plus structuredContent, and make the error shape stable.

Annotations are hints for hosts, not authorization. A tool marked readOnlyHint must also be enforced read-only on the server. Never rely on a description to prevent a dangerous call.

## Lifecycle rules

- Validate the MCP-Protocol-Version header on requests after initialize; reject unsupported versions cleanly.

- Return the negotiated protocol version in the initialize result, not the version you wish the client used.

- Accept notifications/initialized without a response body.

- Cap request bodies at 64 KiB on public endpoints.

- Use JSON-RPC error codes for protocol errors and structured content for application errors.

- Make tools/call idempotent where the operation allows it and document which do not.

- Emit a request ID in logs and an evidence receipt for every state-changing call.

## Authentication guidance

The public endpoint needs no authentication because it is read-only plus a rate-limited inquiry write. A tenant-scoped deployment does need authentication, and the model is OAuth 2.1 with PKCE, a resource indicator bound to the MCP server, and short-lived access tokens.

Publish protected-resource metadata at /.well-known/oauth-protected-resource and authorization-server metadata at /.well-known/oauth-authorization-server. Never pass the client's token through to a downstream API; exchange it for a per-tenant connector credential server-side.

## Error handling

| Code | Meaning | Client action |
| --- | --- | --- |
| -32700 | Parse error | Fix the JSON body |
| -32600 | Invalid request | Include jsonrpc, method and id as required |
| -32601 | Method not found | Check the supported method list |
| -32602 | Invalid params | Read the data field for the schema violation |
| -32603 | Internal error | Retry with backoff or report the request ID |
| -32000 | Rate limited | Respect Retry-After and back off |
| -32001 | Evidence unavailable | Retry or contact support with the request ID |

*JSON-RPC codes used by the reference endpoint*

## Smoke test

*Run the repository verification suite to test build, links, schema, negotiation and MCP.*

```bash
python3 tools/verify.py --serve
node tools/browser_check.mjs --base http://127.0.0.1:8765
```

## Troubleshooting

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| Client shows no tools | Server not initialized or client launched the wrong command | Check stderr, absolute paths and the initialize result |
| initialize fails with version error | Client and server have no supported revision | Pin a supported protocol version and retest |
| tools/call returns 400 | Missing Content-Type or oversized body | Send application/json under 64 KiB |
| Remote call returns 403 | Origin or auth policy rejected the request | Use a server-side client, not a browser, and read the error |
| Inquiry returns 429 | Rate limit reached | Wait for the Retry-After window |
| Markdown request returns HTML | Accept header not sent or proxy stripped it | Send Accept: text/markdown and check Vary: Accept |

*Common failures*

## Frequently asked questions

### Is there an SDK to install?

No. Use the official MCP SDKs. The reference server uses the official Python SDK, and the documentation pins the version in requirements.txt.

### Can I call /mcp from a browser?

It is designed for server-side clients. CORS is restricted and Origin checks apply. Browser-native use is through WebMCP on the pages, not direct cross-origin MCP calls.

### Are the tools free?

Yes. The public tools are free and rate-limited. No payment credentials are needed.

### How do I report a documentation error?

Use the contact form with the topic Other and the page URL. Corrections are recorded in the changelog.

## Related

- [Work with your AI agent](https://custommcp.com/agents/)
- [What is Model Context Protocol?](https://custommcp.com/resources/what-is-mcp/)
- [stdio or Streamable HTTP: choosing an MCP transport](https://custommcp.com/resources/mcp-transport-comparison/)
- [MCP security checklist: 20 controls before you expose a tool](https://custommcp.com/resources/mcp-security-checklist/)

---

Canonical HTML: https://custommcp.com/docs/
Machine index: https://custommcp.com/llms.txt
Agent onboarding: https://custommcp.com/agents/
Last verified: 2026-11-29
