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
4 changes: 2 additions & 2 deletions src/examples/clientSse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const dirname = path.dirname(filename);
dotenv.config({ path: path.resolve(dirname, '../../.env') });

const SERVER_URL = 'https://actors-mcp-server.apify.actor/sse';
// We need to change forward slash / to underscore _ in the tool name as Anthropic does not allow forward slashes in the tool name
const SELECTED_TOOL = 'apify_rag-web-browser';
// We need to change forward slash / to underscore -- in the tool name as Anthropic does not allow forward slashes in the tool name
const SELECTED_TOOL = 'apify--rag-web-browser';
const QUERY = 'web browser for Anthropic';

if (!process.env.APIFY_TOKEN) {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/clientStdio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const SERVER_PATH = path.resolve(dirname, '../../dist/index.js');
const NODE_PATH = execSync(process.platform === 'win32' ? 'where node' : 'which node').toString().trim();

const TOOLS = 'apify/rag-web-browser,lukaskrivka/google-maps-with-contact-details';
const SELECTED_TOOL = 'apify_rag-web-browser'; // We need to change / to _ in the tool name
const SELECTED_TOOL = 'apify--rag-web-browser'; // We need to change / to _ in the tool name

if (!process.env.APIFY_TOKEN) {
console.error('APIFY_TOKEN is required but not set in the environment variables.');
Expand Down
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ app.route(Routes.ROOT)
return;
}
try {
log.info(`Received GET message at: ${req.url}`);
log.info(`Received GET message at: ${Routes.ROOT}`);
await processParamsAndUpdateTools(req.url);
res.status(200).json({ message: `Actor is using Model Context Protocol. ${HELP_MESSAGE}` }).end();
} catch (error) {
Expand All @@ -76,7 +76,7 @@ app.route(Routes.ROOT)
app.route(Routes.SSE)
.get(async (req: Request, res: Response) => {
try {
log.info(`Received GET message at: ${req.url}`);
log.info(`Received GET message at: ${Routes.SSE}`);
await processParamsAndUpdateTools(req.url);
transport = new SSEServerTransport(Routes.MESSAGE, res);
await mcpServer.connect(transport);
Expand All @@ -89,7 +89,7 @@ app.route(Routes.SSE)
app.route(Routes.MESSAGE)
.post(async (req: Request, res: Response) => {
try {
log.info(`Received POST message at: ${req.url}`);
log.info(`Received POST message at: ${Routes.MESSAGE}`);
if (transport) {
await transport.handlePostMessage(req, res);
} else {
Expand Down
Loading