External integration surfaces
External integration surfaces are the machine-facing boundaries that let tools, services, and discovery systems use Explorer data. They separate protocol access, focused HTTP data access, operational log delivery, public page discovery, and feature-controlled behavior so each caller sees only the service state and data that the deployment can support.
Integration boundary
The service presents several distinct boundaries for external systems. MCP clients use a tool service for chain inspection. Browser and service clients use focused HTTP routes. Vercel sends application logs to an operational drain. Search systems use generated sitemap files to find public pages. Deployment settings and network feature data control which of these paths are available.
This diagram shows how external callers reach the service boundaries and how controls shape the result.
flowchart LR
C[MCP client] --> M[/mcp service]
B[Browser or HTTP client] --> A[/api HTTP surfaces]
V[Vercel log delivery] --> L[/api/log-drain]
E[Search system] --> S[Sitemap files]
D[Deployment settings] --> M
D --> A
D --> L
D --> S
G[Feature gate state] --> F[Feature-controlled views and data]
A --> F
M --> X[Solana and approved upstream data]
A --> X
L --> K[Grafana Cloud Loki]
S --> P[Public Explorer pages]
The MCP route provides one protocol boundary with service-level access checks. The HTTP API provides focused routes with request and upstream rules. The log drain provides a trusted delivery path for platform events. Sitemap generation publishes selected public routes. Feature controls show whether a service path or chain feature is enabled.
References: app/…/route.ts• L26-52 app/…/route.ts• L36-57 app/…/route.ts• L24-46 app/…/route.ts• L5-9 scripts/update-sitemap.ts• L72-100 app/…/FeatureGatesView.tsx• L43-56
MCP service
The MCP service gives an AI tool or another MCP client read-only access to decoded accounts and transactions. Its contract includes entity inspection and a basic health result. The /mcp boundary checks deployment state and caller access before it passes a request to the chain data service.
The service advertises supported Solana clusters and selects a server-side RPC endpoint for each one. Its health result lets the setup page and clients distinguish a ready service from one that is disabled, protected, unreachable, or broken.
See MCP service and telemetry for the protocol flow, tool surface, setup experience, health contract, and usage reporting.
References: app/…/route.ts• L18-48 app/…/dependencies.ts• L59-97 packages/…/server.ts• L80-138 app/…/mcp-clusters.ts• L1-11 app/…/mcp-health.ts• L5-81
HTTP API
The HTTP API exposes narrow server routes for browser features and approved service callers. Its route families cover naming, program metadata, security records, network state, token discovery and metadata, market and verification data, stake rewards, and deployment signals. Each route turns one request into one focused result while keeping input validation, cache behavior, provider credentials, and upstream error rules on the server.
Cluster-bound routes use server-selected endpoints. They reject missing, non-canonical, unknown, or caller-controlled cluster values before an upstream call. This prevents a request from selecting an unapproved node or creating alternate cache keys for the same resource.
Program metadata routes resolve the latest available IDL or published security record for a program. They validate the program and cluster first, return a stable response shape, and classify transient RPC trouble as an upstream error rather than a successful empty result.
Network routes expose supply and measured slot time for supported clusters. They return large numeric values without losing precision, apply an upstream deadline, and use different responses for invalid requests, missing cluster configuration, transient node trouble, and a node that refuses the requested method.
The token information route accepts one mint or a bounded list of valid mint addresses. It removes repeated addresses before applying the limit and always returns a content array. Callers can opt in to an on-chain metadata lookup for mints that the list provider does not return. That lookup uses a server-selected RPC endpoint and remains best effort, so a fallback failure does not remove valid list results.
The route distinguishes a real empty result from a total list-provider failure. A valid request with no matching tokens returns an empty success. If the provider fails and resolves nothing, the route returns 503 so callers and caches do not treat an outage as durable empty data. A partial provider result remains usable and is returned with an operational warning.
Focused market and verification routes adapt provider data into small stable responses. The token-price route validates a mint and returns a positive USD price or null when the provider has no usable price. CoinGecko and Jupiter expose a common verification result with an optional CoinGecko identifier, while Rugcheck exposes a normalized score. These routes keep provider keys on the server and separate missing data, invalid provider responses, rate limits, timeouts, and transport failures so callers do not mistake an outage for a valid result.
Search uses Jupiter discovery and can enrich missing token icons from chain asset data. It supports supported clusters, rejects unknown clusters, and can hide tokens that are not marked verified when the deployment flag is enabled. The search response remains a successful empty result when the query is empty, too long, unsupported by the selected custom cluster, or produces no usable provider tokens.
The token-image route retrieves an image for one mint through server-side asset data. It supports standard clusters, rejects custom clusters, and caches only a found image. Stake rewards are a separate mainnet-only surface controlled by deployment state and provider credentials. It first confirms that the address is a stake account, then returns a cached lifetime total from the external provider.
Other HTTP routes provide focused bridges to naming providers, metadata sources, RPC data, and deployment signals. The metadata proxy validates the initial and redirected target, preserves the target URI, drains complete successful bodies, and does not wait for bodies from rejected responses or redirects. It maps upstream failures to controlled statuses and applies separate browser and edge cache rules. These boundaries keep provider access and server credentials away from browser requests while giving product features stable response shapes.
See HTTP API and feature controls for route families, request contracts, upstream data flow, caching, and feature switches.
References: app/…/route.ts• L25-103 app/…/route.ts• L128-170 app/…/route.spec.ts• L46-186 app/…/route.spec.ts• L189-342 app/…/route.ts• L36-92 app/…/route.spec.ts• L35-117 app/…/route.spec.ts• L20-109 app/…/route.spec.ts• L38-253 app/…/route.spec.ts• L40-353 app/…/route.ts• L18-70 app/…/route.ts• L18-50 app/…/route.test.ts• L47-82 app/…/route.test.ts• L183-275 app/…/route.ts• L48-96 app/…/route.ts• L17-35 app/…/route.ts• L15-36 app/…/route.ts• L18-109 app/…/endpoint.test.ts• L40-110 app/…/endpoint.test.ts• L112-350 app/…/route.ts• L30-79 app/…/route.ts• L5-9 app/…/route.spec.ts• L20-73 app/…/route.spec.ts• L23-80 app/…/fetch-resource.integration.spec.ts• L98-136 app/…/route.spec.ts• L17-86 app/…/route.test.ts• L30-159 app/…/route.ts• L25-81 app/…/route.spec.ts• L36-170 app/…/route.ts• L18-86 app/…/route.test.ts• L28-149 app/…/route.ts• L30-86 app/…/route.test.ts• L25-124 app/…/route.ts• L25-97 app/…/route.test.ts• L25-115
Log drain
The log drain moves platform log events out of the application runtime. Vercel validates the endpoint and then sends newline-delimited JSON events. The route accepts empty deliveries, skips malformed lines, groups usable events by source and level, and forwards the batch to Grafana Cloud Loki for dashboards and alerts.
The boundary checks a shared secret before it accepts events. It reports delivery failure when required credentials are absent or Loki rejects the push. This response tells the platform whether delivery completed.
References: app/…/route.ts• L24-53 app/…/route.ts• L69-135 app/…/route.spec.ts• L30-123
Sitemap surfaces
The sitemap surface helps search systems find public Explorer pages without exposing API routes or dynamic route templates as crawl targets. A build route report supplies the static pages. Known program-account addresses add the account pages. The generator combines these inputs into a sitemap index and child sitemaps.
The route policy excludes API routes, dynamic templates, and pages that are not intended for public discovery. This keeps search results focused on product pages rather than service setup or internal interfaces.
This diagram shows how build output becomes the public discovery surface.
flowchart LR
B[Build route report] --> D[Static route selection]
P[Known program addresses] --> A[Account URL selection]
D --> S[Default sitemap]
A --> T[Accounts sitemap]
S --> I[Sitemap index]
T --> I
I --> C[Search systems]
References: scripts/update-sitemap.ts• L7-16 scripts/update-sitemap.ts• L30-50 scripts/update-sitemap.ts• L72-100 scripts/update-sitemap.ts• L146-160 scripts/update-sitemap.ts• L197-227
Feature controls
Feature controls decide whether an integration or product view is available in a deployment or network. A feature gate records whether a chain feature has an activation epoch on a supported cluster.
The main controlled behaviors are:
- The MCP endpoint is unavailable when its deployment flag is not enabled.
- The metadata proxy is unavailable when metadata access is disabled.
- Feature-gate Open Graph images require their deployment flag.
- The search surface can remove unverified token results when its deployment flag is enabled.
- The feature-gate view separates activated features from relevant upcoming features for the selected standard cluster.
- A custom cluster does not enumerate feature gates or request the live epoch and slot-time data needed for activation countdowns.
The feature-gate view uses activation data for the selected cluster and shows activation data from other standard clusters for upcoming features. Activated features open newest-first and can be sorted in the URL. Long upcoming lists open as a short preview and can be expanded. Rows link to the feature identity and its related SIMD proposals, while an available proposal document can be read as markdown and an unavailable document keeps its source link.
Upcoming relevance follows the normal cluster progression. Mainnet shows features active on both devnet and testnet. Devnet shows features active on testnet but not mainnet. Testnet shows features with no testnet activation. The view exposes paired SIMD links rather than raw parallel arrays, and it omits incomplete pairs.
The feature-gate registry combines schedule data with chain activation checks. Schedule data supplies planned feature details for pending entries, while mainnet activation comes from an on-chain read. This lets the Explorer show planned, active, unactivated, missing, and unreachable states as different outcomes. The refresh path retries rate-limited RPC reads but does not retry other HTTP failures, and it can clear stale activation values when the chain no longer confirms them.
References: app/…/env.ts• L1-16 app/…/route.ts• L22-36 app/…/route.ts• L18-35 app/…/route.ts• L59-83 app/…/route.test.ts• L183-234 app/…/env.ts• L1-9 app/…/is-feature-activated.ts• L5-15 app/…/filter-upcoming-features.ts• L5-25 app/…/filter-upcoming-features.spec.ts• L27-93 app/…/partition-features.ts• L28-101 app/…/partition-features.spec.ts• L39-142 app/…/fetch-feature-gate-information.ts• L11-47 app/…/preview-upcoming-features.ts• L1-13 app/…/sort-activated-features.ts• L7-13 app/…/FeatureGatesView.tsx• L43-145 app/…/FeatureGateTable.tsx• L29-92 app/…/ClusterEpoch.tsx• L6-23 app/…/UpcomingFeatures.tsx• L17-55 app/…/FeatureGatesView.spec.tsx• L96-233 app/…/FeatureGateTable.spec.tsx• L43-108 app/…/FeatureGatesView.stories.tsx• L58-77 app/…/FeatureGateTable.stories.tsx• L96-129 app/…/FeatureGateTable.responsive.stories.tsx• L23-59 scripts/update-feature-gates.ts• L7-19 scripts/update-feature-gates.ts• L44-55 scripts/update-feature-gates.ts• L77-99 scripts/…/module-graph.spec.ts• L29-42 scripts/…/rpc.spec.ts• L65-113 scripts/…/schedule.spec.ts• L29-79 scripts/…/schedule.spec.ts• L82-129
Boundary relationships
The surfaces answer different questions and should remain separate. MCP presents tools for an agent. HTTP routes present focused resource results. The log drain presents a delivery result for platform logs. Sitemap files present public page URLs. Feature controls state whether a path or chain feature is available.
| Surface | Caller model | Primary result | Availability signal |
|---|---|---|---|
| MCP service | MCP client | Read-only inspection tools and health result | Endpoint flag and caller access rules |
| HTTP API | Browser or HTTP client | Focused JSON or metadata response | Route validation, upstream state, and deployment flags |
| Log drain | Vercel platform | Accepted or failed log delivery | Drain secret, Loki credentials, and upstream response |
| Sitemap files | Search system | Public page URL lists | Build route data and explicit exclusions |
| Feature controls | Explorer view or integration | Activated, upcoming, enabled, or disabled state | Deployment configuration or cluster activation data |
The boundaries share contracts even when they serve different callers. The MCP landing page probes the MCP route. HTTP features depend on stable route responses and cache behavior. Sitemap output depends on the public route policy. The child pages are the starting points for changes inside the MCP and HTTP boundaries.
References: app/…/mcp-health.ts• L18-27 app/…/page.tsx• L5-12 app/…/route.ts• L43-57 app/…/route.ts• L44-103 app/…/route.ts• L40-109 app/…/route.ts• L24-41 scripts/update-sitemap.ts• L146-160 app/…/FeatureGatesView.tsx• L68-117
Change checklist
When these files or sections are changed, remember to consider these:
- Keep the MCP landing page probe aligned with the
/mcpresponse and health contract. - Keep server-only credentials and RPC choices behind the HTTP and MCP boundaries.
- Keep token-info's address cap applied after de-duplication. Preserve the array response for both single and batch callers.
- Keep token-info's optional fallback server-resolved and best effort. Preserve the difference between a valid empty result and a total list-provider outage.
- Keep token-price's positive-price and no-price responses distinct. Preserve no-store behavior for configuration, provider, and schema failures.
- Keep verification adapters aligned with their provider response shapes. Preserve the shared
verifiedresult and the optional CoinGecko identifier or Rugcheck score. - Keep provider response normalization stable when optional market or verification fields are absent. Preserve configured-key and keyless endpoint behavior where both are supported.
- Keep search's cluster handling and unverified-token flag aligned with its cache headers and empty-result contract.
- Keep canonical query validation aligned with cluster-specific RPC routes. Do not let extra, repeated, encoded, custom, or caller-selected cluster values reach an upstream node or create alternate cache keys.
- Keep IDL and security-record validation, response shapes, retry rules, and error messages aligned with their callers.
- Keep supply and slot-time numeric precision, cluster endpoint selection, deadline order, cache tiers, and upstream error classes aligned.
- Keep token-image caching limited to found images and keep custom-cluster rejection explicit.
- Keep stake-reward gating, mainnet-only behavior, stake-account checks, provider credentials, and rate-limit handling aligned.
- Keep RPC deadlines below the function and browser deadlines. Preserve the distinction between retryable upstream trouble, a refused RPC method, and a bad request shape.
- Keep metadata response handling complete for streamed success bodies and prompt for rejected responses or redirects.
- Keep metadata proxy error mapping,
Retry-Afterhandling, URI encoding, and browser-only cache behavior aligned with callers. - Keep deployment flags consistent with the status callers receive. A disabled path must not look like an upstream data failure.
- Keep route response shapes and cache rules aligned with browser and service callers.
- Keep metadata target checks applied to the initial URL and every redirect.
- Keep log-drain verification and delivery secrets separate. A failed Loki push must remain a non-success response.
- Keep sitemap exclusions aligned with the pages that should be public.
- Keep feature-gate cluster partitioning, upcoming-feature relevance, SIMD pairing, sort state, preview state, and activation countdowns aligned with the selected cluster.
- Keep the feature-gate refresh pipeline safe to load under its cron runtime. Treat schedule rows as planned data and on-chain reads as the source of mainnet activation.
- Keep cross-links and child-page scope aligned when a machine-facing boundary changes its role.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| Token-info receives invalid JSON, an invalid address, an unsupported cluster, or too many distinct addresses | The route returns 400 before the provider is called. | Send the published body shape with valid addresses and a supported cluster. |
| Token-info list lookup fails and resolves no tokens | The route returns 503 instead of a cacheable empty result. | Treat the response as provider unavailability. |
| Token-info on-chain fallback fails | Valid list results still return, but missing metadata is not filled. | Treat fallback data as optional and inspect server RPC health when needed. |
| A route receives a non-canonical query or a caller-selected cluster endpoint | The request is rejected before it can create a new cache key or reach an unapproved node. | Send only the published query shape and use a supported server-owned cluster. |
| Supply or slot-time receives a missing, malformed, repeated, extra, custom, or unknown cluster query | The route returns an uncached 400 without asking the node. | Use one canonical query with a supported standard cluster. |
| A configured cluster has no server endpoint | The route returns a briefly cached 500 and does not call RPC. | Configure the cluster endpoint before exposing its network data. |
| An RPC route receives a timeout, transient transport error, refused method, or invalid response | The caller receives a classified retryable, configuration, or upstream error instead of misleading cached data. | Preserve the route's deadline order, status tier, and error cache policy. |
| A provider returns a missing optional field or an invalid response shape | The route returns a normalized partial result when supported, or a 502 when the contract cannot be trusted. | Treat optional fields as optional and validate required provider fields before returning success. |
| Token-price receives an invalid mint, lacks its Jupiter key, or gets a provider failure | The route returns a controlled 400, 500, 429, 502, or 500 response instead of a price. | Validate the mint first and keep configuration and upstream errors non-cacheable. |
| Token-price receives a malformed body or a non-positive price | The route returns { price: null } and avoids presenting invalid market data as a price. | Treat only a positive requested-mint value as a usable price. |
| A verification provider returns a timeout, transport failure, rate limit, or invalid body | The route returns a controlled error rather than a false verification or score. | Preserve provider status handling, schema checks, and short error caching. |
Rugcheck uses a provider 400 message outside the known no-data set | The route preserves the provider error status and reports the unexpected condition. | Keep the no-data message mapping synchronized with the provider contract. |
| Search has no Jupiter key or its provider returns an unusable result | Search returns a successful empty token list. | Treat empty discovery as a valid result only when the provider path is available; inspect configuration for persistent empties. |
| Search's unverified-token flag is enabled | Unverified or missing-verification tokens do not appear in results. | Confirm the deployment flag before treating the filtered result as a provider defect. |
| MCP endpoint is disabled or access checks fail | MCP clients cannot use the service. | Check deployment state and caller credentials before client setup. |
| A required HTTP route flag is disabled | The feature receives a controlled unavailable response instead of upstream data. | Check the route's deployment setting before debugging the provider. |
| A program metadata request has an invalid address or cluster | IDL or security-record resolution stops with 400 and does not call the resolver. | Send valid program and cluster parameters. |
| An IDL or security-record upstream call has transient RPC trouble | The route returns 502 rather than an empty metadata result. | Retry only the supported transient failures and treat the result as upstream-unavailable. |
| The token image request uses a custom cluster or finds no image | The route returns a controlled 400 or an uncached empty image result. | Use a supported standard cluster and treat the image as optional. |
| Stake rewards are disabled, not configured, requested off mainnet, or the address is not a stake account | The route refuses the request before spending provider quota. | Check the feature flag, mainnet cluster, address type, and provider key. |
| Stake rewards provider rate-limits or rejects the configured key | The route returns a controlled provider error and does not expose provider credentials. | Keep rate-limit and key-rejection handling distinct and inspect provider configuration. |
| The metadata target or redirect resolves to a private address | The proxy blocks the request. | Use a public HTTP(S) metadata host. |
| The metadata URI is malformed, uses an unsupported protocol, or is decoded twice | The proxy rejects the request or fetches a different resource than the caller named. | Pass a valid HTTP(S) URI and preserve its encoded path and query. |
| Metadata upstream returns a timeout, connection failure, rejected status, or oversized or unsupported body | The proxy returns a controlled error status and does not expose the upstream body as a success. | Handle the status as an upstream or proxy failure and follow its cache policy. |
| Drain credentials are missing or Loki rejects a push | Platform logs do not reach the log store and delivery reports failure. | Check the drain secret and Loki settings. |
| Sitemap generation cannot read build route data | Refreshed sitemap files are not written. | Run the required build information step first. |
| A feature gate lacks activation data for the selected cluster | The feature can appear upcoming or unavailable even when active elsewhere. | Refresh the registry and inspect the selected cluster data. |
| A feature-gate page uses a custom cluster | Feature-gate enumeration, upcoming lists, and activation countdowns are not available for that cluster. | Switch to a supported standard cluster. |
| A feature has incomplete SIMD or SIMD-link data | The incomplete proposal pair is omitted from the feature row. | Keep proposal identifiers and links aligned before publishing feature data. |
| A SIMD proposal fetch fails or returns a non-success response | The feature remains visible with an unavailable proposal state instead of proposal text. | Use the retained source link and inspect access to the proposal source. |
| The feature schedule has no pending section or a pending row changes shape | The feature refresh fails instead of silently writing incomplete feature records. | Keep the pending schedule schema and import boundary aligned with the upstream document. |
Key files
| File | Why to read it |
|---|---|
| app/…/route.ts | Defines the public MCP boundary and service access checks. |
| app/…/mcp-health.ts | Defines the health states used by clients and the setup page. |
| app/…/route.ts | Shows a bounded token data boundary with an optional server-side fallback. |
| app/…/route.spec.ts | States the token route's input, output, fallback, and provider-failure contract. |
| app/…/route.ts | Defines cluster-aware token discovery and the deployment-controlled verification filter. |
| app/…/route.test.ts | States search discovery, cluster, enrichment, cache, and unverified-token behavior. |
| app/…/route.spec.ts | States program IDL validation, response shaping, retry, and upstream error behavior. |
| app/…/route.spec.ts | States program security-record validation, canonical lookup, and error behavior. |
| app/…/route.spec.ts | Shows cluster-specific network measurement, canonical query, deadline, cache, and error contracts. |
| app/…/route.spec.ts | Shows cluster-specific supply data, numeric output, deadline, cache, and RPC failure contracts. |
| app/…/route.ts | Defines the gated, mainnet-only stake reward boundary and provider error policy. |
| app/…/route.ts | Defines the server-side token image lookup and its cache distinction. |
| app/…/route.ts | Defines the focused market-price boundary and its provider error contract. |
| app/…/route.spec.ts | States price validation, no-price, schema, cache, and provider-failure behavior. |
| app/…/route.ts | Defines the CoinGecko and keyless GeckoTerminal verification bridge. |
| app/…/route.ts | Defines the Jupiter verification bridge and normalized result. |
| app/…/route.ts | Defines the Rugcheck score bridge and provider no-data handling. |
| app/…/fetch-resource.integration.spec.ts | Shows the body-drain and early-response guarantees for external metadata retrieval. |
| app/…/route.ts | Defines a feature-controlled HTTP bridge to external metadata. |
| app/…/endpoint.test.ts | States the proxy's feature, target validation, error mapping, cache, header, and URI-preservation contract. |
| app/…/route.ts | Defines the trusted platform log delivery boundary. |
| scripts/update-sitemap.ts | Defines the public route policy and generated sitemap structure. |
| app/…/filter-upcoming-features.ts | Defines which upcoming feature gates are relevant to each standard cluster. |
| app/…/partition-features.ts | Defines activated and upcoming feature data, ordering, other-cluster activations, and SIMD pairing. |
| app/…/partition-features.spec.ts | States the feature partition and data-shaping contract. |
| app/…/FeatureGatesView.tsx | Shows cluster-specific feature-gate sections, sorting, previews, and activation countdowns. |
| app/…/FeatureGateTable.tsx | Shows the shared feature row contract for activated and upcoming features. |
| app/…/FeatureGatesView.spec.tsx | States custom-cluster polling, sections, URL sort state, previews, and countdown behavior. |
| app/…/FeatureGateTable.spec.tsx | States feature row links, responsive row content, sorting, empty states, and show-more behavior. |
| app/…/fetch-feature-gate-information.ts | Defines how linked SIMD proposal content or an unavailable proposal state reaches feature-gate pages. |
| scripts/update-feature-gates.ts | Shows how schedule data and chain reads refresh feature state. |
| scripts/…/schedule.ts | Defines how pending schedule data becomes planned feature state. |
| scripts/…/rpc.ts | Defines how on-chain activation checks become feature state. |
| docs/mcp-service.md | Child page for MCP protocol flow, health, setup, and telemetry. |
| docs/http-api-and-feature-controls.md | Child page for HTTP route families and feature-controlled behavior. |