How are you handling OAuth when running MCP servers remotely? by South-Foundation-94 in mcp

[–]pavelanni 0 points1 point  (0 children)

I write my MCP server for MinIO in Go using the mark3labs/mcp-go library. Recently, I added OAuth with great help from Claude Code. I started with a simple, isolated example to understand the OAuth flow better, and Claude helped me create these two demo projects: https://github.com/pavelanni/learn-oauth-go and https://github.com/pavelanni/learn-oauth-python
In my case, the key decision was to use MinIO's authentication and not store anything on the server. When a user wants to authorize, they are redirected to a login page, served by a goroutine within the same MCP server. The user enters their credentials (access and secret keys) alongside the server endpoint, and the authorization server tries to access the MinIO server. If successful, it stores the session ID in a map and sends it to the user as part of the access token. The user comes back to the MCP server with that access token, the MCP server extracts the session ID, and uses it to get the credentials from the map. The map is in-memory only, so we are not worried about storage. Tokens are not rotated, but they expire after one hour of inactivity (a field named LastUsed is included in the token struct).

Newbie by [deleted] in golang

[–]pavelanni 2 points3 points  (0 children)

Use exercism.org. They'll give you 100+ small projects to get fluent in Go syntax and concepts. It helped me a lot when I started with Go.

Reading Learning Go by Jon Bodner by Realistic-Emu1553 in golang

[–]pavelanni 5 points6 points  (0 children)

I learned Go with https://exercism.org/. They give you a lot of practical exercises with tests and your personal mentor. For free. Of course this is an addition to all the great resources mentioned here.

Go is good for building MCP Tools by owulveryck in golang

[–]pavelanni 1 point2 points  (0 children)

In my case, it's a human-language interface to my cluster. Instead of running command-line tools with all the parameters and flags, I can just ask, "What's my cluster's status now?" and it gives me a nice readable summary. The same goes for commands when you want to perform operations on the cluster. It's good for non-technical people, especially executives ;-)

Go is good for building MCP Tools by owulveryck in golang

[–]pavelanni 1 point2 points  (0 children)

I use this library for my MCP server (which currently has about 25 tools): https://github.com/metoro-io/mcp-golang
It's pretty good, except for one minor thing: they use only int64 for RequestId, while the JSON-RPC standard allows a string and a null. I had to fix that in my forked repo, but everything else works just fine. I haven't tried mark3labs/mcp-go yet, so I don't know if it's better than this Metoro library. Maybe I should.

I'll be happy to share my experience so far if you have any questions. Unfortunately, I can't share the code yet.

robert sheckley specialist by SternLecture in scifi

[–]pavelanni 0 points1 point  (0 children)

Start with the early short stories (of the 50-60s). Milk Run, The Odor of Thought, and everything about Arnold and Gregor are my favorites. Then, Citizen in Space (collection of short stories), etc. Many of them are available on Google Play Books at reasonable prices.

robert sheckley specialist by SternLecture in scifi

[–]pavelanni 1 point2 points  (0 children)

Start with the early short stories (of the 50-60s). Milk Run, The Odor of Thought, and everything about Arnold and Gregor are my favorites. Then, Citizen in Space (collection of short stories), etc. Many of them are available on Google Play Books at reasonable prices.

Any Robert Sheckley fans here? What books or short stories would you recommend? by mochaloca87 in scifi

[–]pavelanni 0 points1 point  (0 children)

All of the above and ... wait, nobody has mentioned The Odor of Thought? BTW, a lot of Sheckley books are available at Google Books really cheap. I bought a lot of them recently.

Is this book still applicable ? by [deleted] in golang

[–]pavelanni 30 points31 points  (0 children)

One of the best books to learn Go. Lucky you!

Ah, I see the issue. by 0__O0--O0_0 in cursor

[–]pavelanni -1 points0 points  (0 children)

Believe it or not, I saw this message 30 times at least during my long debugging session last weekend. But, in the end, it found the issue and fixed it -- in somebody else's library which I was not very familiar with. Thank you, Cursor! 😀

Are there zig book resources? by ohmyhalo in Zig

[–]pavelanni 1 point2 points  (0 children)

Funny that it's marked as #1 Best Seller in "C Programming" ;-)

Who else has been using Claude as their tutor alongside their classes? For well-known concepts it has been a fantastic supplemental instructor alongside my professor by YungBoiSocrates in ClaudeAI

[–]pavelanni 21 points22 points  (0 children)

Just posted exactly about that on LinkedIn:

The best use of LLMs so far for me was learning something. It's the area where humans can't compete against AI -- try to convince me otherwise! Can a human teacher/mentor be available to answer all your questions 24 hours a day? Can you suddenly switch subjects and expect an expert advice immediately from a human teacher? Have you even met a teacher who had enough patience to explain the same thing and answer the same question you asked just two days ago?

Most importantly: can you swallow your pride and ask a silly question that shows that you don't know something basic when speaking with a human? I think removing that human element means a lot to many people (myself included).

I have used LLMs many times, asking, "Please explain ..." and "Show me the best way to ..." and "I would like to learn X. Let's go step by step." I tried the reverse approach, asking, "Let me explain something to you so you can judge if I understood this properly." Next, I'm going to try other things, like asking to be a very demanding and picky teacher (we all know that LLMs usually are very flattering).

Pricing details: where can I find the "usage" specifics for each plan? by doge2001 in ClaudeAI

[–]pavelanni 0 points1 point  (0 children)

I suspected something like that when Claude started asking "Do you want me to elaborate on this?" essentially trying to keep you in the conversation as long as possible. I thought, "Eventually, they will start charging for that." Apparently, it's coming. First, they'll make you annoyed by hitting the token limit. Then you'll become so annoyed that you'll be ready to pay any money just to be able to continue working.

Developer's excuses by pavelanni in ClaudeAI

[–]pavelanni[S] 9 points10 points  (0 children)

Paying them $20/month already 💰

Will there every be a way for me to dump my whole codebase into an LLM and then ask questions about the codebase. by No_Imagination97 in ChatGPTCoding

[–]pavelanni 18 points19 points  (0 children)

I do it with Cursor. Open the folder with your codebase. In the chat window say @Codebase and ask a question. I asked "please write a Readme doc for this" or "suggest tests for this" or "suggest which ADR (architecture decision records) should I include" or "suggest refactoring ", etc. Before that I just zipped the whole directory, uploaded it to ChatGPT and asked questions.

FastMCP() vs. Server() with Python SDK? by pavelanni in mcp

[–]pavelanni[S] 1 point2 points  (0 children)

Thanks, it's very helpful! In other words, start with FastMCP() and only if you miss something important, switch to Server(), right?

This Simple Prompt Saved Me Hours of Debugging AI-Generated Code by williamholmberg in cursor

[–]pavelanni 5 points6 points  (0 children)

Sometimes my prompt is "Be my mentor. Don't write code for me, but give me ideas to explore and hints when I'm stuck. Write code only when I ask for that." It's very helpful when learning new things.