Skip to main content
Glama

Algorand MCP

by GoPlausible
developer:docs:rest-apis:restendpoints.md5.32 kB
title: REST Endpoints Algorand maintains SDK support in [JavaScript](../../sdks/javascript/#install-sdk-for-runtime), [Python](../../sdks/python/#install-sdk), [Java](../../sdks/java/#install-sdk-for-runtime) and [Go](../../sdks/go/#install-go-sdk). More languages are also available through [Community Provided SDKs](https://developer.algorand.org/ecosystem-projects/?from_query=sdk#net-sdk). The Algorand SDKs offer both standalone and network-connected development functionality. # Algod, Indexer and KMD REST Endpoints Integration with the Algorand protocol daemon (`algod`), Algorand key management daemon (`kmd`) or Algorand Indexer daemon (`algorand-indexer`) is performed using a set of REST APIs. All REST methods and models are fully described within reference documentation. - [Algod REST APIs](../../rest-apis/algod/) - [Indexer REST APIs](../../rest-apis/indexer/) - [KMD REST APIs](../../rest-apis/kmd/) _**Algod REST Endpoints**_ !!! info Algorand provides endpoints for [Open API Specification version 2 (OAS2)](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md) and [OAS3](https://github.com/OAI/OpenAPI-Specification/tree/main/versions). These APIs are described using the [Open API Specification version 3 (OAS3)](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md). [Algod REST Endpoints OAS3 specfile](https://github.com/algorand/go-algorand/blob/master/daemon/algod/api/algod.oas3.yml?raw=true)(.yml) Run Algod in Postman OAS3. [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/7417958-60ff1bfc-b5f2-42aa-83b0-6888f0d4c2f4?action=collection%2Ffork&collection-url=entityId%3D7417958-60ff1bfc-b5f2-42aa-83b0-6888f0d4c2f4%26entityType%3Dcollection%26workspaceId%3Dab8846ef-efa3-4872-a5e5-c2992de6b69c) OAS2 Algod specfile [here](https://github.com/algorand/go-algorand/blob/master/daemon/algod/api/algod.oas2.json?raw=true) _**Indexer REST Endpoints**_ The `algorand-indexer` daemon provides its API from the _host:port_ defined by the _--server_ flag specified at start up. The default port is 8980. [Indexer REST Endpoints OAS3 specfile](https://www.github.com/algorand/indexer/blob/develop/api/indexer.oas3.yml?raw=true)(.yml) Run Indexer in Postman OAS3. [![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/7417958-2e088cf0-8c78-44b0-8b08-9a832b120d1a?action=collection%2Ffork&collection-url=entityId%3D7417958-2e088cf0-8c78-44b0-8b08-9a832b120d1a%26entityType%3Dcollection%26workspaceId%3Dab8846ef-efa3-4872-a5e5-c2992de6b69c) OAS2 Indexer specfile [here](https://github.com/algorand/indexer/blob/develop/api/indexer.oas2.json?raw=true) _**KMD REST Endpoints**_ !!! info All examples in this section assume the data directory is ~/node/data This API is described using the [Open API Specification version 2 (OAS 2)](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md). The `kmd` daemon serves it's API from the _kmd.net_ files found in the _~/node/data_ and _~/node/data/kmd-{version}_ directories. The `kmd` daemons provide their API specifications in a [swagger json](https://github.com/algorand/go-algorand/blob/master/daemon/kmd/api/swagger.json) format available from this endpoint: Algorand Key Management Daemon (`kmd`) ```zsh curl http://$(cat ~/node/data/kmd-v0.5/kmd.net)/swagger.json ``` !!! info The `kmd` daemon is only automatically started when using the `goal` command line tool with specific commands requiring key management access. If you require API access to `kmd` you will need to manually start the process with `goal` using the command: `goal kmd start -d <data-dir>`. If the kmd is started with the above command it never times out and stops running unless a timeout flag is specified with the -t flag. The default of 0 is no timeout. # Security Token Most REST calls will also require an API token header to authenticate with the API server. For both `algod` and `kmd` the token is automatically generated by the daemon at startup and stored in a file. `algod` places _algod.token_ in the _~/node/data_ directory. `kmd` places _kmd.token_ the _~/node/data/kmd-{version}_ directory. Security tokens can be regenerated for both using the `goal node generatetoken` command. | Daemon | Header Identifier | Header Value Defined Via | | --------- | ------------------- | ------------------------------------------- | | `algod` | X-Algo-API-Token | file: ~/node/data/algod.token | | `kmd` | X-KMD-API-Token | file: ~/node/data/kmd-\{version\}/kmd.token | | `indexer` | X-Indexer-API-Token | | Each SDK provides a method for setting these headers. Most REST tools provide a method for setting additional headers. To set the header with a `curl` command use the `-H` parameter. For example, to make a call to retrieve a specific block, use the following curl command: ```zsh curl http://$(cat ~/node/data/algod.net)/v2/blocks/16486179 -H "X-Algo-API-Token: $(cat ~/node/data/algod.token)" ``` In the above example, the block information will be displayed if the block exists on the local node. If the node is a non-Archival node, blocks older than 1000 blocks will not be available.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GoPlausible/algorand-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server