π¦
Shared
Shared HTTP client, error types, blockchain constants, and schemas for Crypto APIs MCP servers
0 installs
Trust: 37 β Low
Blockchain
Ask AI about Shared
Powered by Claude Β· Grounded in docs
I know everything about Shared. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
@cryptoapis-io/mcp-shared
Shared HTTP client, error types, blockchain constants, and schemas used by all Crypto APIs MCP servers.
API Version: Compatible with Crypto APIs version 2024-12-12
What's Inside
- HTTP client β
CryptoApisHttpClientfor making authenticated REST API calls - Error types β
CryptoApisErrorwith code, status, and details - Blockchain constants β
BLOCKCHAIN_NETWORKS,EVM_BLOCKCHAINS,UTXO_BLOCKCHAINS, chain IDs, network mappings - Zod schemas β Blockchain/network schemas, cursor/offset pagination, request metadata
- Credits β
formatCreditsForDescription()and credit types for tool cost metadata - Confirmation β Token-based confirmation flow for dangerous actions (sync, delete, activate)
- Config β
loadSharedConfig()with support for per-request API keys viarunWithApiKey() - System info tool β Built-in
system_infotool providing blockchain, credits, and API documentation
Installation
npm install @cryptoapis-io/mcp-shared
Usage
This package is primarily used as a dependency by other @cryptoapis-io/mcp-* packages. You typically don't use it directly unless building a custom MCP server for Crypto APIs.
import {
CryptoApisHttpClient,
loadSharedConfig,
EVM_BLOCKCHAINS,
UTXO_BLOCKCHAINS,
EvmBlockchainSchema,
CursorPaginationSchema,
formatCreditsForDescription,
} from "@cryptoapis-io/mcp-shared";
const config = loadSharedConfig();
const client = new CryptoApisHttpClient(config);
const result = await client.request("GET", "/blockchain-data/ethereum/mainnet/addresses/{address}/balance");
License
MIT
