Posts: 1,133
Threads: 262
Joined: Jul 2022
03-19-2025, 08:24 AM
(This post was last modified: 03-19-2025, 08:26 AM by Davider.)
n8n is an open-source AI agent workflow development tool, but its capability to operate on the computer's underlying system is limited. Could we use LA to extend its functionality?
https://github.com/n8n-io/n8n
Relevant resources
https://github.com/punkpeye/awesome-mcp-servers
Posts: 1,133
Threads: 262
Joined: Jul 2022
Using LA as the MCP service for AI agents like n8n would be a great choice.
Currently, I can only invoke functions in LA by sending HTTP requests, which isn't very elegant.
If there were a template for creating MCP-based services, it would be much more convenient.
Posts: 12,190
Threads: 144
Joined: Dec 2002
05-13-2025, 01:54 PM
(This post was last modified: 05-13-2025, 02:36 PM by Gintaras.)
MCP server example in LA.
The code is from
https://devblogs.microsoft.com/blog/micr...t-protocol
// script "MCP_server.cs"
/*/ role exeProgram; outputPath %folders.Workspace%\exe\MCP_server; console true; nuget mcp\ModelContextProtocol; nuget mcp\Microsoft.Extensions.Hosting; /*/
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using ModelContextProtocol.Server;
using System.ComponentModel;
print.ignoreConsole = true;
//workaround for: does not find assemblies in runtimes\win\lib\net9.0
System.Runtime.Loader.AssemblyLoadContext.Default.Resolving += (o, e) => o.LoadFromAssemblyPath(folders.ThisAppBS + $@"runtimes\win\lib\net9.0\{e.Name}.dll");
try {
var builder = Host.CreateApplicationBuilder(args);
builder.Logging.AddConsole();
builder.Services
.AddMcpServer()
.WithStdioServerTransport()
.WithToolsFromAssembly();
builder.Build().Run();
}
catch (Exception ex) { print.it(ex); }
/// <summary>
/// Add your functions to this class like the example. They will be automatically used as MCP tools by MCP clients.
/// </summary>
[McpServerToolType]
public static class EchoTool {
[McpServerTool, Description("Echoes the message back to the client.")]
public static string Echo(string message) => $"Hello from C#: {message}";
}
Compile. Copy full path of the exe file. Paste in
Command field in MCP client settings (more info below). MCP client will run the exe.
To use in n8n, need the community
MCP Client, not the built-in MCP Client. And locally installed n8n, not the cloud n8n.
n8n MCP Client node fields for testing this MCP server:
-
Credentials: create credential where
Command is full path of your exe file created when you compile the example script. Later just select the credential.
-
Tool Name:
Echo
-
Tool Parameters:
{"message":"test"}
.
Posts: 102
Threads: 29
Joined: May 2023
This is cool! But it's also hard to understand.
Posts: 1,133
Threads: 262
Joined: Jul 2022
05-30-2025, 10:14 PM
(This post was last modified: 05-30-2025, 10:26 PM by Davider.)
Thank you for your sharing. It looks a bit complex.
Both N8N and LA are open-source projects. It would be fantastic if we could integrate these two.
N8N + LA =
Ai Workflow + RPA
Here’s my idea:
Create two projects:
- LA for n8n node MCP server, implemented on LA. It can retrieve all scripts or function parameters and descriptions from LA.The functionality in the link below might be useful.
Call C# functions from anywhere using URL (HTTP server)
- LA for n8n node MCP client, which involves creating a community node for n8n. It can send parameters to the MCP server and retrieve execution results as needed, similar to the functionality of the project below.
https://github.com/nerding-io/n8n-nodes-mcp
LA makes the implementation of many features simpler and more elegant. It's time to add some AI capabilities to it—for example, enabling AI to automatically generate function descriptions or parameter documentation, which would be helpful for use in the above n8n project.