-
Notifications
You must be signed in to change notification settings - Fork 78
feat: Decouple Actor from mcp-server, add ability to call Actorized MCP and load tools #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I splitted the tools to separate file in |
|
@MQ37 thanks! But it would be better to have separate PRs, it is becoming very big and intractable. First, we need to decouple Actor and server. You also need to separate README, Actor README is going to be different from the package README |
I agree with you that this is a large PR but I think these changes go hand in hand with each other and it would be easier to do both of them at once for us - I am also working on integrating this into the |
|
I'm afraid, I don't really like it, there is no clear separation of the Actor code and a new mcp-server code :( |
It is still a WIP, but the main idea is that all tools will be in the |
… up old tools.ts, separate Actor readme
…unction and updating types.
…ly export ApifyMcpServer from the package
|
I think the structure is better now .... but this PR is huge because we couple together structure and tools refactoring. There are two things I'm not happy with:
So this is still work in progress |
MQ37
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments, otherwise nice work @jirispilka 👍
src/actor/const.ts
Outdated
| actors: [ | ||
| 'apify/instagram-scraper', | ||
| 'apify/rag-web-browser', | ||
| 'lukaskrivka/google-maps-with-contact-details', | ||
| ], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default list of loaded Actors/tools is not only Actor related (is used in stdio.ts), I think we should move it to src/const.ts
0325f4c to
52ccf0c
Compare
* docs: document input schema processing (#58) document Actor input schema processing in README * add VS Code instructions to README (#62) * Add vs code instructions --------- Co-authored-by: mbaiza27 <[email protected]> Co-authored-by: Jiří Spilka <[email protected]> * ci: run prerelase manually (#70) run prerelase manually * get apify api url base from env var --------- Co-authored-by: Marc Baiza <[email protected]> Co-authored-by: mbaiza27 <[email protected]> Co-authored-by: Jiří Spilka <[email protected]>
* docs: document input schema processing (#58) document Actor input schema processing in README * add VS Code instructions to README (#62) * Add vs code instructions --------- Co-authored-by: mbaiza27 <[email protected]> Co-authored-by: Jiří Spilka <[email protected]> * initial working draft of proxy actorized mcp servers * fix tests * fix proxy tool name handling * ci: run prerelase manually (#70) run prerelase manually * organize, fix passing of apify token * fix env var name * fix imports * get standby url from actor id, check if is mcp server based on actor name for now * Actor MCP server load default Actors * get standbyUrlBase from env var * fix standby url base, use dns friendly owner name * get mcp path from definition * Remove unused import from actor.ts * console.log to logger * Remove extra slash from MCP server URL construction * Simplify actor tools loading logic * Refactor actorOwnerDNSFriendly to handle special characters * Add TODO comment for reworking actor definition fetch logic * refactor mcp actor and utils, use real Actor ID as standby URL * fix: get-actor-definition-default-build (#73) * fix get default build in get actor definition * fix tests * fix double import, lint --------- Co-authored-by: Marc Baiza <[email protected]> Co-authored-by: mbaiza27 <[email protected]> Co-authored-by: Jiří Spilka <[email protected]> Co-authored-by: Jiri Spilka <[email protected]>
|
I know, one test is failing x I didn't have time to do it before leaving the office. |
|
@jirispilka thank you for fixing the tests 👍 Tested Actorized MCPs and normal Actors in Claude desktop (stdio) and on staging via SSE and everything works ✔️ |
|
@MQ37 cool. Thanks! We should also test existing Actor, whether it works via SSE. I'll create a task for this |
Tested again as Actor and it works 👍 |
Closes #55
Closes #56
The idea is that we expose the MCP server and the Express app that can then be extended with other endpoints - so it can be used in the platform MCP server.The new proposed solution is to expose MCP server and tools/prompt/resources functionalty as additional library and keep the stdio (and the Actor for now - legacy).