MCP server
@allswapio/mcp-server is a read-only Model Context Protocol (MCP) server for AllSwap. It runs on your own machine and talks to your MCP client over stdio. It offers three tools, needs no API key or other credentials, has no runtime dependencies, and requires Node.js 22 or later.
It cannot quote prices, create or track orders, read balances, sign anything or move funds. The three tools read AllSwap's public asset catalog, return a fixed list of AllSwap's official channels, and build block-explorer links for transaction hashes. For quotes and orders, see the Partner API documentation.
Install and configure
Most MCP clients read a JSON file with an mcpServers object. Add this entry (strict JSON: no comments, no trailing commas). The client starts the server itself with npx, which downloads the package on first use; -y skips the install prompt. Node.js 22 or later must be on your PATH.
{
"mcpServers": {
"allswap": {
"command": "npx",
"args": ["-y", "@allswapio/mcp-server"]
}
}
}The package installs one command, allswap-mcp. After you save the configuration, restart or reload the client so it starts the server, then check that the three tools are listed.
Where the entry goes differs by client. The notes below follow each client's own documentation as read on 2026-11-26; if your version behaves differently, trust its documentation over this page.
Claude Desktop
Open Settings, then Developer, then Edit Config. This opens claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json). Add the allswap entry inside your existing mcpServers object, or use the block as is if the file has none. Save, then quit Claude Desktop completely and start it again. Source: MCP documentation, “Connect to local MCP servers”.
{
"mcpServers": {
"allswap": {
"command": "npx",
"args": ["-y", "@allswapio/mcp-server"]
}
}
}To check it: after the restart, click the “Add files, connectors, and more” indicator in the conversation input box, move over Connectors, click Manage connectors and select allswap to see its tools.
Claude Code
Add it from the command line; the -- separates Claude Code's options from the server command. By default the server is stored for the current project only (scope local). --scope project writes it to .mcp.json in the project root so the project can share it, and --scope user makes it available in all your projects. Source: Claude Code documentation, MCP.
claude mcp add --transport stdio allswap -- npx -y @allswapio/mcp-serverclaude mcp add --transport stdio --scope project allswap -- npx -y @allswapio/mcp-serverTo check it: run claude mcp list, which shows a health status next to each server, or run /mcp inside a Claude Code session.
Cursor
Put the block in .cursor/mcp.json for one project, or in ~/.cursor/mcp.json for every project. The command must be on your system path or be a full path. Cursor's field table lists "type": "stdio" as required although its examples leave it out, so the sample below includes it. Source: Cursor documentation, MCP.
{
"mcpServers": {
"allswap": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@allswapio/mcp-server"]
}
}
}To check it: open Customize and make sure the server's toggle is on; its tools are then listed under Available Tools in chat. The Output panel (Cmd+Shift+U) with MCP Logs selected shows initialization and errors.
VS Code
Run MCP: Add Server from the Command Palette, choose Command (stdio) and enter npx -y @allswapio/mcp-server. Enter a unique server ID (for example allswap), then choose where to keep it: Global (Copilot Global) for a personal configuration shared across your workspaces, or, when the guided flow offers it, a workspace-root .mcp.json that you can share with your team through source control.
If you edit the files yourself, the format depends on the file. VS Code's editor-managed mcp.json (the workspace .vscode/mcp.json or the profile mcp.json) uses a top-level servers object; a workspace-root .mcp.json uses a top-level mcpServers object. Sources: VS Code documentation, MCP servers and MCP configuration reference.
{
"servers": {
"allswap": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@allswapio/mcp-server"]
}
}
}{
"mcpServers": {
"allswap": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@allswapio/mcp-server"]
}
}
}To check it: run Chat: Open Customizations and open MCP Servers, where VS Code lists and manages your servers.
Environment variable
ALLSWAP_API_ORIGIN changes the origin that list_supported_assets reads (default https://allswap.io). It must be an http: or https: origin with no path, query or credentials, such as https://allswap.io. Otherwise the command prints one line to stderr and exits with code 2 before reading any input. Most setups never set it.
To set it, put it in the env object of the entry, for example "env": { "ALLSWAP_API_ORIGIN": "https://allswap.io" }, in a client that supports an env object.
Try it by hand
The server reads one JSON-RPC 2.0 message per line on stdin and writes one reply per line on stdout. This sends initialize, then asks for a Bitcoin explorer link:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_tx_explorer_url","arguments":{"network":"btc","txHash":"4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"}}}' \
| npx -y @allswapio/mcp-serverThe second reply contains "explorerUrl": "https://mempool.space/tx/4a5e1e4b…a33b" (shortened here). Tool results arrive as one text content item whose text is the JSON object shown in the examples below.
Run in a container
No container image is published. To run the server in a container, clone the repository and build the image yourself (the Dockerfile is in the repository, not in the npm package):
git clone https://github.com/allswapio/mcp-server
cd mcp-server
docker build -t allswap-mcp .{
"mcpServers": {
"allswap": {
"command": "docker",
"args": ["run", "--rm", "-i", "allswap-mcp"]
}
}
}Then use "command": "docker" with these args in the client configuration. The image runs as a non-root user and needs outbound HTTPS only for list_supported_assets.
Tools
All three tools carry the annotation readOnlyHint: true; only list_supported_assets has openWorldHint: true, because it is the only one that uses the network.
list_supported_assets
Fetches AllSwap's public asset catalog (GET https://allswap.io/api/v2/assets, no authentication; specification at /docs/openapi.json) and filters it. The only tool that uses the network.
Scroll the table sideways to view more columns.
| Field | Type | Description |
|---|---|---|
symboloptional | string | Exact symbol match, case-insensitive (usdt matches USDT). |
chainIdoptional | string | Case-insensitive substring of the asset's chainId (eip155 matches every EVM chain). |
quotableOnlyoptional | boolean | true drops assets whose quotable is false. |
limitoptional | integer | 1 to 200, default 25. A value outside that range uses the default. |
Returns observedAt, stale, totalAssets (entries in the catalog), matchedAssets (entries that passed the filters) and returnedAssets (up to limit matched entries, exactly as the API returns them; see the specification for their fields).
Errors. A non-2xx response, a redirect (redirects are not followed), a response body over 5 MiB, a network error or a timeout (8 seconds) returns { "error": "…" } with isError: true.
{
"symbol": "usdt",
"chainId": "tron",
"limit": 1
}{
"observedAt": "2026-11-25T15:35:33.021848959Z",
"stale": false,
"returnedAssets": [
{
"assetId": "tron:mainnet/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"chainId": "tron:mainnet",
"decimals": 6,
"destinationGroups": [
"a",
"b"
],
"minAmountIn": "100000000",
"quotable": true,
"sourceGroups": [
"a",
"b"
],
"symbol": "USDT",
"version": 1
}
]
}{
"error": "Catalog endpoint returned HTTP 503"
}get_official_channels
Takes no arguments and makes no network request. Use it to check that a link, account or email address that claims to be AllSwap is on the official list.
Returns a fixed object with: website, documentation, OpenAPI and verification page links; support and security contact (service@allswap.io); Telegram and X accounts; the Chrome Web Store extension ID and link; the operating company (Haohang Network Technology Co., Limited), its Hong Kong Business Registration No. and D-U-N-S number; its registered address; the compliance page; and the statement that AllSwap issues no token, presale or airdrop. It has no error case.
{}{
"website": "https://allswap.io",
"docs": "https://allswap.io/docs",
"openApiSpec": "https://allswap.io/docs/openapi.json",
"verifyPage": "https://allswap.io/verify",
"supportEmail": "[email protected]",
"securityEmail": "[email protected]",
"operatingEntity": "Haohang Network Technology Co., Limited",
"compliancePage": "https://allswap.io/compliance",
"nativeTokenPolicy": "None — AllSwap does not issue any native platform token, presale, or airdrop."
}get_tx_explorer_url
Returns a block-explorer URL for a transaction hash on a supported mainnet network. It makes no network request and checks only the format of the hash, not whether the transaction exists.
Scroll the table sideways to view more columns.
| Field | Type | Description |
|---|---|---|
networkrequired | string | Network key, case-insensitive (see the table below). |
txHashrequired | string | Transaction hash; surrounding whitespace is ignored. |
Returns { network, txHash, explorerUrl, valid }. network and txHash are echoed only when they are strings (otherwise null). For an unknown network, a hash in the wrong format or a non-string argument, explorerUrl is null and valid is false; this is a normal result, not an error.
{
"network": "btc",
"txHash": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b"
}{
"network": "btc",
"txHash": "4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
"explorerUrl": "https://mempool.space/tx/4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b",
"valid": true
}{
"network": "eth",
"txHash": "0x1234"
}{
"network": "eth",
"txHash": "0x1234",
"explorerUrl": null,
"valid": false
}Network keys and hash formats
Each network can be named by a short key or by its chain id; both are accepted.
Scroll the table sideways to view more columns.
| Network keys | Hash format | Explorer |
|---|---|---|
eth, eip155:1 | 0x + 64 hex characters | etherscan.io |
arb, eip155:42161 | 0x + 64 hex characters | arbiscan.io |
base, eip155:8453 | 0x + 64 hex characters | basescan.org |
bsc, eip155:56 | 0x + 64 hex characters | bscscan.com |
op, eip155:10 | 0x + 64 hex characters | optimistic.etherscan.io |
pol, eip155:137 | 0x + 64 hex characters | polygonscan.com |
avax, eip155:43114 | 0x + 64 hex characters | snowtrace.io |
btc, bip122:000000000019d6689c085ae165831e93 | 64 hex characters | mempool.space |
ltc, bip122:12a765e31ffd4059bada1e25190f6e98 | 64 hex characters | litecoinspace.org |
doge, bip122:1a91e3dace36e2be3bf030a65679fe82 | 64 hex characters | blockchair.com |
bch, bip122:000000000000000000651ef99cb9fcbe | 64 hex characters | blockchair.com |
zec, bip122:00040fe8ec8471911baa1db1266ea15d, bip122:0007104ccda289427919efc39dc9e4d4 | 64 hex characters | blockchair.com |
tron, tron:mainnet | 64 hex characters | tronscan.org |
sol, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp | Base58, 32 to 96 characters | solscan.io |
ton, ton:mainnet | 64 hex characters (Base64 hashes are not linked) | tonscan.org |
xrp, ripple:0 | 64 hex characters | xrpscan.com |
stellar, stellar:public | 64 hex characters | stellar.expert |
near, near:mainnet | Base58, 32 to 96 characters | nearblocks.io |
sui, sui:mainnet | Base58, 32 to 96 characters | suiscan.xyz |
aptos, aptos:mainnet | 0x + 1 to 64 hex characters | explorer.aptoslabs.com |
The eip155:<id> and bip122:<hash> keys and solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp are CAIP-2 chain ids. tron:mainnet, ton:mainnet, ripple:0 and near:mainnet are aliases: the chain ids AllSwap's public asset API uses for those chains. stellar:public, sui:mainnet and aptos:mainnet are plain aliases. For Zcash, bip122:00040fe8ec8471911baa1db1266ea15d is the genesis-hash CAIP-2 id and bip122:0007104ccda289427919efc39dc9e4d4 is the chain id that the asset API returns for Zcash.
Protocol notes
- Transport: stdio only, one JSON-RPC 2.0 message per line. There is no remote or HTTP endpoint.
- Supported protocol revisions:
2025-11-25,2025-06-18,2025-03-26and2024-11-05. Only theinitialize-based revisions are implemented; revision2026-07-28is not. initializeanswers with the client'sprotocolVersionwhen it is one of those revisions, with2025-11-25when the client asks for any other revision, and with2024-11-05when the client sends none. The only capability istools.- Methods:
initialize,ping,tools/list,tools/call. Notifications (messages withoutid) get no reply. Any other method, includingserver/discover, returns-32601. - Other errors: an unknown tool, or a tool name that is not a string, returns
-32602. A message that is not a valid JSON-RPC 2.0 request (wrongjsonrpcvalue, amethodthat is not a string, or anidthat is not a string, a number or null) returns-32600. That reply carries the request'sidwhen it is a string, a number or null, andid: nullotherwise, including when the request has noid. A line that is not JSON returns-32700withid: null. An unexpected failure returns-32603(with the sameidrule) and the server keeps running. - Batches (JSON arrays) are not supported and return
-32600.
Verify what you run
An MCP server runs on your machine with your user's permissions, so check where it comes from. Everything below is public.
- npm package: @allswapio/mcp-server. This page documents the 1.0.x versions.
- Source: github.com/allswapio/mcp-server, with a mirror at codeberg.org/allswap/mcp-server.
- Official MCP Registry:
io.github.allswapio/mcp-server(themcpNameinpackage.json; the registry metadata isserver.jsonin the repository). Look it up in the registry. - License: MIT. Copyright is held by Haohang Network Technology Co., Limited.
- Security reports: send them privately to service@allswap.io; do not open a public issue. The policy is SECURITY.md in the repository.
Check provenance
Versions from 1.0.1 are published by the repository's GitHub Actions release workflow, from their version tags, with npm provenance. To check it, install the package in an empty project and run npm audit signatures. npm documents the command as verifying the registry signatures of downloaded packages and also their provenance attestations.
npm install @allswapio/mcp-server
npm audit signatures1 package has a verified registry signature
1 package has a verified attestationProvenance ties the package to its source repository and build; it does not by itself show that the code is free of defects, so read the source if that matters to you. Version 1.0.0 was published by hand and carries no provenance.
Related
- Multichain Address & Memo Validator and its npm package multichain-memo-address-validator: check that a mainnet address is well formed and whether its address family commonly needs a memo or destination tag, locally with no network calls.
- Partner API documentation: quotes and orders over HTTP, with an API key.
- Official channel verification: check whether a website, account or email claiming to be AllSwap is official.