SolanaFutarchyGovernanceGateway
A dedicated server providing comprehensive interface capabilities for the Futarchy governance framework operating on the Solana blockchain. It streamlines the retrieval of decentralized autonomous organization (DAO) metadata, facilitates querying proposal details, and supports the initiation of new governance submissions. This system is engineered to simplify access to complex decentralized governance data structures for both end-users and application developers.
Author

TanmayDhobale
Quick Info
Actions
Tags
Solana Futarchy Governance Gateway (SFGG)
This repository hosts a server component engineered for seamless interaction with the Futarchy protocol deployed on the Solana network.
Implementation Guide
-
Obtain the source code: bash git clone
cd futarchy-mcp -
Resolve dependencies: bash npm install
-
Configuration of the RPC Endpoint:
- Navigate to
src/server.ts. -
Modify the Solana
Connectioninitialization object with your desired RPC Uniform Resource Locator (URL): typescript const connection = new Connection('YOUR_RPC_URL_HERE'); -
Recommended endpoints include:
- Mainnet Beta:
https://api.mainnet-beta.solana.com - Devnet:
https://api.devnet.solana.com - Or substitute with credentials for a privately hosted RPC service.
- Mainnet Beta:
-
Initiate the development runtime environment: bash npm run dev
Exposed Service Endpoints
Decentralized Autonomous Organization (DAO) Operations
GET /daos- Retrieve a catalog of all registered DAOs.GET /daos/:id- Fetch details pertaining to a singular DAO, identified by its address.GET /daos/:id/proposals- List all active or historical proposals associated with a specified DAO.POST /daos/:id/proposals- Submit a novel governance proposal for a designated DAO. (Note: This feature is currently untested pending the availability of a DAO instantiation endpoint.)-
Required Payload Structure:
{ "descriptionUrl": "string", "baseTokensToLP": "number", "quoteTokensToLP": "number" }
Proposal Lifecycle Management
GET /proposals/:id- Retrieve comprehensive data for an individual proposal based on its unique identifier.
Validation Procedures
API route verification can be executed using standard utilities such as Postman or curl. By default, the service operates on TCP port 9000.
Illustrative curl invocations:
bash
Fetch all known DAOs
curl http://localhost:9000/daos
Query a specific DAO entity
curl http://localhost:9000/daos/
Obtain proposals linked to a DAO
curl http://localhost:9000/daos/
Execute proposal creation
curl -X POST http://localhost:9000/daos/
Model Context Protocol (MCP) Server Integration for Cursor
This software package incorporates an MCP server component enabling Cursor to interface with the Futarchy backend via custom tooling definitions.
MCP Server Initialization Sequence
-
Execute the setup script to manage dependency installation, project compilation, and Cursor configuration linkage: bash chmod +x setup.sh ./setup.sh
-
Manual Configuration Alternative:
-
Install prerequisites and compile the project artifacts: bash npm install npm run build
-
Access or establish the configuration file located at
~/.cursor/mcp.json. - Incorporate the subsequent routing configuration (ensure the file path specified in
commandis accurate):
{
"mcpServers": {
"futarchy-routes": {
"command": "node",
"args": ["
Leveraging the MCP Server within Cursor
Developers can invoke the following functions directly within Cursor's conversational interface:
getDaos- Requests the complete registry of DAOs from thefutarchy-routesservice endpoint.getDao- Retrieves data for an explicitly identified DAO.getProposals- Fetches the proposal manifest for a specified DAO.getProposal- Queries the details of a singular proposal.createProposal- Initiates the submission of a new proposal against a DAO entity.
Example command prompt instruction for Cursor:
Utilize the getDaos instrument to fetch the roster of all DAOs managed by the futarchy-routes infrastructural component.
For exhaustive details concerning the MCP server architecture, refer to src/mcp/README.md.
Community Sentiment Assessment Feature
The Futarchy MCP Server now incorporates an integrated sentiment evaluation module. This module assesses community feelings reflected in asynchronous data streams from platforms like Discord and Twitter pertaining to specific governance proposals.
Operational Mechanism
- The sentiment analysis utility aggregates relevant textual data pertaining to the targeted proposal from Discord and Twitter sources.
- Natural Language Processing (NLP) algorithms are then applied to quantify the observed sentiment.
- Analysis results are segmented into predefined thematic classifications (e.g., Tokenomics, Protocol Parameters, etc.).
- A structured output is generated, summarizing sentiment scores, highlighting primary concerns, and enumerating key positive aspects, optimized for consumption by user interfaces.
Illustrative Output Structure
{ "proposalId": "F3hsZzWinRAHbr6CUxdkUFBCH8qNk6Mi9Zfu3PMX49BC", "sentimentScore": -0.8, "primaryCategory": "Tokenomics", "categories": [ { "name": "Tokenomics", "score": 0.4 }, { "name": "Protocol Upgrades", "score": 0.3 }, { "name": "Partnerships Integrations", "score": 0.2 }, { "name": "Protocol Parameters", "score": 0.1 } ], "summary": "The proposal to launch a new Horizon token for the Aave ecosystem has faced significant backlash from the community...", "keyPoints": [ "The proposed token launch is seen as unnecessary and potentially harmful to the Aave token and community.", "The revenue-sharing model is perceived as frontloaded and unfair, favoring early years when adoption and revenue may be low.", "There is a desire to maintain the Aave token as the primary governance and utility token for the ecosystem." ], "concerns": [ "Dilution of the Aave token's value and attention.", "Misalignment of incentives with the proposed revenue-sharing model.", "Creation of a separate entity that could compete with the Aave ecosystem.", "Lack of transparency and community involvement in the decision-making process." ], "sources": { "discord": true, "twitter": true } }
Invocation Methodology
To utilize this sentiment evaluation capability within your integrated MCP environment, employ a call structure similar to this:
javascript const result = await mcp_futarchy_routes_getProposalSentiment({ proposalId: "F3hsZzWinRAHbr6CUxdkUFBCH8qNk6Mi9Zfu3PMX49BC" });
This asynchronous operation will return the computed sentiment assessment corresponding to the provided proposal identifier.
