Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions backend/MCP_Execution_Server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion backend/MCP_Execution_Server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"description": "",
"dependencies": {
"@chainsafe/libp2p-gossipsub": "^14.1.0",
"@google/genai": "^0.13.0",
"@libp2p/identify": "^3.0.27",
"@libp2p/tcp": "^10.1.8",
"@modelcontextprotocol/sdk": "^1.7.0",
Expand All @@ -40,4 +41,4 @@
"nodemon": "^3.1.0",
"typescript": "^5.8.2"
}
}
}
3 changes: 3 additions & 0 deletions backend/MCP_Execution_Server/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export const config = {
apiKey: process.env.NEYNAR_API_KEY ?? "0x",
signerUuid: process.env.NEYNAR_SIGNER_UUID ?? "0x",
},
gemini:{
apiKey: process.env.GEMINI_API_KEY ?? "0x",
},
openai: {
apiKey: process.env.OPENAI_API_KEY,
},
Expand Down
27 changes: 20 additions & 7 deletions backend/MCP_Execution_Server/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReclaimClient } from '@reclaimprotocol/zk-fetch';
import { ReclaimClient } from "@reclaimprotocol/zk-fetch";

import { config } from "./config.js";

Expand All @@ -9,25 +9,38 @@ import { UserService } from "./services/user.service.js";
import { AVSService } from "./services/avs.service.js";
import { IpfsService } from "./services/ipfs.service.js";
import { DBService } from "./services/db.service.js";
import { GeminiAiService } from "./services/gemini_ai.service.js";

/**
* Main application entry point
*/
async function main() {
const db = new DBService(config.supabase.SUPABASE_URL, config.supabase.SUPABASE_ANON_KEY);
const db = new DBService(
config.supabase.SUPABASE_URL,
config.supabase.SUPABASE_ANON_KEY,
);

const reclaim = new ReclaimClient(
config.reclaim.appId,
config.reclaim.appSecret,
)

);
const geminiai = new GeminiAiService(config.gemini.apiKey as string);
const ai = new AIService(config.openai.apiKey as string);
const avs = new AVSService(
config.network.rpcBaseAddress,
config.network.privateKey,
);
const ipfs = new IpfsService(config.pinata.apiKey, config.pinata.secretApiKey);
const neynar = new NeynarService(config.neynar.apiKey, config.neynar.signerUuid, reclaim, avs, ipfs);
const ipfs = new IpfsService(
config.pinata.apiKey,
config.pinata.secretApiKey,
);
const neynar = new NeynarService(
config.neynar.apiKey,
config.neynar.signerUuid,
reclaim,
avs,
ipfs,
);
const user = new UserService(neynar, ai, db);

// Initialize services
Expand All @@ -38,13 +51,13 @@ async function main() {
reclaim,
ipfs,
avs,
geminiai,
};
const executionServer = new ExecutionServer(config, services);

try {
// Create and start server
await executionServer.start();

} catch (error) {
console.error("Fatal error in main():", error);
process.exit(1);
Expand Down
Loading