Skip to content

Commit

Permalink
fix: mcp log error
Browse files Browse the repository at this point in the history
  • Loading branch information
thearyanag committed Feb 16, 2025
1 parent 13dc676 commit 51f8ee4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solana-agent-kit",
"version": "1.4.7",
"version": "1.4.8",
"description": "connect any ai agents to solana protocols",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
16 changes: 9 additions & 7 deletions src/mcp/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,13 @@ export async function startMcpServer(
version: string;
}
) {
const server = createMcpServer(actions, solanaAgentKit, options);
console.log("MCP server created");
const transport = new StdioServerTransport();
console.log("Stdio transport created");
await server.connect(transport);
console.log("MCP server started");
return server;
try {
const server = createMcpServer(actions, solanaAgentKit, options);
const transport = new StdioServerTransport();
await server.connect(transport);
return server;
} catch (error) {
console.error("Error starting MCP server", error);
throw error;
}
}

0 comments on commit 51f8ee4

Please sign in to comment.