File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ const dirname = path.dirname(filename);
2222dotenv . config ( { path : path . resolve ( dirname , '../../.env' ) } ) ;
2323
2424const SERVER_URL = 'https://actors-mcp-server.apify.actor/sse' ;
25- // We need to change forward slash / to underscore _ in the tool name as Anthropic does not allow forward slashes in the tool name
26- const SELECTED_TOOL = 'apify_rag -web-browser' ;
25+ // We need to change forward slash / to underscore -- in the tool name as Anthropic does not allow forward slashes in the tool name
26+ const SELECTED_TOOL = 'apify--rag -web-browser' ;
2727const QUERY = 'web browser for Anthropic' ;
2828
2929if ( ! process . env . APIFY_TOKEN ) {
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ const SERVER_PATH = path.resolve(dirname, '../../dist/index.js');
2424const NODE_PATH = execSync ( process . platform === 'win32' ? 'where node' : 'which node' ) . toString ( ) . trim ( ) ;
2525
2626const TOOLS = 'apify/rag-web-browser,lukaskrivka/google-maps-with-contact-details' ;
27- const SELECTED_TOOL = 'apify_rag -web-browser' ; // We need to change / to _ in the tool name
27+ const SELECTED_TOOL = 'apify--rag -web-browser' ; // We need to change / to _ in the tool name
2828
2929if ( ! process . env . APIFY_TOKEN ) {
3030 console . error ( 'APIFY_TOKEN is required but not set in the environment variables.' ) ;
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ app.route(Routes.ROOT)
6161 return ;
6262 }
6363 try {
64- log . info ( `Received GET message at: ${ req . url } ` ) ;
64+ log . info ( `Received GET message at: ${ Routes . ROOT } ` ) ;
6565 await processParamsAndUpdateTools ( req . url ) ;
6666 res . status ( 200 ) . json ( { message : `Actor is using Model Context Protocol. ${ HELP_MESSAGE } ` } ) . end ( ) ;
6767 } catch ( error ) {
@@ -76,7 +76,7 @@ app.route(Routes.ROOT)
7676app . route ( Routes . SSE )
7777 . get ( async ( req : Request , res : Response ) => {
7878 try {
79- log . info ( `Received GET message at: ${ req . url } ` ) ;
79+ log . info ( `Received GET message at: ${ Routes . SSE } ` ) ;
8080 await processParamsAndUpdateTools ( req . url ) ;
8181 transport = new SSEServerTransport ( Routes . MESSAGE , res ) ;
8282 await mcpServer . connect ( transport ) ;
@@ -89,7 +89,7 @@ app.route(Routes.SSE)
8989app . route ( Routes . MESSAGE )
9090 . post ( async ( req : Request , res : Response ) => {
9191 try {
92- log . info ( `Received POST message at: ${ req . url } ` ) ;
92+ log . info ( `Received POST message at: ${ Routes . MESSAGE } ` ) ;
9393 if ( transport ) {
9494 await transport . handlePostMessage ( req , res ) ;
9595 } else {
You can’t perform that action at this time.
0 commit comments