Solana-Futarchy-Governance-Interface
A robust server solution designed to streamline interaction with the Futarchy governance framework operating on the Solana blockchain. It abstracts the complexity of decentralized autonomous organization (DAO) data retrieval, proposal querying, and the initiation of new governance suggestions, serving as a unified endpoint for developers and end-users managing decentralized decision-making assets.
Author

TanmayDhobale
Quick Info
Actions
Tags
Governance Nexus for Futarchy on Solana
This repository hosts a specialized backend service facilitating seamless communication with the Futarchy protocol deployed on the Solana network.
Installation and Startup Procedures
- Source Acquisition: Clone the project repository to your local workspace:
git clone <repository-url>
cd futarchy-mcp
- Dependency Resolution: Install necessary node modules:
npm install
-
Endpoint Configuration (RPC): Modify the Solana connection string within
src/server.ts. Locate theConnectioninstantiation and supply your required RPC endpoint URL:typescript const connection = new Connection('YOUR_RPC_URL_HERE');Valid network endpoints include:- Mainnet Beta:
https://api.mainnet-beta.solana.com - Devnet:
https://api.devnet.solana.com - Alternatively, specify a custom, dedicated RPC endpoint.
- Mainnet Beta:
-
Service Initialization: Execute the command to launch the development environment:
npm run dev
Accessible API Endpoints
The server exposes RESTful interfaces for governance data management.
Decentralized Organization (DAO) Endpoints
GET /daos- Retrieves a comprehensive registry of all recognized DAOs.GET /daos/:id- Fetches detailed information for a single DAO identified by its unique identifier.GET /daos/:id/proposals- Lists all active and past governance proposals associated with a specific DAO.POST /daos/:id/proposals- Submits a novel governance proposal to the specified DAO.- Request Payload Schema:
json { "descriptionUrl": "string", "baseTokensToLP": "number", "quoteTokensToLP": "number" }
Governance Proposal Endpoints
GET /proposals/:id- Retrieves the complete data structure for an individual proposal using its ID.
Verification and Local Testing
Standard tooling such as Postman or curl can be employed to validate API functionality. The service defaults to operating on TCP port 9000.
Sample curl invocation sequences:
# Fetch all DAOs
curl http://localhost:9000/daos
# Inspect a specific DAO instance
curl http://localhost:9000/daos/<dao-address>
# Enumerate proposals linked to a DAO
curl http://localhost:9000/daos/<dao-address>/proposals
# Propose a new motion
curl -X POST http://localhost:9000/daos/<dao-address>/proposals \
-H "Content-Type: application/json" \
-d '{ "descriptionUrl": "https://example.com/proposal", "baseTokensToLP": 1000, "quoteTokensToLP": 1000 }'
Model Context Protocol (MCP) Integration for Cursor IDE
This package incorporates an MCP server component, enabling direct integration and tooling within the Cursor development environment to interface with the Futarchy backend.
MCP Server Provisioning Steps
- Automated Setup: Execute the provided setup script to handle dependency installation, project compilation, and Cursor configuration updates:
chmod +x setup.sh
./setup.sh
- Manual Configuration:
- Compile the project artifacts:
bash npm install npm run build - Append the necessary routing definition to your Cursor configuration file,
~/.cursor/mcp.json(creating it if necessary). Ensure the path incommandpoints to the compiled JavaScript artifact:json { "mcpServers": { "futarchy-routes": { "command": "node", "args": ["<absolute-path-to-project>/dist/mcp/bin/mcp-futarchy.js"] } } }
Utilizing MCP Tools within Cursor
Cursor chat interfaces gain access to specialized functions targeting the Futarchy system:
getDaos: Retrieves the complete DAO directory.getDao: Fetches data for a DAO instance by identifier.getProposals: Obtains the proposal list for a designated DAO.getProposal: Retrieves details for a specific proposal ID.createProposal: Initiates the creation of a new governance motion.
Usage example within Cursor's command line or chat interface:
Engage the getDaos utility via the futarchy-routes backend to fetch the totality of registered DAOs.
Refer to [src/mcp/README.md] for comprehensive documentation on the MCP server architecture.
Proposal Sentiment Intelligence Module
The Futarchy MCP Server now integrates advanced sentiment analysis capabilities, analyzing community feedback derived from Discord discussions and Twitter feeds concerning active proposals. This feature furnishes deeper insight into community perception, aiding in more judicious governance outcomes.
Operational Flow
- The sentiment module aggregates relevant data streams from Discord and Twitter pertaining to a nominated proposal.
- Natural Language Processing (NLP) algorithms are applied to quantify prevailing sentiment.
- Data is segmented into thematic classifications (e.g., Tokenomics, Parameter Adjustments, etc.).
- A structured output is generated, encompassing an overall summary, salient points, and expressed reservations.
- The output format is optimized for seamless consumption by front-end applications.
Illustrative Analytical 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
}
}
Invoking Sentiment Retrieval via MCP
To execute this analysis within your application code interfacing with the MCP route handler:
const analysisReport = await mcp_futarchy_routes_getProposalSentiment({
proposalId: "F3hsZzWinRAHbr6CUxdkUFBCH8qNk6Mi9Zfu3PMX49BC"
});
This function call yields the full sentiment assessment for the designated proposal identifier.
