# What is MCP.co.tz > A gateway and marketplace for MCP servers built on Tanzanian APIs. Publishers keep hosting their servers; agents connect through one stable address per server. ## How it works Every listed server gets an address like `sendafrica.mcp.co.tz/mcp`. Agents connect to that address. The gateway checks rate limits, reads the MCP method and tool name, forwards the request to the publisher's own server and streams the answer back. The publisher never has to change their address again, even if they move hosts. - **Publishers** register in a short guided conversation in the console. An admin reviews each server before it goes live. - **Agent builders** find servers in the [marketplace](https://marketplace.mcp.co.tz) and paste one snippet into Claude, Cursor, ChatGPT or Ngamia Agent. - **Consumers pay publishers directly**, with the publisher's own API keys. MCP.co.tz never takes a cut of calls. ## Who it's for Teams that run an API Tanzanian businesses rely on (SMS, email, point of sale, payments, logistics) and want AI agents to use it safely, and developers building agents who need tools that work here. ## What we store Metadata only: time, method, tool name, status, latency and a hashed caller IP whose salt is destroyed after 30 days. Never tool arguments, results or keys. Keys pass through the gateway to the publisher untouched. Source: https://docs.mcp.co.tz/ --- # Publish your MCP server in 10 minutes > You keep running your server. MCP.co.tz gives it a permanent address, a listing and a gateway in front of it. By the end of this guide, agents can call your tools at your-name.mcp.co.tz/mcp. > **You need:** an MCP server reachable over HTTPS using Streamable HTTP, and a Camel Account. No server yet? [Wrap your REST API in about 50 lines](https://docs.mcp.co.tz/wrap). ### Run your MCP server Any language works. With Go, the official SDK serves Streamable HTTP on one endpoint: ```go title="main.go" package main import ( "context" "net/http" "github.com/modelcontextprotocol/go-sdk/mcp" ) type SendSMSArgs struct { To string `json:"to" jsonschema:"phone number in +255 format"` Message string `json:"message" jsonschema:"text, up to 918 characters"` } func main() { server := mcp.NewServer(&mcp.Implementation{Name: "sendafrica-mcp", Version: "1.0.0"}, nil) mcp.AddTool(server, &mcp.Tool{Name: "send_sms", Description: "Send an SMS to a Tanzanian number."}, func(ctx context.Context, req *mcp.CallToolRequest, in SendSMSArgs) (*mcp.CallToolResult, any, error) { // Call your existing REST API here, with the key the agent sent. key := req.Extra.Header.Get("X-Api-Key") id, err := sendViaREST(ctx, key, in.To, in.Message) if err != nil { return nil, nil, err } return &mcp.CallToolResult{Content: []mcp.Content{&mcp.TextContent{Text: "Sent. Message ID " + id}}}, nil, nil }) handler := mcp.NewStreamableHTTPHandler(func(*http.Request) *mcp.Server { return server }, nil) http.Handle("/mcp", handler) http.ListenAndServe(":8080", nil) } ``` ### Connect it in the dashboard Open **Connect a server** in the console and paste your URL. The setup guide runs `initialize` and `tools/list`, drafts your listing from your tools, and asks how agents authenticate. There are no forms to fill in, and you can leave and resume any time. ### Submit for review An admin checks the name, tools and reachability, usually within 48 hours. You get a notification in the console and an email either way. ### Only accept calls from the gateway Every call we forward carries `X-MCP-Co-Tz-Request-Id` and `X-MCP-Co-Tz-Server`. Log the request ID: consumers quote it when something fails, and it's searchable in your request log. ```http title="Headers your server receives" X-MCP-Co-Tz-Request-Id: req_e019c47a2bd8f1e60c5ab7d4 X-MCP-Co-Tz-Server: sendafrica X-Forwarded-For: 41.59.x.x Traceparent: 00-4bf92f35…-01 ``` ## What the gateway forwards | Header | To your server | | --- | --- | | `Your declared auth header` | Forwarded unchanged, never stored or logged | | `Mcp-Session-Id`, `Mcp-Protocol-Version`, `Last-Event-Id` | Forwarded | | `Content-Type`, `Accept`, `User-Agent`, `Traceparent` | Forwarded | | `Cookie`, `Authorization` (unless declared), proxy headers | Stripped | | `Set-Cookie`, `Server`, `X-Powered-By` (from you) | Stripped before the client | ## Errors the gateway returns These come from the gateway, as JSON with a request ID. Anything your server returns, including your own 401, passes through untouched. Full list in [Error codes](https://docs.mcp.co.tz/errors). Source: https://docs.mcp.co.tz/quickstart --- # Connect a server to your agent > Pick a server in the marketplace, get a key from its publisher if it needs one, and paste one snippet into your client. ### Find a server Search the [marketplace](https://marketplace.mcp.co.tz) by what you need: “send an sms”, “check stock”. Each listing shows its tools, inputs, health and real uptime. ### Get a key Most servers use the publisher's own API keys. The listing says which header to use and where to get a key. Servers marked **No key** work straight away. ### Paste the snippet Every listing has copy-paste setup for Claude Code, Claude Desktop, Cursor and Ngamia Agent. For example: ```bash claude mcp add --transport http sendafrica https://sendafrica.mcp.co.tz/mcp --header "X-Api-Key: YOUR_API_KEY" ``` ### Just ask Your agent discovers the tools on connect. Ask in plain words: “Text Asha that her order is ready.” Source: https://docs.mcp.co.tz/connect --- # Build an MCP server > An MCP server is a thin layer over the API you already have. Each tool is one function: a name, a description, an input schema and a handler that calls your API. ## Go ```go title="main.go" package main import ( "context" "net/http" "github.com/modelcontextprotocol/go-sdk/mcp" ) type SendSMSArgs struct { To string `json:"to" jsonschema:"phone number in +255 format"` Message string `json:"message" jsonschema:"text, up to 918 characters"` } func main() { server := mcp.NewServer(&mcp.Implementation{Name: "sendafrica-mcp", Version: "1.0.0"}, nil) mcp.AddTool(server, &mcp.Tool{Name: "send_sms", Description: "Send an SMS to a Tanzanian number."}, func(ctx context.Context, req *mcp.CallToolRequest, in SendSMSArgs) (*mcp.CallToolResult, any, error) { // Call your existing REST API here, with the key the agent sent. key := req.Extra.Header.Get("X-Api-Key") id, err := sendViaREST(ctx, key, in.To, in.Message) if err != nil { return nil, nil, err } return &mcp.CallToolResult{Content: []mcp.Content{&mcp.TextContent{Text: "Sent. Message ID " + id}}}, nil, nil }) handler := mcp.NewStreamableHTTPHandler(func(*http.Request) *mcp.Server { return server }, nil) http.Handle("/mcp", handler) http.ListenAndServe(":8080", nil) } ``` ## TypeScript ```ts title="server.ts" import express from "express"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js"; import { z } from "zod"; const app = express(); app.use(express.json()); app.post("/mcp", async (req, res) => { const server = new McpServer({ name: "ziadapos-mcp", version: "1.0.0" }); server.tool("check_stock", "Check stock for a product in each branch.", { product: z.string().describe("Product name or SKU") }, async ({ product }) => { const r = await fetch(`https://api.ziadapos.com/stock?q=${encodeURIComponent(product)}`, { headers: { "X-Api-Key": String(req.headers["x-api-key"] ?? "") }, }); return { content: [{ type: "text", text: await r.text() }] }; }); const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined }); res.on("close", () => transport.close()); await server.connect(transport); await transport.handleRequest(req, res, req.body); }); app.listen(8080); ``` ## Writing good tools - Name tools with a verb: `send_sms`, `check_stock`. The marketplace search covers tool names and descriptions. - Describe each input. Agents read the descriptions to fill in arguments, and the listing shows them to people. - Return short, plain answers. “Sent. Message ID 8841” is easier for an agent than a raw JSON dump. - Keep reads and writes separate, so people can trust a read-only tool. Source: https://docs.mcp.co.tz/build --- # Wrap an existing REST API > You don't need a new backend. One small MCP server can sit in front of the REST API you already run, turning each endpoint agents need into a tool. ## Pick the endpoints Start with three to five things people actually ask for. A shop might expose `check_stock`, `record_sale` and `daily_summary`, not every route in its API. Each tool gets a verb name, a one-sentence description and a typed input. ## The whole server About 50 lines of Go, using the official SDK. The handler calls your API and returns a short sentence the agent can repeat to a person. ```go title="main.go" package main import ( "context" "encoding/json" "fmt" "net/http" "net/url" "github.com/modelcontextprotocol/go-sdk/mcp" ) // Your existing REST API. const api = "https://api.duka.co.tz/v1" type StockArgs struct { SKU string `json:"sku" jsonschema:"product code, e.g. SOAP-250"` } func main() { s := mcp.NewServer(&mcp.Implementation{Name: "duka-mcp", Version: "1.0.0"}, nil) mcp.AddTool(s, &mcp.Tool{ Name: "check_stock", Description: "How many units of a product are in stock, by SKU.", }, func(ctx context.Context, req *mcp.CallToolRequest, in StockArgs) (*mcp.CallToolResult, any, error) { // Pass the agent's own key straight through to your API. r, _ := http.NewRequestWithContext(ctx, "GET", api+"/stock/"+url.PathEscape(in.SKU), nil) r.Header.Set("Authorization", "Bearer "+req.Extra.Header.Get("X-Api-Key")) resp, err := http.DefaultClient.Do(r) if err != nil { return nil, nil, err } defer resp.Body.Close() if resp.StatusCode != 200 { return nil, nil, fmt.Errorf("stock lookup failed: %s", resp.Status) } var out struct{ Units int `json:"units"` } json.NewDecoder(resp.Body).Decode(&out) text := fmt.Sprintf("%d units of %s in stock.", out.Units, in.SKU) return &mcp.CallToolResult{Content: []mcp.Content{&mcp.TextContent{Text: text}}}, nil, nil }) http.Handle("/mcp", mcp.NewStreamableHTTPHandler(func(*http.Request) *mcp.Server { return s }, nil)) http.ListenAndServe(":8080", nil) } ``` ## Keys Don't give the wrapper a master key. Declare a header such as `X-Api-Key` when you connect the server, and forward whatever the agent sends to your API. The gateway passes it through untouched and never stores or logs it, so each user only sees their own data. ## Ship it - Run it anywhere that serves HTTPS: the same box as your API, a container, or a serverless function that keeps connections open. - Check that `initialize` and `tools/list` answer, then paste the URL into **Connect a server**. - Log `X-MCP-Co-Tz-Request-Id` so you can match a user's failed call to your own logs. Source: https://docs.mcp.co.tz/wrap --- # Listing without the gateway > A .mcp.co.tz address is optional. You can list your server with its own URL instead. Agents then call you directly, and because no traffic passes through us, there are no analytics. ## What changes | | .mcp.co.tz address | Own URL | | --- | --- | --- | | Where agents connect | `your-name.mcp.co.tz/mcp` | Your URL, shown on the listing | | Analytics and request log | Yes | No: we never see the calls | | Rate limiting, credential stripping | Yes, at the gateway | Up to you | | Moving hosts | Invisible to agents | Agents need the new URL | | Listing, review, health checks, tool sync | Yes | Yes | ## Choosing The setup guide asks right after authentication. Pick **My own URL** if you already run your own gateway and metrics, or you don't want a third party in the path. Your server must be public HTTPS, because agents reach it directly. The `your-name` part still names your listing page, `marketplace.mcp.co.tz/servers/your-name`. Calls to `your-name.mcp.co.tz` get `404 server_not_on_gateway`, pointing people to the listing. ## Switching later Open the server in the console and pick **Gateway and analytics** on the Changes tab. While a server is unpublished it switches at once. For a published server the switch goes to review, because it changes where agents connect. Analytics start with the first call through the gateway; nothing from before the switch can be recovered. With the API, send `PATCH /v1/servers/{id}` with `{"use_gateway": true}` or `false`. Registration takes the same field and defaults to `true`. Source: https://docs.mcp.co.tz/direct --- # Auth modes and pass-through keys > MCP.co.tz never issues or stores consumer keys. You declare which header carries your key; the gateway forwards that header and strips every other credential. | Mode | What consumers send | Use it when | | --- | --- | --- | | `api_key_header` | Your key in the header you choose, for example `X-Api-Key` or `Authorization: Bearer …` | Your API already has keys. Consumers pay you on your own terms. | | `none` | Nothing | Public, read-only or demo data. | ## Sync credentials If `tools/list` needs a key too, the setup guide asks for one. It's encrypted with AES-GCM and used only by MCP.co.tz to read your tool list during setup, the daily tool sync and health checks. > Never put a key in your server URL. Query strings end up in logs. Source: https://docs.mcp.co.tz/auth --- # Review guidelines > Every server is reviewed by a person before it's listed, and again when you move it to a new upstream URL or change its slug. - **The name is yours.** Brand names like `mpesa`, `crdb` or `vodacom` are reserved until you prove ownership. - **The tools match the listing.** Descriptions say what each tool really does, including side effects like sending messages or charging money. - **It answers.** The server completes an MCP handshake over HTTPS and lists at least one tool. - **It's safe.** No tools that collect credentials, impersonate others or act without the user's intent. Changes to your name, description and auth instructions go live immediately. Changes to the upstream URL or slug wait for review, and the old values keep working until then. Source: https://docs.mcp.co.tz/review --- # Reading usage and the request log > The console shows every call that passes the gateway: totals, error rate, p95 latency, unique clients, tools and the clients that call you. - **Analytics** compares any range with the one before it, splits latency by tool, and groups failures by cause with a sample request ID. - **Request log** lists individual calls for the last 30 days. Search by request ID, filter by tool or outcome. - **Notifications** arrive live in the console when health changes, review finishes or tools change, and by email for the important ones. Client names come from the MCP handshake's `clientInfo.name`. Unique clients are counted from hashed IPs that can't be reversed after 30 days. Source: https://docs.mcp.co.tz/usage --- # Moving your upstream > Your public address never changes. To move your server, change its upstream URL in the console; the new URL is checked, reviewed and switched without downtime. ### Deploy the new server Run it side by side with the old one. It must answer `initialize` and `tools/list`. ### Change the upstream URL In the console, open the server's Settings tab and paste the new URL. We run a handshake against it before saving. ### Wait for review The change waits for an admin. Agents keep reaching the old URL until it's approved, then switch on their next call. Source: https://docs.mcp.co.tz/moving --- # Use MCP.co.tz tools in Ngamia Agent > Ngamia Agent connects to any server on MCP.co.tz with its server URL and, when needed, the key header. In Ngamia Agent, open **Tools › Add MCP server** and paste the values from the listing's **Ngamia Agent** tab: ```json { "server_url": "https://sendafrica.mcp.co.tz/mcp", "auth_header": "X-Api-Key" } ``` Source: https://docs.mcp.co.tz/ngamia --- # Use MCP.co.tz tools in Claude > Claude Code and Claude Desktop both speak Streamable HTTP. ## Claude Code ```bash claude mcp add --transport http sendafrica https://sendafrica.mcp.co.tz/mcp --header "X-Api-Key: YOUR_API_KEY" ``` ## Claude Desktop and claude.ai Add a custom connector with the server URL from the listing. For servers that need a key, use the JSON config from the listing's **Claude & others** tab. Source: https://docs.mcp.co.tz/claude --- # Use MCP.co.tz tools in Cursor > Add the server to ~/.cursor/mcp.json (or .cursor/mcp.json in a project). ```json title="~/.cursor/mcp.json" { "mcpServers": { "sendafrica": { "url": "https://sendafrica.mcp.co.tz/mcp", "headers": { "X-Api-Key": "YOUR_API_KEY" } } } } ``` Source: https://docs.mcp.co.tz/cursor --- # Use MCP.co.tz tools in ChatGPT > ChatGPT connects to remote MCP servers as connectors. In ChatGPT, add a custom connector and paste the server URL from the listing. Servers that need a key work where your ChatGPT plan supports custom headers; otherwise use a server marked **No key**. Source: https://docs.mcp.co.tz/chatgpt --- # Any MCP client > Every server on MCP.co.tz speaks MCP over Streamable HTTP at https://.mcp.co.tz/mcp. POST JSON-RPC to the endpoint; open a GET stream for server-to-client messages; send DELETE to end a session. Keep the `Mcp-Session-Id` the server returns on `initialize`. ```bash curl https://sendafrica.mcp.co.tz/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -H "X-Api-Key: YOUR_API_KEY" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"my-agent","version":"1.0"}}}' ``` Source: https://docs.mcp.co.tz/any-client --- # Gateway reference > Every request to *.mcp.co.tz/mcp passes the same eight steps, measured at under 1 ms of overhead with 1,000 open streams. - **Resolve** the slug to a published server (cached in memory, refreshed on change). - **Status**: suspended or unpublished servers answer `404 server_not_found`. - **Rate limit** per caller, per server and globally (see [Rate limits](https://docs.mcp.co.tz/rate-limits)). - **Inspect** the JSON-RPC method, tool name and client name. Nothing else is read. - **Headers**: keep the declared auth header and MCP headers, strip cookies and other credentials. - **Proxy** to the upstream over a dialer that refuses private and internal addresses. - **Stream** SSE responses through without buffering. No first byte in 120 s returns `504`. - **Record** metadata for analytics, health and the request log. Responses carry `X-MCP-Co-Tz-Request-Id` and `X-MCP-Co-Tz-Trace-Id`. Quote the request ID when asking a publisher or us for help. Source: https://docs.mcp.co.tz/gateway --- # Error codes > Errors from the gateway itself. Your server's own errors pass through untouched. | HTTP | Code | Meaning | | --- | --- | --- | | `400` | `bad_request` | The request body couldn't be read. | | `404` | `server_not_found` | Unknown, unpublished or suspended slug, or a path other than /mcp. | | `404` | `server_not_on_gateway` | The publisher lists its own URL instead of a .mcp.co.tz address. Use the address on the listing. | | `405` | `method_not_allowed` | Use GET, POST or DELETE. | | `413` | `request_too_large` | Request body over 1 MB. | | `429` | `rate_limited` | A rate limit was hit. Wait for the number of seconds in Retry-After. | | `502` | `upstream_unreachable` | Couldn't connect to the server, the address is blocked, or the server answered with a redirect. | | `503` | `gateway_unavailable` | The gateway can't route right now. Retry with backoff. | | `504` | `upstream_timeout` | The server sent no first byte within 120 seconds. | Every error links back here: `error.data.docs` points at the row for its code. ```json title="Example body" { "jsonrpc": "2.0", "id": null, "error": { "code": -32029, "message": "Rate limit reached (ip). Retry after 12s.", "data": { "code": "rate_limited", "request_id": "req_e019c47a2bd8f1e60c5ab7d4", "docs": "https://docs.mcp.co.tz/errors#rate_limited" } } } ``` Source: https://docs.mcp.co.tz/errors --- # Platform API > The console, marketplace and admin all run on the same REST API at api.mcp.co.tz/v1. Public endpoints need no sign-in. ## Public | `GET /v1/public/servers` | Search. `q`, `category`, `sort` (popular, newest, az), `verified`, `limit`, `cursor`. | | --- | --- | | `GET /v1/public/servers/{slug}` | A listing with tools, uptime, health strip and connect snippets. | | `GET /v1/public/categories` | Categories with server counts. | | `GET /v1/public/featured` | Featured listings. | | `GET /v1/public/publishers/{slug}` | A publisher and their servers. | | `GET /v1/public/stats`, `/status` | Marketplace totals and the status page feed. | | `POST /v1/public/servers/{slug}/report` | Report a server to the trust team. | ## Servers | `POST /v1/orgs/{org}/setup-sessions` | Start the guided setup. Answer with `POST /v1/setup-sessions/{id}/answer`. | | --- | --- | | `GET /v1/orgs/{org}/servers` | Your organization's servers. | | `PATCH /v1/servers/{id}` | Update a listing. Upstream and slug changes go to review. | | `POST /v1/servers/{id}/sync` | Re-read tools now. | | `POST /v1/servers/{id}/submit`, `/unpublish` | Send for review, or take down. | ## Analytics | `GET /v1/servers/{id}/usage` | Totals and a time series. `range` = 24h, 7d or 30d. | | --- | --- | | `GET /v1/servers/{id}/analytics/compare` | This range against the previous one. | | `GET /v1/servers/{id}/analytics/latency` | p50 and p95, overall and per tool. | | `GET /v1/servers/{id}/analytics/errors` | Failures grouped by cause, with hints. | | `GET /v1/servers/{id}/analytics/clients` | Calls per client over time. | | `GET /v1/servers/{id}/requests` | The request log. Filter by `tool`, `outcome`, `request_id`. | ## Live events `GET /v1/events` is a Server-Sent Events stream of notifications for everything you can see: health changes, review results, tool syncs and invites. The console turns them into toasts. Mutating requests accept an `Idempotency-Key` header; a retry with the same key returns the first response. Source: https://docs.mcp.co.tz/api --- # Rate limits > Limits protect publishers from a single noisy caller. They apply per minute, with a token bucket so short bursts are fine. | Scope | Free | Pro | | --- | --- | --- | | Per caller, per server | 60 / min | 60 / min | | Per server, all callers | 600 / min | 3,000 / min | | Per caller, all servers | 300 / min | 300 / min | | Open streams per server | 200 | 200 | | Public API, per IP | 120 / min | 120 / min | Every response carries `X-RateLimit-Limit` and `X-RateLimit-Remaining`; a limited response adds `Retry-After`. Pro limits arrive with the Pro plan. Source: https://docs.mcp.co.tz/rate-limits --- # Changelog > What changed on MCP.co.tz. ## November 2026 - **Sign in with Camel Accounts.** The console and admin use your Camel Accounts login (one login across CamelTech apps). Sessions last 14 days of inactivity and you can sign out of every browser. - **Emails through MailAfrica.** Review results, health changes and team invites arrive from MCP.co.tz, one message per person. - **Live notifications.** The console updates as things happen, with toasts for health changes, review results and tool syncs. - **Resumable setup.** The guided setup is saved on the server, so you can leave and pick up from any device. - **Deeper analytics.** Period comparisons, p95 latency by tool, failures grouped by cause, and calls by client. Source: https://docs.mcp.co.tz/changelog