Skip to content

Choose a URL

An SDK client calls tools through one MCP URL. The URL decides which tools the client sees and which rules apply to them. One API key works on every URL.

Pass mcpUrl (mcp_url in Python) as a path on https://mcp.goassay.ai or as the full URL. The SDK checks the path’s shape when you build the client, so a typo is a ConfigError at once. Whether a tool set exists, or is shared with you, is the server’s answer on the first call.

Path What it serves Who can open it
/ Everything: the whole listed catalogue. You find tools with tools.search. This is the default. Any key
/my/{slug} Your own tool set: its live Draft, with its entries and rules. Keys of your organization
/my/{slug}@{n} Published version n of your tool set. The version must exist. Keys of your organization
/@{handle}/{slug} A shared tool set: its latest public version. Any key
/@{handle}/{slug}@{n} Public version n of a shared tool set. Any key
/u/{token}, /u/{token}@{n} A link-only tool set. The token is a secret: keep the URL in an environment variable or a secret store, never in code, commits or logs. Any key that has the link
/c/{category} Every listed tool in one category. Any key
/@{handle} Every listed tool of one provider. Their names are {handle}__{tool}. Any key

{slug}, {handle}, {token}, {category} and {n} come from the URL you want to use. The tool set page in the web app shows its URL.

A version pin @{n} fixes the tool set’s contents. It does not promise that a provider stays available, and it does not grant permission to use the tools.

Filters work on any path. They only narrow what the URL serves; they never grant access.

Filter What it does
?tools=get_weather Only the named tools, up to 50, comma-separated. One name gives a single-tool URL. On /, the named tools are listed directly. Names the URL does not serve are ignored and reported in the list’s _meta["assay/ignoredTools"].
?tools=get_weather@1 Pins the tool’s contract major version (name@N). Calls go only to providers of that version.
?category=weather Only tools in these categories.
?free=1 Only free tools. Paid-only tools are not served, and no call through this URL is ever charged.
?discovery=auto, full or search How the tools are listed: all of them (full), the search tools (search), or one of the two by size (auto).

A person can allow an agent to use a tool set. By default, that grant works only through the tool set’s own URL. The same tools called through / get TOOL_NOT_ALLOWED. Only connected servers in the web app sets this too.

So when your agent’s access is a tool set, build the client for that tool set’s URL (/my/{slug}, /@{handle}/{slug} or /u/{token}, with or without @{n}).

The default needs no mcpUrl. Search, read the contract, then call.

import { Assay } from "@goassay-ai/sdk";
const assay = new Assay(); // "/", reads ASSAY_API_KEY
const found = await assay.tools.search("weather forecast", { limit: 5 });
console.log(found.results.map((t) => t.name));
const res = await assay.tools.call("get_weather", { city: "Lisbon" });
console.log(res.structuredContent);
from goassay import Assay
with Assay() as assay: # "/", reads ASSAY_API_KEY
found = assay.tools.search("weather forecast", limit=5)
print([t["name"] for t in found.results])
res = assay.tools.call("get_weather", {"city": "Lisbon"})
print(res.structured_content)

tools.list() returns the tools a URL lists, with their prices. On a tool set URL, that is the set’s tools.

import { Assay } from "@goassay-ai/sdk";
// Your tool set's Draft. Use "/my/research@2" for published version 2,
// or "/@acme/research" for a shared one.
const research = new Assay({ mcpUrl: "/my/research" });
const { tools, meta } = await research.tools.list();
console.log(tools.map((t) => t.name));
console.log(meta["assay/toolsetVersion"]); // the version served, when there is one
const res = await research.tools.call("get_weather", { city: "Lisbon" });

For a link-only tool set, read the URL from the environment. The SDK shows it as /u/… in toString, toJSON and logs.

