tamabahan
This commit is contained in:
@@ -81,6 +81,6 @@ async function build() {
|
||||
console.log("🎉 Build complete!");
|
||||
}
|
||||
|
||||
execSync("npm version patch", { stdio: 'inherit' })
|
||||
execSync("cd src && npm version patch", { stdio: 'inherit' })
|
||||
build()
|
||||
|
||||
|
||||
17
icon.svg
17
icon.svg
@@ -1,17 +0,0 @@
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" viewBox="0 0 128 128" aria-label="Icon AB square">
|
||||
<defs>
|
||||
<style>
|
||||
.bg { fill: #111827; rx: 20; }
|
||||
.letters { fill: #f9fafb; font-family: "Inter", "Segoe UI", Roboto, sans-serif; font-weight: 800; font-size: 56px; }
|
||||
</style>
|
||||
</defs>
|
||||
|
||||
<!-- rounded square background -->
|
||||
<rect class="bg" width="128" height="128" rx="20" ry="20"/>
|
||||
|
||||
<!-- letters -->
|
||||
<text class="letters" x="64" y="78" text-anchor="middle" dominant-baseline="middle">mcp</text>
|
||||
</svg>
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 550 B |
74
src/README.md
Normal file
74
src/README.md
Normal file
@@ -0,0 +1,74 @@
|
||||
|
||||
# n8n-nodes-openapi-mcp-server
|
||||
|
||||
[](https://www.npmjs.com/package/n8n-nodes-openapi-mcp-server)
|
||||
[](https://www.npmjs.com/package/n8n-nodes-openapi-mcp-server)
|
||||
|
||||
This is an n8n node that acts as a trigger, running an MCP (Machine-readable Capability Protocol) server inside n8n. It dynamically generates tools from an OpenAPI specification URL and makes them available via a webhook.
|
||||
|
||||
## Installation
|
||||
|
||||
To install this node, follow these steps:
|
||||
|
||||
1. Go to your n8n instance.
|
||||
2. Go to **Settings > Community Nodes**.
|
||||
3. Click **Install** and enter `n8n-nodes-openapi-mcp-server`.
|
||||
4. Click **Install** again.
|
||||
|
||||
Alternatively, you can use npm in your n8n's custom nodes directory:
|
||||
|
||||
```bash
|
||||
npm install n8n-nodes-openapi-mcp-server
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The node has the following properties:
|
||||
|
||||
- **Path**: The path for the webhook URL. Defaults to `mcp`.
|
||||
- **OpenAPI URL**: The URL of the `openapi.json` file to generate tools from.
|
||||
- **Default Filter**: An optional tag to filter the tools from the OpenAPI specification.
|
||||
- **Available Tools**: A read-only list of the tools that have been successfully loaded from the OpenAPI URL. This list refreshes automatically when you open the node.
|
||||
|
||||
### Credentials
|
||||
|
||||
This node requires credentials to authenticate with the target API.
|
||||
|
||||
- **Base URL**: The base URL of the API (e.g., `https://api.example.com`).
|
||||
- **Bearer Token**: The Bearer token for authentication.
|
||||
|
||||
## Usage
|
||||
|
||||
This node functions as a webhook trigger. Once activated, it will provide a webhook URL. You can send MCP requests to this URL to interact with the tools generated from the OpenAPI specification.
|
||||
|
||||
The node handles the following MCP methods:
|
||||
|
||||
- `initialize`: Initializes the connection.
|
||||
- `tools/list`: Lists all the available tools.
|
||||
- `tools/call`: Executes a specific tool with the given arguments.
|
||||
- `ping`: A simple ping to check the connection.
|
||||
|
||||
When a `tools/call` request is received, the node will make an HTTP request to the corresponding API endpoint defined in the OpenAPI specification, using the provided credentials.
|
||||
|
||||
## Example
|
||||
|
||||
Here is an example of how to call the `tools/list` method using `curl`. Replace `YOUR_N8N_WEBHOOK_URL` with the actual webhook URL provided by the node.
|
||||
|
||||
```bash
|
||||
curl -X POST YOUR_N8N_WEBHOOK_URL \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"jsonrpc": "2.0",
|
||||
"id": "123",
|
||||
"method": "tools/list",
|
||||
"params": {}
|
||||
}'
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
Contributions are welcome. Please open an issue or a pull request on the project's repository.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the ISC License.
|
||||
23
src/packege.json
Normal file
23
src/packege.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "n8n-nodes-openapi-mcp-server",
|
||||
"version": "1.1.19",
|
||||
"keywords": [
|
||||
"n8n",
|
||||
"n8n-nodes"
|
||||
],
|
||||
"author": {
|
||||
"name": "makuro",
|
||||
"phone": "6289697338821"
|
||||
},
|
||||
"license": "ISC",
|
||||
"description": "",
|
||||
"n8n": {
|
||||
"nodes": [
|
||||
"nodes/OpenapiMcpServer.js"
|
||||
],
|
||||
"n8nNodesApiVersion": 1,
|
||||
"credentials": [
|
||||
"credentials/OpenapiMcpServerCredentials.credentials.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user