However when I try to prompt Claude Code to use Archon and it attempts to query Archon, it trys a couple of times and gives up:
โบ I'll use Archon to query the Pydantic documentation and create a graph_example.py file for you.
โบ Bash(claude mcp call archon help)โฆ
โบ Bash(claude mcp call archon help)โฆ
โฟ error: unknown command 'call'
Exit code 1
Bash(claude mcp --help)โฆ
โบ Bash(claude mcp --help)โฆ
โฟ Usage: claude mcp [options] [command]
Configure and manage MCP servers
Options:
-h, --help display help for command
Commands:
serve Start the Claude Code MCP server
add [options] <name> <command> [args...] Add a stdio server
remove [options] <name> Remove an MCP server
list List configured MCP servers
get <name> Get details about an MCP server
help [command] display help for command
Bash(claude mcp serve --help)โฆ
โบ Bash(claude mcp serve --help)โฆ
โฟ Usage: claude mcp serve [options]
Start the Claude Code MCP server
Options:
-h, --help display help for command
โบ Bash(claude mcp list)โฆ
โฟ archon: http://127.0.0.1:8100
โบ Bash(curl -s http://127.0.0.1:8100/help)โฆ
โฟ Command 'curl' is not allowed for security reasons
โบ Let me try a different approach. I'll create a Python script that will query documentation about Pydantic and create a graph
I will continue to work on this and report back if I have success.
If anyone has already succeeded please post your solution. Thanks.
Exposed Archon MCP for external use since I realized the connection was probably made from Anthropic servers.
Same error.
I do seem to be able to hit Archon from the browser but receive the
{โdetailโ:โNot Foundโ}
response. I suspect I am missing something from configuration but have yet to find anything in claude code documentation that indicates where config for claude code is stored.
Thanks for trying to get Archon to work with Claude Code! I havenโt personally myself yet, so Iโm not sure exactly what configuration would have to be different.
What is the you gave for Archon with the CLI command to set up the server?
Beware of the example in the documentation The command must precede the double dash (--) Also note that I inserted the URI to the docker process directly instead of following the example and using a environment variable (for some reason when I included this the import process did not see it correctly).
Also, further on you will find a reference to claude mcp add-json not sure if this is old or too new, but add-json is an unknown command (at least for the version of claude code I am running and I updated to latest version as of today).
Well I was a bit hasty. While Claude Code will connect to Archon, it is not completely working yet. Claude Code can connect to Archon but query it properly yetโฆ
โบ Archon:run_agent (MCP)(thread_id: "69a51641-41e3-4752-85de-d2b879266b0a", user_input: "Please show me a complete example of a weather agent using pydantic_ai. I need the full code for a weather agent that can check current conditions โฆ
and forecasts for a given location.")
โฟ Error calling tool run_agent: undefined
โบ I'm experiencing technical issues with the Archon tool. Let me create a weather agent based on the example template we've seen:
Looking at the docker logs for the MCP Instance I find this error repeated multiple times:
2025-03-11 21:32:13 {"jsonrpc":"2.0","id":5,"result":{"content":[{"type":"text","text":"Error executing tool run_agent: HTTPConnectionPool(host='localhost', port=8100): Max retries exceeded with url: /invoke (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffffa53b77a0>: Failed to establish a new connection: [Errno 111] Connection refused'))"}],"isError":true}}
Indicating that the app is not found locally on port 8100.
The Archon MCP Server is running and appears to using port 8100.
In a terminal enter: claude mcp add Archon docker -- run -i --rm -e GRAPH_SERVICE_URL=http://host.docker.internal:8100 archon-mcp:latest
Start Claude Code - see text below for sample query and response.
โ โข Archon connected โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
> Send this query to Archon "What is PydanticAI?"
โบ Let me create a new thread for Archon and send your query.
โบ Archon:create_thread (MCP)โฆ
โฟ a13990da-ab56-4865-b63b-341688fe6f5d
โบ Archon:run_agent (MCP)(thread_id: "a13990da-ab56-4865-b63b-341688fe6f5d", user_input: "What is PydanticAI?"โฆ
โฟ PydanticAI is a framework designed to facilitate the development of production-grade applications
leveraging Generative AI. It is built on the principles of Pydantic, a data validation library in
Python, and aims to streamline the integration of AI models while maintaining structured and
type-safe interactions. Here are the key features and purposes of PydanticAI:
### Key Features
- **Built by the Pydantic Team:** It is developed by the creators of Pydantic, ensuring solid
validation and structure in applications.
- **Model-agnostic Integration:** PydanticAI supports various AI models such as OpenAI, Anthropic,
Gemini, and allows developers to extend support for other models easily.
- **Type-safe Design:** The framework is designed to enhance type checking and validation, helping
avoid errors during development.
- **Dependency Injection System:** It provides an optional system for managing dependencies and
testing more efficiently.
- **Graph Support:** PydanticAI facilitates handling complex application flows through graph
definitions using typing hints.
- **Streamlined Responses:** The framework allows for real-time streaming of LLM outputs with
immediate validation, which is crucial for timely and accurate interactions.
### Purpose
PydanticAI aims to provide a user-friendly experience akin to FastAPI but focused on AI applications.
It simplifies the process of building AI-driven projects, promoting standard Python practices and
maintaining a high level of data integrity through strict validation.
For further details about PydanticAI, you can refer to the [PydanticAI Official
Documentation](https://ai.pydantic.dev/).
If you're interested in building a specific AI agent or need further assistance, let me know!
โบ PydanticAI is a framework from the Pydantic team that helps build production-grade AI applications. It's
model-agnostic (works with OpenAI, Anthropic, Gemini), provides type-safe design, dependency injection,
and real-time streaming of LLM outputs with validation. Think of it as "FastAPI for AI applications."
Nice work!! Would you be down to make a PR to include instructions for getting this set up with Claude Code in the MCP section? Otherwise I can add it in! Claude Code seems pretty powerful so Iโd love to include it in the mix
Great work,
I am still on the waiting list for claude codeโฆ
Do you think it is a problem to have archon using a model (openAI or ollama if you follow the doc) and claude code using claude ?
It seems the processes are complety independant, I was wondering, if you had any issue.
It seems a very good set-up, claude code + archon for the agent development.
Are you happy about it ?
Can you have a good interaction between claude code and archon while working on AI agent ?
So far. I have only performed a few short tests with it so far. These have been successful. I especially want to see if I can get it (claude code paired with archon) to work in an MCP to be callable from n8n or other augmented workflows. This should be possible as Claude Code can run in MCP mode.
Have you tried using it yet? I am curious to hear how this pairing works for others.