const shared = new Assay({ mcpUrl: process.env.ASSAY_LINK_URL }); // https://mcp.goassay.ai/u/...
from goassay import Assay
# Your tool set's Draft. Use "/my/research@2" for published version 2,
# or "/@acme/research" for a shared one.
with Assay(mcp_url="/my/research") as research:
listed = research.tools.list()
print([t["name"] for t in listed.tools])
print(listed.meta.get("assay/toolsetVersion")) # the version served, when there is one
res = research.tools.call("get_weather", {"city": "Lisbon"})

For a link-only tool set, read the URL from the environment. The SDK shows it as /u/… in repr and logs.

import os
shared = Assay(mcp_url=os.environ["ASSAY_LINK_URL"]) # https://mcp.goassay.ai/u/...

The list’s _meta may also carry assay/sharingEnds (sharing of this tool set is ending) and assay/renamed (the handle in the URL was renamed).

A program that calls one tool can use a single-tool URL. The client then sees only that tool.

import { Assay } from "@goassay-ai/sdk";
const weather = new Assay({ mcpUrl: "/?tools=get_weather" });
const res = await weather.tools.call("get_weather", { city: "Lisbon" });
console.log(res.structuredContent);
from goassay import Assay
with Assay(mcp_url="/?tools=get_weather") as weather:
res = weather.tools.call("get_weather", {"city": "Lisbon"})
print(res.structured_content)

Add @1 to the name (/?tools=get_weather@1) to stay on contract version 1.

assay.at(urlOrPath) returns a client for another URL on the same MCP host. It shares the first client’s API key, signers, spend limits and spend record, payment hook, HTTP client and logger. It keeps its own price quotes, because the same tool can cost a different amount on two URLs.

import { Assay } from "@goassay-ai/sdk";
const everything = new Assay(); // "/"
const kit = everything.at("/@acme/twitter-kit@3"); // a shared tool set, version 3
const { tools } = await kit.tools.list();
await kit.tools.call("acme__get_profile", { user: "x" }); // a provider tool, sent unchanged
await everything.tools.call("get_weather", { city: "Lisbon" });
from goassay import Assay
with Assay() as everything: # "/"
kit = everything.at("/@acme/twitter-kit@3") # a shared tool set, version 3
listed = kit.tools.list()
kit.tools.call("acme__get_profile", {"user": "x"}) # a provider tool, sent unchanged
everything.tools.call("get_weather", {"city": "Lisbon"})

at() is also on AsyncAssay. Close the client it came from; closing a client made by at() does nothing.

For a URL on another host, build a new client.

A client with a signer can pay on every URL you build it for, within its spend limits. The SDK keeps no list of URLs that may pay; the URLs in your code are your choice. To keep a client free-only:

  • use an API key without the Pay permission (a Free calls only key): a paid tool is then AUTH_SCOPE_MISSING, and nothing is signed;
  • or add ?free=1 to its URL: paid-only tools are not served, and no call is charged;
  • or refuse in onPayment (on_payment), which sees every payment before it is signed.

The same tool can quote a different price on a tool set URL, because the set’s entry rules apply.

Standard tools have names such as get_weather. A provider’s own tools are named {handle}__{tool}, for example acme__get_profile. Send every name unchanged, as tools.list() or tools.search returns it. Tool names in Go further has the details.

Error or code Meaning Fix
ConfigError “… is not an MCP URL Assay serves” The path or a filter has a shape the MCP host does not serve. Use one of the shapes above.
ConfigError “at() takes a path or a URL on this client’s MCP origin” at() got a URL on another host. Build a new client for that host.
McpUrlNotFoundError (MCP_URL_NOT_FOUND) The host serves no such URL to your key: an unknown slug or version, another organization’s /my/ URL, a tool set no longer shared, or a handle with no listed tools. Check the path and version in the web app. Not retryable.
TOOL_NOT_ALLOWED Your agent’s access does not allow the tool through this URL. For a tool set grant, use the tool set’s URL.
TOOL_NOT_IN_TOOLSET The URL does not serve the tool, or the tool is paid-only on a ?free=1 URL. Call a tool the URL lists, or use another URL.