Skip to content

Add mcp-host node and mcp-server node#1063

Merged
haixuanTao merged 4 commits intodora-rs:mainfrom
chrislearn:mcp-server
Aug 13, 2025
Merged

Add mcp-host node and mcp-server node#1063
haixuanTao merged 4 commits intodora-rs:mainfrom
chrislearn:mcp-server

Conversation

@chrislearn
Copy link
Copy Markdown
Contributor

Dora MCP Server

This node can provide an MCP Server, which will proxy the request to one or more other nodes in the dora application.

Dora MCP Server is still experimental and may change in the future.

How to use

nodes:
  - id: mcp-server
    build: cargo build -p dora-mcp-server --release
    path: ../../target/release/dora-mcp-server
    outputs:
      - counter
    inputs:
      counter_reply: counter/reply
    env:
      MCP_SERVER_CONFIG: config.toml

use MCP_SERVER_CONFIG set config file, it supports toml, json or yaml format.

An example config file:

name = "MCP Server Example"
version = "0.1.0"

# You can set your custom listen address and endpoint here.
# Default listen address is "0.0.0.0:8008" and endpoint is "mcp".
listen_addr = "0.0.0.0:8181"
endpoint = "mcp"

[[mcp_tools]]
name = "counter_decrement"
args = []
input_schema = "empty_object.json"
node_id = "counter"

[[mcp_tools]]
name = "counter_increment"
args = []
input_schema = "empty_object.json"
node_id = "counter"

[[mcp_tools]]
name = "counter_get_value"
args = []
input_schema = "empty_object.json"
node_id = "counter"

@haixuanTao
Copy link
Copy Markdown
Collaborator

I'm sorry can we scope this PR more? It seems that there is a lot changes

@chrislearn chrislearn marked this pull request as draft July 15, 2025 13:21
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.84"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this a separate PR please?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The toolchain will force the use of a certain version of Rust. Have you considered setting the minimum Rust version via rust-version in Cargo.toml?


#[derive(Debug)]
#[non_exhaustive]
#[allow(clippy::large_enum_variant)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put those clippy changes in a separate PR?

@chrislearn chrislearn marked this pull request as ready for review July 23, 2025 14:10
@haixuanTao
Copy link
Copy Markdown
Collaborator

Sorry, can we do rebasing instead of merging main branch?

@haixuanTao
Copy link
Copy Markdown
Collaborator

Is there documentation for the mcp config?

I don't exactly understand how this map config should be set?

Also could you provide an example on how to connect this with an llm?

@haixuanTao haixuanTao closed this Jul 25, 2025
@haixuanTao haixuanTao reopened this Jul 25, 2025
@haixuanTao
Copy link
Copy Markdown
Collaborator

p.s: Sorry clicked by mistake closing PR

@chrislearn
Copy link
Copy Markdown
Contributor Author

Is there documentation for the mcp config?

I don't exactly understand how this map config should be set?

Also could you provide an example on how to connect this with an llm?

follow this tool definition structure to config mcp_tool:

https://modelcontextprotocol.io/docs/concepts/tools#tool-definition-structure

I think the easy way to test this mcp server example can work is use mpc inspector

npx @modelcontextprotocol/inspector

I am also working on an enhancement to the current openai-proxy-server, hoping that it can support remote ai servers, call mcp-servers, and proxy openai's realtime api, etc., but it is not yet finished, so no PR has been submitted.

@haixuanTao
Copy link
Copy Markdown
Collaborator

haixuanTao commented Jul 28, 2025

I mean I understand that npx @modelcontextprotocol/inspector can test it. But it would be great if we could have let say a small python script so that people, like myself can understand how to use it as a script.

@haixuanTao
Copy link
Copy Markdown
Collaborator

I can't find the page documenting toml on https://modelcontextprotocol.io/specification/2025-06-18/server/tools#tool sorry.
Could you help me out?

@gitguardian
Copy link
Copy Markdown

gitguardian bot commented Aug 4, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@chrislearn chrislearn changed the title Add mcp server node and example Add mcp-host node and mcp-server node Aug 4, 2025
@chrislearn
Copy link
Copy Markdown
Contributor Author

The dora-mcp-host node and its example mcp-host are added. In this example, a dora-mcp-server is included to provide mcp server service.

Copy link
Copy Markdown
Collaborator

@haixuanTao haixuanTao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@haixuanTao haixuanTao merged commit e8e9ee3 into dora-rs:main Aug 13, 2025
179 of 181 checks passed
@haixuanTao
Copy link
Copy Markdown
Collaborator

Thanks a lot!

Sorry it took some time!

@chrislearn chrislearn deleted the mcp-server branch August 15, 2025 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants